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
e875141322
feat(library/tactic/intro_tactic): make sure unused names are used if the user did not provide them
2017-03-09 16:03:18 -08:00
Leonardo de Moura
3e757d890a
feat(library/tactic/intro_tactic): allow '_' in interactive mode as the anonymous name for intros, cases, induction
2017-03-09 15:42:36 -08:00
Sebastian Ullrich
4d41b03168
chore(frontends/lean,library/tactic): remove old tactic_state functions
2017-02-17 15:41:58 +01:00
Leonardo de Moura
53667dd602
fix(library): change API and make sure we don't crash when searching for a non existing local decl
...
Fixes #1363
After error recovery has been implemented in the elaborator, a few
assumptions made in the type context are not valid anymore since we may
be recovering from errors, and the local and metavariable contexts may
be invalid.
I used the approach used in the class environment.
- find* methods return optional<...>
- get* methods throw exception for unknown elements
Remarks:
I preserved code patterns such as
optional<local_decl> d = lctx.find_local_decl(...)
lean_assert(d)
and did not convert them into
local_decl d = lctx.get_local_decl(...)
Reason: the intention is clear that the local must be defined there.
If it is not we should analyze the problem and decide whether we should
throw an exception or not.
However, I converted code patterns such as
local_decl d = *lctx.find_local_decl(...)
into
local_decl d = lctx.get_local_decl(...)
Disclaimer: this change fixes issue #1363 , but it may obfuscate other bugs.
2017-02-07 09:38:19 -08:00
Leonardo de Moura
9d52b6607d
feat(library/tactic): use annotated_head_beta_reduce instead of head_beta_reduce in tactics
2016-11-21 15:40:12 -08:00
Gabriel Ebner
8d06a88840
feat(library/tactic/intro_tactic): use get_unused_name
2016-09-19 16:38:03 -07:00
Leonardo de Moura
5b0100ef0b
refactor(library/lazy_abstraction): lazy ==> delayed
2016-07-27 13:53:17 -07:00
Leonardo de Moura
1b55507971
refactor(library/init/meta): rename C++ intro to intro_core, and define smarter intro in C++
2016-07-21 16:54:23 -07:00
Leonardo de Moura
98867d4ec0
feat(library/tactic/intro_tactic): use head_beta_reduce
2016-07-18 15:14:01 -04:00
Leonardo de Moura
d49ab7d220
feat(library/tactic/induction_tactic): new flavor of intron
2016-07-14 14:51:45 -04:00
Leonardo de Moura
14111829bf
feat(library/tactic): add helper functions, improve intron
2016-07-05 19:11:15 -07:00
Leonardo de Moura
34fc12eda0
feat(library/tactic/intro_tactic): improve low-level intron
2016-07-05 13:50:21 -07:00
Leonardo de Moura
c1b06fe49a
feat(library/tactic/intro_tactic): add low-level intron procedures
2016-07-05 09:08:04 -07:00
Leonardo de Moura
59f2b9e8c2
refactor(library/type_context): "metavar_context & m_mctx" ==> "metavar_context m_mctx"
2016-06-25 13:08:03 -07:00
Leonardo de Moura
6fa6554b4d
fix(library/tactic/intro_tactic): fix 'intron' tactic
2016-06-21 16:30:26 -07:00
Leonardo de Moura
2a2d7530b2
fix(library/tactic/intro_tactic): typo
2016-06-21 16:14:28 -07:00
Leonardo de Moura
32f382991a
feat(library/init/meta/tactic): intro returns new free_var
2016-06-20 09:37:06 -07:00
Leonardo de Moura
73b21b9e48
fix(library): assertion violations
2016-06-17 13:16:17 -07:00
Leonardo de Moura
cb9b5650b7
feat(library/tactic): add 'subst' tactic
2016-06-14 21:01:57 -07:00
Leonardo de Moura
179f23b64c
fix(library/lazy_abstraction): representation
2016-06-14 11:09:43 -07:00
Leonardo de Moura
9bcb4e05db
feat(library/tactic): store tactic_state at failure
2016-06-13 15:25:55 -07:00
Leonardo de Moura
303ef37a23
chore(library/tactic): naming conventions and expose APIs
2016-06-11 10:23:49 -07:00
Leonardo de Moura
13bbac8771
feat(library/tactic): intro_tactic and variants
2016-06-10 18:29:41 -07:00
Leonardo de Moura
e9ae5019ca
feat(library/tactic): init intro tactic
2016-06-10 18:29:19 -07:00