Leonardo de Moura
7aac9f1fdb
feat(library/tactic/rewrite_tactic): use expensive convertability checker at reduce_to steps and trivial goal
2015-02-06 13:53:03 -08:00
Leonardo de Moura
5b2a9dacc2
fix(library/tactic/rewrite_tactic): matcher should unfold only reducible constants
2015-02-06 13:44:04 -08:00
Leonardo de Moura
b4139627e5
feat(library/tactic/rewrite_tactic): add option to prevent any kind of constant unfolding when perfoming pattern matching in the rewrite tactic
2015-02-06 13:27:33 -08:00
Leonardo de Moura
62daf73dd0
chore(library/normalize): fix style
2015-02-06 13:27:10 -08:00
Leonardo de Moura
ba9557bb94
fix(library/tactic/rewrite_tactic): incorrect assertion
2015-02-06 13:02:50 -08:00
Leonardo de Moura
ba641d7c58
feat(library/normalize): validate unfold-c hints
2015-02-06 12:42:53 -08:00
Leonardo de Moura
7205382f8c
feat(library/definitional/projection): add "unfold-c" hint to projections
2015-02-06 12:39:57 -08:00
Leonardo de Moura
1bd1f94542
feat(library/normalize): add "unfold-c" hint to normalizer
...
This hint will also be used in the simplifier
2015-02-06 12:39:49 -08:00
Leonardo de Moura
39446a7215
refactor(library/projection): move is_constructor_app to util
2015-02-06 12:12:25 -08:00
Leonardo de Moura
2e626b29fb
feat(library/tactic/rewrite_tactic): allow many constants to be provided in a single rewrite unfold step
2015-02-06 11:03:36 -08:00
Leonardo de Moura
264cedb3a6
fix(frontends/lean/rewrite_tactic): incorrect assertion
2015-02-05 20:02:49 -08:00
Leonardo de Moura
e17ba27596
fix(library/tactic/rewrite_tactic): adjust the behavior of class resolution in rewriter
...
The solution is not very satisfactory. I should investigate it more.
2015-02-05 19:08:47 -08:00
Leonardo de Moura
ffe0d1186e
feat(library/tactic/rewrite_tactic): add "reduce_to" step at rewrite tactic
2015-02-05 13:59:55 -08:00
Leonardo de Moura
116c65bff5
feat(library/tactic/rewrite_tactic): add reduction step to rewrite tactic
2015-02-05 13:42:50 -08:00
Leonardo de Moura
7cdc88701d
feat(library/tactic/rewrite_tactic): add "reduction" step to rewrite tactic
2015-02-05 13:16:05 -08:00
Leonardo de Moura
808521223b
feat(library/tactic/rewrite_tactic): support constant unfolding in rewrite tactic
2015-02-05 12:58:30 -08:00
Leonardo de Moura
d6958be7e7
fix(library/tactic/location): replace cache must not be used when only a subset of all occurrences should be replaced at replace_occurrences
2015-02-05 10:50:40 -08:00
Leonardo de Moura
941b493835
chore(library/tactic/rewrite_tactic): modify param name
2015-02-05 10:04:03 -08:00
Leonardo de Moura
0abfa30ead
fix(library/tactic/rewrite_tactic): elaboration bug in the rewrite tactic steps/elements
2015-02-05 10:01:18 -08:00
Leonardo de Moura
14c72e82f6
feat(library/tactic/rewrite_tactic): add support for rewriting hypotheses
2015-02-04 20:04:19 -08:00
Leonardo de Moura
55fb678db2
fix(library/tactic/location): clang++ 3.3 compilation problem
2015-02-04 18:48:23 -08:00
Leonardo de Moura
42c2f7eb11
fix(library/tactic/rewrite_tactic): memory leak
2015-02-04 18:40:11 -08:00
Leonardo de Moura
89fde9d829
feat(library/tactic/rewrite_tactic): add maximum number of iterations threshold to rewrite tactic
...
The idea is to avoid nontermination.
2015-02-04 16:13:15 -08:00
Leonardo de Moura
dc297865d4
chore(library/tactic/rewrite_tactic): fix compilation warnings
2015-02-04 15:34:02 -08:00
Leonardo de Moura
ee079d12f4
feat(library/tactic/rewrite_tactic): remove trivial goal in rewrite_tactic
2015-02-04 15:29:52 -08:00
Leonardo de Moura
f0fac1ae0e
feat(library/constants): add eq.intro
2015-02-04 15:27:18 -08:00
Leonardo de Moura
e5381679d6
feat(library/tactic/rewrite_tactic): rewrite goal
2015-02-04 15:17:58 -08:00
Leonardo de Moura
09818adf90
feat(library/tactic/rewrite_tactic): elaborate rewrite rule using unifier
2015-02-04 13:51:32 -08:00
Leonardo de Moura
49323ab598
feat(library/util): add mk_symm
2015-02-04 13:44:55 -08:00
Leonardo de Moura
ccae014ef9
feat(library/tactic/rewrite_tactic): ignore inst_implicit arguments when matching applications of declarations which contain them
2015-02-04 12:14:47 -08:00
Leonardo de Moura
0e05c239a5
feat(library/tactic/rewrite_tactic): add custom matcher pluging for rewriter
2015-02-04 11:51:39 -08:00
Leonardo de Moura
d6a7ec4621
chore(library/tactic/rewrite_tactic): fix style
2015-02-04 11:51:39 -08:00
Leonardo de Moura
b4dd2cc729
refactor(library/tactic/rewrite_tactic): more general rewrite step
...
The rule can be an arbitrary expression.
Allow user to provide a pattern that restricts the application of the rule.
2015-02-04 11:51:39 -08:00
Leonardo de Moura
461fd45efc
feat(frontends/lean): allow a different location for each rewrite element
2015-02-04 11:51:39 -08:00
Leonardo de Moura
c845e44777
feat(frontends/lean): parse rewrite tactic
2015-02-04 11:51:39 -08:00
Leonardo de Moura
180cda304e
feat(library/tactic): add rewrite tactic skeleton
...
The tactic has not been implemented yet, but this commit adds all the
support for storing arguments, serializing and deserializing them.
2015-02-04 11:51:39 -08:00
Leonardo de Moura
8a78adc9af
feat(library/tactic): add auxiliary object "location"
...
This object will used to specify the scope of application of tactics
2015-02-04 11:51:39 -08:00
Leonardo de Moura
420da8fd3f
feat(library/projection): store bit saying whether a projection is for a class or not.
2015-02-04 08:54:20 -08:00
Leonardo de Moura
c92f3bec65
refactor(library/definitional/projection): move projection "database" to library/projection
2015-02-04 07:18:43 -08:00
Leonardo de Moura
0e06f4aedc
feat(library/match): extend match_plugin interface
2015-02-03 18:10:38 -08:00
Leonardo de Moura
44e575c895
feat(library/match): improve match_app_core
2015-02-03 17:37:22 -08:00
Leonardo de Moura
790fd9c24b
chore(library/match): remove unused procedure
2015-02-03 15:20:26 -08:00
Leonardo de Moura
f79f43c702
refactor(library/match): use "special" meta-variables instead of free variables to represent placholders in the higher-order matcher
2015-02-03 15:15:04 -08:00
Leonardo de Moura
45e62031e2
fix(library/match): bug in matcher
2015-02-03 13:46:19 -08:00
Leonardo de Moura
4c7a17cc4a
refactor(library/tactic/class_instance_synth): move has_expr_metavar_relaxed to util
2015-02-01 10:59:27 -08:00
Leonardo de Moura
c311e0aba6
chore(library/tactic/inversion_tactic): cleanup
2015-02-01 10:47:32 -08:00
Leonardo de Moura
143143e94c
fix(library/tactic/inversion_tactic): missing normalization step in the inversion_tactic
2015-02-01 10:38:30 -08:00
Leonardo de Moura
e9e1f86b7f
fix(library/app_builder): many bugs, add use_cache option, add tests
2015-01-29 15:30:31 -08:00
Leonardo de Moura
e6f022e3f2
fix(library/match): index out of bounds
2015-01-29 14:41:38 -08:00
Leonardo de Moura
b5d1f4e54c
feat(library/match): add low-level match API
2015-01-29 14:09:09 -08:00
Leonardo de Moura
f587cc3e1d
feat(library/app_builder): expose app_builder API in Lua
2015-01-29 11:38:56 -08:00
Leonardo de Moura
5efd91e435
fix(library/app_builder): missing initialization
2015-01-29 11:38:28 -08:00
Leonardo de Moura
5bb2a41c64
feat(library/reducible): expose Lua API for reducible hints
2015-01-29 10:37:15 -08:00
Leonardo de Moura
4cf2dcaa7e
feat(library/app_builder): add helper class for creating applications efficiently using type inference
...
The idea is to use this class in the simplifier.
For example, we will use to create: symmetry, reflexivity, transitivity
and congruence proof steps.
2015-01-28 18:40:21 -08:00
Leonardo de Moura
4e08cc0659
feat(library/match): add flag for tracking whether matcher assigned anything
2015-01-28 18:39:50 -08:00
Leonardo de Moura
dbc8e9e13a
refactor(*): add method get_num_univ_params
2015-01-28 17:22:18 -08:00
Leonardo de Moura
5aaade47d8
feat(library/match): add new API
2015-01-28 16:42:42 -08:00
Leonardo de Moura
a1eeb0a6a1
fix(library/print): typo in is_used_name
...
closes #408
2015-01-25 08:58:08 -08:00
Leonardo de Moura
27f6bfd3f0
refactor(*): add file constants.txt with all constants used by the Lean binary
2015-01-23 16:50:32 -08:00
Leonardo de Moura
880faf89e0
feat(frontends/lean/structure_cmd): add implicit_infer_kind annotation to structure command
...
closes #354
2015-01-21 18:12:29 -08:00
Leonardo de Moura
a53098385c
refactor(frontends/lean/type_util): move infer_implicit_params to library
2015-01-21 17:22:41 -08:00
Leonardo de Moura
1d6ff5f761
feat(library/definitional/projection): throw exception if unsupported case occurs
...
The user can workaround it by using trust-level 0 (i.e., no option -t num or -T)
2015-01-20 17:42:34 -08:00
Leonardo de Moura
01ce57e52e
feat(library/definitional/projection): add projection macro
2015-01-20 16:21:50 -08:00
Leonardo de Moura
b6750e9d29
feat(library/util): add auxiliary functions
2015-01-20 15:44:58 -08:00
Leonardo de Moura
8355ed55d7
refactor(library/definitional/projection): remove dead code
2015-01-20 13:40:09 -08:00
Leonardo de Moura
752b54085b
refactor(kernel/type_checker): type checker should not unfold macros, but sign an error if a untrusted macro is used
...
Now, we unfold untrusted macros outside of the Lean kernel.
2015-01-20 12:36:56 -08:00
Leonardo de Moura
2717adde94
feat(library/unifier): add option 'unifier.conservative', use option by default in the calc_assistant
2015-01-19 16:23:29 -08:00
Leonardo de Moura
d0e9e0e21c
feat(library/definitional/projection): add auxiliary function for simplifying expressions containing projections and constructors
2015-01-18 20:58:40 -08:00
Leonardo de Moura
858d21f20b
feat(library/definitional/projection): store projection information
2015-01-18 16:26:56 -08:00
Leonardo de Moura
6c07ca5d41
perf(library/print): improve is_used_name
2015-01-15 19:01:13 -08:00
Leonardo de Moura
8ab775bd6f
feat(*): distinguish between logical and runtime exceptions.
...
Now, we use throwable as the new base class for all Lean exceptions, and
exception is the subclass for "logical" exceptions.
2015-01-15 16:54:55 -08:00
Leonardo de Moura
ef529c660f
fix(library/definitional/no_confusion): mark no_confusion as reducible
...
Auxiliary definitions should be marked as reducible
2015-01-13 18:44:47 -08:00
Leonardo de Moura
e9338669dc
feat(library/definitional/equations): show implicit arguments (by default) in equations compiler error messages
2015-01-13 13:30:12 -08:00
Leonardo de Moura
41935906a8
chore(frontends/lean): use update_if_undef
2015-01-13 13:02:14 -08:00
Leonardo de Moura
e5a8c67d22
fix(library/definitional/equations): assertion violation
2015-01-13 11:57:14 -08:00
Leonardo de Moura
1fbfe59a9a
feat(library/tactic/goal): when listing context/goal variables, collect vars of same type in one line
...
closes #391
2015-01-13 11:14:44 -08:00
Leonardo de Moura
a3bc1b0cd5
fix(library/definitional/equations): add more equation validation to avoid obscure error message
2015-01-09 18:52:21 -08:00
Leonardo de Moura
2e4a2451e6
refactor(library/reducible): simplify reducible/irreducible semantics
2015-01-08 18:52:18 -08:00
Leonardo de Moura
698754b2bb
feat(library/definitional/equations): display elaborated equation lhs's when there are missing cases
2015-01-08 12:00:47 -08:00
Leonardo de Moura
f344dd75c4
feat(library/pp_options): add get_pp_purify_locals_name
2015-01-08 11:55:08 -08:00
Leonardo de Moura
5c118127ae
fix(library/definitional/equations): memory access violation
2015-01-07 17:06:41 -08:00
Leonardo de Moura
597f7385e8
fix(library/unifier): incorrect fix
2015-01-07 16:57:02 -08:00
Leonardo de Moura
15b5344626
feat(library/definitional/equations): copy tags
2015-01-07 14:00:46 -08:00
Leonardo de Moura
2990a6d029
fix(library/unifier): missing "set_conflict" in process_delta
2015-01-07 12:41:01 -08:00
Leonardo de Moura
760dc2162a
chore(library/definitional/equations): cleanup
2015-01-06 14:53:21 -08:00
Leonardo de Moura
a3a6697f44
feat(library/definitional/equations): mutually recursive functions for mutually recursive datatypes
2015-01-06 14:07:17 -08:00
Leonardo de Moura
c33928f202
fix(library/pp_options): memory leak
2015-01-06 10:22:23 -08:00
Leonardo de Moura
322cdb8a98
feat(library/definitional/equations): add 'equations_result' macro used to wrap multiple functions being defined by recursive equations
...
This is only useful when compiling "mutually recursive" functions.
2015-01-05 19:09:20 -08:00
Leonardo de Moura
3325d791de
fix(library/definitional/equations): bug in recursive application elimination
2015-01-05 17:17:14 -08:00
Leonardo de Moura
eedc31f7e9
fix(library/definitional/equations): bug in "complete" transition
2015-01-05 16:27:29 -08:00
Leonardo de Moura
3889b60152
feat(library/definitional/equations): allow inductive datatype parameters in recursive equations
2015-01-05 15:56:28 -08:00
Leonardo de Moura
6eba4b4ac1
chore(library/definitional/equations): cleanup
2015-01-05 13:57:13 -08:00
Leonardo de Moura
b46c377aa2
feat(library/definitional/equations): add "complete" transition for overlapping patterns
2015-01-05 11:49:27 -08:00
Leonardo de Moura
fdef3e5407
feat(library/definitional/equations): add support for reflexive datatypes in the definitional package
2015-01-05 11:13:35 -08:00
Leonardo de Moura
5e228d92d2
fix(library/definitional/equations): missing case
2015-01-04 20:49:53 -08:00
Leonardo de Moura
576c053c25
fix(library/tactic/inversion_tactic): bug at implementation_list update
2015-01-04 19:56:10 -08:00
Leonardo de Moura
faf78ce3e6
feat(library/definitional/equations): brec_on compilation
2015-01-04 17:45:13 -08:00
Leonardo de Moura
98a856373d
feat(library/util): add dec_level auxiliary procedure
2015-01-04 13:25:58 -08:00
Leonardo de Moura
926c140e17
fix(library/definitional/equations): fix clang compilation problems
2015-01-04 10:18:19 -08:00
Leonardo de Moura
bdfa919098
feat(library/definitional/equations): add brec_on based compilation
2015-01-03 22:23:37 -08:00
Leonardo de Moura
42354cd4fa
feat(library/locals): add auxiliary templates
2015-01-03 22:23:08 -08:00
Leonardo de Moura
376126241e
fix(library/definitional/equations): typo and bug
2015-01-03 15:29:34 -08:00
Leonardo de Moura
21a9cd58a3
fix(library/definitional/equations): bug when compiling in proof relevant kernels
2015-01-02 23:17:33 -08:00
Leonardo de Moura
7f7d318b22
feat(library/definitional/equations): add dependent pattern matching compilation
2015-01-02 22:06:40 -08:00
Leonardo de Moura
762a515a5b
feat(library/tactic/inversion_tactic): mark new arguments that have been "unified" into terms
2015-01-02 22:02:15 -08:00
Leonardo de Moura
3fb2d8bbc0
feat(library/tactic/inversion_tactic): use the "simpler" compilation approach in more cases
...
The approach implemented in the commit 8974d70c11ef7b9b2c5d can be
extended to indexed inductive families. See comments in the code.
2015-01-01 19:33:15 -08:00
Leonardo de Moura
be9e2500ce
feat(library/tactic/inversion_tactic): add more efficient "compilation" for non-indexed inductive datatypes
2015-01-01 19:33:14 -08:00
Leonardo de Moura
57490a6431
feat(library/tactic/inversion_tactic): avoid unnecessary eq.rec's
2015-01-01 19:33:14 -08:00
Leonardo de Moura
58f052b1bb
fix(library/normalize): unitialized variable
2015-01-01 19:33:14 -08:00
Leonardo de Moura
761810f350
feat(library/tactic/inversion_tactic): generate auxiliary information
2015-01-01 19:33:14 -08:00
Leonardo de Moura
1f13bfa4f7
feat(library/tactic/inversion_tactic): add inversion::apply procedure
...
The new procedure is essentially a "customized" version of the
inversion (aka cases) tactic for the equations package
2015-01-01 19:33:14 -08:00
Leonardo de Moura
1d79cb9c07
fix(library/tactic/inversion_tactic): fix bug in 'cases' tactic for HoTT library
2014-12-22 09:40:15 -08:00
Leonardo de Moura
d2958044fd
feat(frontends/lean): add multiple_instances command
...
After this commit, Lean "cuts" the search after the first instance is
computed. To obtain the previous behavior, we must use the new command
multiple_instances <class-name>
closes #370
2014-12-21 17:28:44 -08:00
Leonardo de Moura
5efadb09cc
feat(library/tactic/inversion_tactic): improve 'cases' tactic for HoTT library
...
This commit adds support for hypotheses (h : C As idxs) where the indices idxs
are just local constants. Before this commit the indices idxs had to be hsets.
Now, they can be hsets or local constants.
The new tests demonstrate new examples that can be handled by the
improved tactic in the HoTT library
2014-12-21 15:19:25 -08:00
Leonardo de Moura
677ec2a2fe
feat(library/tactic/inversion_tactic): adjust inversion tactic to HoTT lib
2014-12-20 11:32:27 -08:00
Leonardo de Moura
2070ac849c
feat(library/util): add get_intro_rule_names
...
Signed-off-by: Leonardo de Moura <leonardo@microsoft.com>
2014-12-20 11:31:48 -08:00
Leonardo de Moura
d9d822baa7
feat(library/tactic/class_instance_synth): add mk_hset_instance procedure
2014-12-19 22:00:25 -08:00
Leonardo de Moura
8c63045492
feat(library/util): add more auxiliary procedures
2014-12-19 22:00:25 -08:00
Leonardo de Moura
d6f79423e9
feat(library/tactic/class_instance_synth): add mk_class_instance procedures
2014-12-19 20:09:09 -08:00
Leonardo de Moura
4421069e34
refactor(library/tactic): rename placeholder_elaborator to class_instance_synth
2014-12-19 19:57:38 -08:00
Leonardo de Moura
ded869b7e0
refactor(frontends/lean): move placeholder_elaborator to library/tactic
2014-12-19 15:23:22 -08:00
Leonardo de Moura
a22dc773b7
refactor(frontends/lean): move some auxiliary procedures to library/tactic
2014-12-19 15:19:45 -08:00
Leonardo de Moura
69750c50c6
refactor(frontends/lean): move pp_options to library
2014-12-19 15:00:05 -08:00
Leonardo de Moura
caf0a4bf15
refactor(frontends/lean): move type_checker_ptr typedef to library
2014-12-19 14:40:15 -08:00
Leonardo de Moura
02de288a51
refactor(frontends/lean): move choice_iterator to library
2014-12-19 14:29:32 -08:00
Leonardo de Moura
9bd74689be
feat(library/util): add mk_refl
2014-12-19 13:54:12 -08:00
Leonardo de Moura
a97bef7df2
feat(library/util): add mk_heq
2014-12-19 13:54:12 -08:00
Leonardo de Moura
1ca8723c54
refactor(library/util): allow mk_telescopic_eq to be used with (terms, locals)
2014-12-19 13:54:12 -08:00
Leonardo de Moura
6f78315aa4
refactor(*): add uniform names for "meta-objects"
2014-12-17 11:42:14 -08:00
Leonardo de Moura
8939351903
refactor(library): add compile_equations function, generic_exception, and cleanup elaborator_exception
2014-12-15 19:22:17 -08:00
Leonardo de Moura
5a9cd9eed4
fix(library/normalize): bug in the "eval" command
2014-12-15 19:22:17 -08:00
Leonardo de Moura
f0b002d5a7
fix(library/aliases): aliases in sections and contexts
2014-12-13 14:57:15 -08:00
Leonardo de Moura
e897bbdeb9
feat(library/util): add auxiliary functions for creating tuples (using sigma types)
2014-12-11 17:31:47 -08:00
Leonardo de Moura
b8f665e561
feat(frontends/lean): elaborate recursive equations
...
Remark: we are not compiling them yet.
2014-12-10 22:25:40 -08:00
Leonardo de Moura
2867789bec
fix(library/unifier): handle missing first-order flex-flex case
2014-12-10 22:11:30 -08:00
Leonardo de Moura
756fae7c2a
refactor(frontends/lean): move local_context to library
2014-12-10 12:43:32 -08:00
Leonardo de Moura
bf875d5778
feat(library/definitional/equations): add support for inaccessible patterns
2014-12-10 12:35:08 -08:00
Leonardo de Moura
d98aabe9ab
refactor(library): move library/definitional/util module to library
2014-12-10 11:23:23 -08:00
Leonardo de Moura
ac664505e6
refactor(library): move class management to library module
2014-12-09 21:38:55 -08:00
Leonardo de Moura
d67583df44
fix(frontends/lean/parser): do not generate error when 'exit' command is used
2014-12-09 10:14:14 -08:00
Leonardo de Moura
58432d0968
feat(library/definitional): add no_confusion construction that is compatible with the HoTT library
2014-12-08 22:11:48 -08:00
Leonardo de Moura
2bb51554d5
feat(library/definitional/util): add telescope equality for HoTT library
...
This is needed for implementing no_confusion for HoTT.
We can't use heterogeneous equality in HoTT.
2014-12-07 18:35:55 -08:00
Leonardo de Moura
6736f58548
refactor(library/definitional/util): cleanup
2014-12-07 16:41:28 -08:00
Leonardo de Moura
eb87c18693
feat(*): add support for separate HoTT library
2014-12-05 14:34:02 -08:00
Leonardo de Moura
c8d8e7ac93
chore(library/definitional/equations): fix style
2014-12-04 16:00:33 -08:00
Leonardo de Moura
e267b2d120
feat(library/definitional/equations): add support for serializing equations
2014-12-04 15:11:18 -08:00
Leonardo de Moura
1d401ad862
feat(library/definitional): add "datastructure" for storing recursive equations
2014-12-04 12:39:59 -08:00
Leonardo de Moura
ebda057499
fix(library/tactic/intros_tactic): seg fault at intros tactic, fixes #366
2014-12-04 09:26:10 -08:00
Leonardo de Moura
59d403f7d8
fix(library/tactic/inversion_tactic): warning on clang++
2014-12-03 21:14:10 -08:00
Leonardo de Moura
d10bb92a7d
feat(library/aliases): protected definitions in nested namespaces, closes #331
2014-12-03 14:25:02 -08:00