Leonardo de Moura
343ede3fbe
fix(library/class_instance_resolution): trace option for new type class resolution procedure
2015-11-08 14:04:57 -08:00
Leonardo de Moura
98943f7832
fix(library/class_instance_resolution): initialization bug and ignore universe metavariables not instantiated by unifier
2015-11-08 14:04:57 -08:00
Leonardo de Moura
6a36bffe4b
fix(library/class_instance_resolution): bugs in new type class resolution procedure
2015-11-08 14:04:57 -08:00
Leonardo de Moura
bf17440f31
feat(library/class_instance_resolution): throw exception is maximum depth is reached
2015-11-08 14:04:57 -08:00
Leonardo de Moura
f5819fab60
feat(library/class_instance_resolution): new type class resolution procedure
2015-11-08 14:04:57 -08:00
Leonardo de Moura
c69bbd4eb7
chore(library/norm_num,library/tactic/norm_num_tactic): fix style
2015-11-08 14:04:57 -08:00
Leonardo de Moura
bda0b038b0
fix(library/norm_num): include 'constants.h' instead of 'constants.cpp'
...
By including 'constants.cpp' we get compilation errors in some
platforms (e.g., 'g_one has been defined in multiple files...')
The module constants(.h/cpp) does not expose global variables such as g_one.
We have to use the procedures get_one_name() instead.
2015-11-08 14:04:56 -08:00
Rob Lewis
ce1cbcc205
feat(library/norm_num): give better error message when norm_num fails
2015-11-08 14:04:56 -08:00
Rob Lewis
eb0b688da8
style(library/norm_num): remove debug code
2015-11-08 14:04:56 -08:00
Rob Lewis
958add9ef8
feat(library/norm_num): fix numeral normalization to work on new numeral structure; add support for multiplication
2015-11-08 14:04:56 -08:00
Leonardo de Moura
f4ce2bcbfe
fix(library/CMakeLists): build
2015-11-08 14:04:56 -08:00
Leonardo de Moura
3b6eae1907
feat(library): start new type class resolution procedure
2015-11-08 14:04:56 -08:00
Leonardo de Moura
ee924e4842
fix(library/blast/infer_type): typos
2015-11-08 14:04:56 -08:00
Leonardo de Moura
4f394bd979
feat(library/meng_paulson): minor improvement
2015-11-08 14:04:56 -08:00
Leonardo de Moura
5b6b8257d8
chore(library/meng_paulson): fix style
2015-11-08 14:04:56 -08:00
Leonardo de Moura
ee347772d7
feat(library/meng_paulson): ignore class and class-instances when computing set of relevant theorems
2015-11-08 14:04:56 -08:00
Leonardo de Moura
023ec1ba76
feat(library): add Meng&Paulson heuristic for selecting theorems
2015-11-08 14:04:56 -08:00
Leonardo de Moura
d64b410bbd
feat(library): add declaration statistics
2015-11-08 14:04:56 -08:00
Leonardo de Moura
cd144993c0
chore(frontends/lean/prenum,library/tactic/rewrite_tactic): fix style
2015-11-08 14:04:56 -08:00
Leonardo de Moura
b777375469
fix(frontends/lean/parser): decimals
2015-11-08 14:04:56 -08:00
Leonardo de Moura
d1e111fd6c
fix(hott,frontends/lean,library,library/tactic): make sure we can still compile the HoTT library
2015-11-08 14:04:55 -08:00
Leonardo de Moura
26eb6fa849
feat(*): new numeral encoding
2015-11-08 14:04:55 -08:00
Leonardo de Moura
8ee214f133
checkpoint: new numeral encoding
2015-11-08 14:04:55 -08:00
Leonardo de Moura
744d1cba3d
feat(library,hott,frontends/lean): avoid keywords with hyphen
2015-11-08 14:04:54 -08:00
Sebastian Ullrich
6c34718cbc
chore(library,frontends/lean): remove option pp.extra_spaces
...
Obsoleted by improved pretty printer spacing
2015-10-13 09:52:35 -07:00
Leonardo de Moura
c5d614d4d9
feat(library/norm_num): store the local context
2015-10-08 13:22:37 -07:00
Leonardo de Moura
ce6e1c9694
feat(library/class_instance_synth): add helper mk_class_instance procedure
2015-10-08 13:10:41 -07:00
Leonardo de Moura
2c7d245bbe
fix(library/blast/blast): bug when translating goal metavariables into
...
blast mref's
2015-10-08 13:10:41 -07:00
Leonardo de Moura
5d3ed8a634
fix(library/blast/hypothesis): hypotheses are initially inactive
2015-10-08 13:10:41 -07:00
Leonardo de Moura
e4f0f6a9b4
feat(library): numeral normalization skeleton
2015-10-08 12:49:12 -07:00
Leonardo de Moura
3bb09e9959
fix(library/blast): typos
2015-10-06 08:35:24 -07:00
Leonardo de Moura
c626e2e3c6
refactor(library/blast): divide hypotheses in: assumption, active and todo
...
The sets active and todo are disjoint.
A metavariable declaration can only depend on assumptions.
2015-10-04 21:59:37 -07:00
Leonardo de Moura
44881552b4
refactor(library/blast): refactor hypothesis object: merge m_value and m_justification fields
2015-10-04 21:27:39 -07:00
Leonardo de Moura
7b883cae8f
feat(library/blast): simplify metavar_decl
2015-10-04 18:24:21 -07:00
Leonardo de Moura
4ab14e709e
feat(library/blast): finish is_def_eq/unifier for blast tactic
2015-10-03 18:19:05 -07:00
Leonardo de Moura
cd48114c47
fix(library/blast/infer_type): type of mref's
2015-10-02 15:53:22 -07:00
Leonardo de Moura
0a3fbda050
feat(library/blast): convert universe metavariables into uref's
2015-10-02 15:50:41 -07:00
Leonardo de Moura
442cbff578
feat(library/blast): add blast tactic is_def_eq procedure (aka unification)
...
We still have to implement subst_mref, assign_mref, and occurs check.
2015-10-02 15:21:28 -07:00
Leonardo de Moura
aadac02bec
feat(library/blast): add infer_type for blast tactic
2015-10-02 13:11:17 -07:00
Leonardo de Moura
ad51339a28
feat(library/blast): add whnf for blast tactic
2015-10-01 16:21:17 -07:00
Leonardo de Moura
68a34bd1ba
feat(library/projection): add get_projection_info_map
2015-10-01 16:10:27 -07:00
Leonardo de Moura
44baaac53e
feat(library/private): add is_private predicate
2015-09-30 18:50:09 -07:00
Leonardo de Moura
57035d3162
feat(kernel/level,library/blast/expr): add universe level hash consing support in the kernel, simplify blast/expr even more
2015-09-30 13:31:42 -07:00
Leonardo de Moura
ac7c0fffd8
refactor(library/blast): simplify blast/expr
2015-09-30 12:54:03 -07:00
Leonardo de Moura
63c8966816
refactor(library/blast): change how we mark fixed/frozen hypothesis
2015-09-29 14:08:14 -07:00
Leonardo de Moura
eff60d835a
fix(library/blast/expr): typo
2015-09-29 12:44:56 -07:00
Leonardo de Moura
bce193ed2d
feat(library/blast/state): make sure the type/value of hypotheses and target is a closed term.
2015-09-29 12:42:20 -07:00
Leonardo de Moura
352d81e56a
feat(library/blast/state): add assertion to make sure blast state does not contain local constants.
2015-09-29 12:32:42 -07:00
Leonardo de Moura
c652eeeac6
feat(library/data/expr): add support for regular local constants in blast tactic
...
We need them when inferring types and checking whether two expressions
are definitionally equal or not.
Remark: they are temporary objects, and should never be included in the
blast state object.
2015-09-29 12:29:33 -07:00
Leonardo de Moura
21193156ef
refactor(library/blast): rename lref to href (hypothesis reference)
2015-09-29 12:13:20 -07:00
Leonardo de Moura
58b06d12b0
feat(library/kernel_bindings): expose get_ios in the Lua API
...
It gives access to the global io_state object.
2015-09-29 10:55:08 -07:00
Leonardo de Moura
be76512756
feat(library/blast/blast): normalize hypotheses and unfold reducible constants when converting goal into blast state
2015-09-29 10:42:35 -07:00
Leonardo de Moura
ca059107cf
fix(library/blast/state): incorrect 'replace'
2015-09-29 10:42:00 -07:00
Leonardo de Moura
df39d2f368
feat(library/blast): add helper functions to access blast tactic thread local state/context
2015-09-29 10:04:11 -07:00
Leonardo de Moura
9622b62537
fix(library/blast/blast): update local2lref
2015-09-29 09:31:25 -07:00
Leonardo de Moura
459f31f28b
feat(library/blast): add basic blast_exception
2015-09-29 09:02:58 -07:00
Leonardo de Moura
cb31189c30
chore(library/blast/branch): fix style
2015-09-28 19:07:43 -07:00
Leonardo de Moura
48e8b8b866
feat(library/blast): basic sanity checking for blast data-structures
2015-09-28 18:55:24 -07:00
Leonardo de Moura
465a939146
feat(library/bast): convert a blast branch back into a goal
2015-09-28 18:28:11 -07:00
Leonardo de Moura
3f751c170b
feat(library/blast): finish goal -> state translation
2015-09-28 17:39:30 -07:00
Leonardo de Moura
913d4526cd
feat(library/blast/expr): improve performance of abstract_lrefs
2015-09-28 16:42:55 -07:00
Leonardo de Moura
885f5745c4
refactor(library/blast): revise how goal meta-vars are compiled into blast mrefs
2015-09-28 16:40:19 -07:00
Leonardo de Moura
d3937aa02d
refactor(library/blast): use simpler encoding for lref and mref
2015-09-28 13:02:15 -07:00
Leonardo de Moura
f01fd744cf
feat(library/blast): convert goal into blast state
2015-09-25 14:44:00 -07:00
Leonardo de Moura
33f46fd137
feat(library/blast): parse blast tactic and invoke stub
2015-09-25 12:45:16 -07:00
Leonardo de Moura
e5b2cd1564
refactor(library/blast): rename goal to branch
2015-09-25 11:58:51 -07:00
Leonardo de Moura
86e8508711
refactor(library/blast): we don't need blast::justification
2015-09-23 18:13:18 -07:00
Leonardo de Moura
7be1c015d1
checkpoint
2015-09-23 00:42:36 -07:00
Leonardo de Moura
2411fa3d2b
feat(library/blast/expr): add instantiate_rev
2015-09-21 17:12:45 -07:00
Leonardo de Moura
c5921fca6d
refactor(library/blast): remove dead code
...
We don't need context anymore. The "context" is the blast goal object.
2015-09-21 16:22:53 -07:00
Leonardo de Moura
c0cf54e8d4
chore(library/blast): fix compilation warning
2015-09-21 16:21:21 -07:00
Leonardo de Moura
bb24421232
feat(library/blast): add hash consing for expressions (and universe levels) created in blast
...
We had to reimplement the expr API: replace, abstract, instantiate.
Remark: blast expressions do not use metavariables and local constants,
but the new mref and lref expressions.
2015-09-21 16:17:11 -07:00
Leonardo de Moura
dd5bb8e7f7
chore(library/tactic/apply_tactic): remove dead code
2015-09-16 08:41:02 -07:00
Leonardo de Moura
b7271c39af
chore(library/blast,runtime/cpp): fix style
2015-09-16 07:50:00 -07:00
Leonardo de Moura
5028d794ce
refactor(library,library/blast): move context to blast
2015-09-16 07:49:39 -07:00
Leonardo de Moura
00a59a50b6
feat(library/context): add "context"-like object
2015-09-15 17:14:39 -07:00
Leonardo de Moura
df3100d2cd
fix(library/local_context): bug in abstract_locals procedure
2015-09-12 17:17:13 -07:00
Leonardo de Moura
d3e6880df0
chore(compiler/util,library/aux_recursors): fix style
2015-09-11 23:27:43 -07:00
Leonardo de Moura
8666c92bae
feat(library,library/definitional): tag auxiliary recursors automatically generated by Lean
2015-09-11 10:08:54 -07:00
Rob Lewis
8e428f2d3f
fix(src/library/definitional/equations.cpp): fix typo in error message
2015-09-11 08:52:53 -07:00
Leonardo de Moura
634c0b5e9d
feat(library/tactic,frontends/lean): propagate new options back to elaborator
2015-09-02 20:34:14 -07:00
Leonardo de Moura
08169c5ac2
fix(library/unifier): fixes #809
...
Daniel is correct when he says the interaction between choice
case-splits, delta case-splits, and coercions can be subtle.
I believe the following condition
https://github.com/leanprover/lean/blob/master/src/frontends/lean/elaborator.cpp#L111
reduces counter-intuitive behavior. Example, the coercion should not
influence the resulting type.
BTW, by removing this condition, many files in the library broke when I
tried to compile from scratch
make clean-olean
make
I used the following workaround. Given a delta-delta constraint
f a =?= f b
If the terms are types, and no case-split will be performed, then
the delta-delta constraint is eagerly solved.
In principle, we don't need the condition that the terms are types.
However, many files break if we remove it. The problem is that many files in the standard
library are abusing the higher-order unification procedure. The
elaboration problems are quite tricky to solve.
I use the extra condition "the terms are types" because usually if they
are, "f" is morally injective, and we don't really want to unfold it.
Note that the following two cases do not work
check '{1, 2, 3}
check insert 1 (insert 2 (insert 3 empty))
Well, they work if we the num namespace is open, and they are
interpreted as having type (finset num)
2015-08-31 17:59:30 -10:00
Leonardo de Moura
45163acf25
refactor(kernel/inductive): use local constants to represent introduction rules
2015-08-25 03:46:28 -07:00
Leonardo de Moura
a3c404ac3b
feat(library/tactic/apply_tactic): do not report elaboration failure in apply tactic when proof_state.report_failure() is false
2015-08-21 15:45:52 -07:00
Daniel Selsam
0942e94321
fix(library/export): typos
2015-08-18 17:49:03 -07:00
Leonardo de Moura
2b52198702
fix(library/unfold_macros): fixes #806
2015-08-18 17:46:47 -07:00
Leonardo de Moura
cb7ca51dcb
feat(library/unfold_macros): avoid unnecessary get_value
2015-08-17 13:03:08 -07:00
Leonardo de Moura
933850e0d1
fix(library/shared_environment): compilation warning
2015-08-17 08:41:12 -07:00
Leonardo de Moura
eb8f586dba
fix(library/normalize): fixes #801
2015-08-16 14:22:02 -07:00
Leonardo de Moura
7bc8673786
feat(library/module): efficient inductive_reader
...
Do not check imported inductive declarations when trust level is greater than 0.
2015-08-15 14:48:49 -07:00
Leonardo de Moura
e80d9685e5
refactor(kernel/inductive): add certified_inductive_decl object
...
We will use this object to implement a more efficient import procedure
2015-08-15 13:26:38 -07:00
Leonardo de Moura
b21d85d19e
chore(library/coercion): fix style
2015-08-14 18:49:01 -07:00
Daniel Selsam
7223293a93
feat(library/coercion): improve error message when coercion has no viable source
2015-08-14 18:44:44 -07:00
Daniel Selsam
5bef45b1fd
feat(library/coercion): improve error message when target is unacceptable
2015-08-14 18:44:44 -07:00
Daniel Selsam
f4e1e9d671
feat(library/coercion): closes #794
...
Include level information in primary coercion error message if
pp_options are set to display levels.
2015-08-14 18:44:43 -07:00
Leonardo de Moura
6c934229f7
feat(kernel,library/module): only module reader can add declarations without type-checking them
2015-08-14 18:37:17 -07:00
Leonardo de Moura
d1f13d2871
perf(library/module): skip checksum if trust level is very high
2015-08-14 18:23:12 -07:00
Leonardo de Moura
cc8b5d2d6e
perf(library/unfold_macros): skip contains_untrusted_macro if trust level is very high
2015-08-14 18:10:19 -07:00
Leonardo de Moura
849b99d244
perf(library/module): use block read
2015-08-14 17:56:21 -07:00
Leonardo de Moura
5a6a4b45c1
fix(library/definitional/equations): fixes #796
2015-08-14 14:39:23 -07:00
Leonardo de Moura
498afc1e6f
feat(CMakeLists): add shared library
2015-08-13 11:21:05 -07:00
Leonardo de Moura
5d8d226640
fix(frontends/lean/parser): add support for decimals
...
Decimal numbers are notation for rationals.
If rat.of_num is not available, then an error is generated.
closes #793
2015-08-11 18:44:48 -07:00
Leonardo de Moura
0b8f57841a
feat(frontends/lean/decl_cmds): closes #791
2015-08-11 17:53:33 -07:00
Leonardo de Moura
23118371d1
refactor(library/aliases): cleanup
2015-08-11 06:41:56 -07:00
Leonardo de Moura
dc2e702373
feat(library/unifier): generate approximate solution for universe constraints of the form (max u ?m =?= max u v)
...
closes #777
2015-08-08 09:29:59 -07:00
Leonardo de Moura
d46dbce86e
feat(library/tactic/tactic): apply substitution in 'then' combinator
...
closes #778
2015-08-08 03:42:21 -07:00
Leonardo de Moura
6a079fdd2d
fix(library/tactic/exact_tactic): fixes #779
2015-08-07 13:29:22 -07:00
Leonardo de Moura
f264adfa92
fix(library/export): bug in --export-all option
2015-07-30 17:23:38 -07:00
Leonardo de Moura
9bf64c10fd
feat(library/export): export the whole environment when using "--expor-all"
2015-07-30 15:04:49 -07:00
Leonardo de Moura
b3707ab54a
feat(library/tactic/unfold_rec): fixes #753
2015-07-29 17:13:02 -07:00
Leonardo de Moura
308af87b69
feat(library): add 'noncomputable' keyword for the standard library
2015-07-28 21:56:35 -07:00
Leonardo de Moura
a009db2902
feat(library): add module for tracking noncomputable definitions
2015-07-28 18:15:26 -07:00
Leonardo de Moura
80e3da0526
fix(library/util): fixes #751
2015-07-28 16:30:20 -07:00
Leonardo de Moura
ad5d792a8e
feat(library,shell): add --export-all command line option
2015-07-28 15:54:44 -07:00
Leonardo de Moura
0dc8dc999e
fix(library/tactic/rewrite_tactic): crash when trying to unfold constructor
2015-07-28 12:43:56 -07:00
Daniel Selsam
ee11fca69b
refactor(src/library/export): disambiguate export keywords
2015-07-27 19:08:26 -07:00
Daniel Selsam
214b5b8b58
refactor(src/library/export): prefix export keywords with #
2015-07-27 15:07:12 -07:00
Leonardo de Moura
b2bd6b1ff8
feat(library/simplifier): simplification sets for hypothesis and conclusion
2015-07-27 14:59:21 -07:00
Leonardo de Moura
966e0109ff
feat(library/simplifier): initialize simplification set.
2015-07-27 14:59:21 -07:00
Leonardo de Moura
5c7a20e5bd
fix(library/unifier): crash when unifying constraints of the form (pr t =?= s)
...
where pr is a projection and t is a stuck term
see issue #737
2015-07-24 11:52:46 -07:00
Leonardo de Moura
bcf057f4f3
feat(frontends/lean): display '[congr]' attribute when printing theorems
2015-07-23 18:52:59 -07:00
Leonardo de Moura
3e6b80d38c
feat(library/util): disable local constant purification when pretty printing goals
...
This feature generates confusion.
2015-07-23 18:52:59 -07:00
Leonardo de Moura
f1a19a10c4
fix(library/util): incorrect hypothesis renaming when pretty printing goals
2015-07-23 18:52:59 -07:00
Leonardo de Moura
e221d38790
feat(library/tactic/assert_tactic): allow duplicate names for hypotheses in assert tactic
2015-07-23 18:52:59 -07:00
Leonardo de Moura
5f4576a7f7
test(tests/lean): add test for '[congr]' attribute validation
2015-07-23 18:52:59 -07:00
Leonardo de Moura
844caf32e4
feat(frontends/lean/bultin_cmds): add 'print [congr]' command for displaying active congruence rules
2015-07-23 18:52:59 -07:00
Leonardo de Moura
3329dc0ec7
feat(library/simplifier/simp_rule_set): add '[congr]' attribute validation
2015-07-23 18:52:58 -07:00
Leonardo de Moura
933f056fff
feat(library/simplifier): add API for extracting simplification rules defined in a given namespace
2015-07-22 18:47:56 -07:00
Leonardo de Moura
18dd7c13f9
feat(frontends/lean): add '[congr]' attribute
2015-07-22 17:21:47 -07:00
Leonardo de Moura
a07b42ad9e
refactor(library/simplifier): the simplifier expects relations to be transitivie and reflexive
2015-07-22 15:46:00 -07:00
Leonardo de Moura
8085123119
refactor(library/simplifier): rename 'rewrite_rule' to 'simp_rule'
2015-07-22 10:39:30 -07:00
Leonardo de Moura
092c8d05b9
feat(frontends/lean,library): rename '[rewrite]' to '[simp]'
2015-07-22 09:01:42 -07:00
Leonardo de Moura
b5c287d3d1
refactor(library/simplifier): cleanup
2015-07-22 08:39:55 -07:00
Leonardo de Moura
e74c6eef3d
feat(library/simplifier): add 'simp.funext' and 'simp.propext' options
2015-07-21 18:23:10 -07:00
Leonardo de Moura
0c0f07332e
feat(library/simplifier/simp_tactic): add simp tactic configuration options
2015-07-21 16:15:04 -07:00
Leonardo de Moura
b02b3d362f
feat(library/simplifier): add simplifier procedure skeleton
2015-07-21 15:08:56 -07:00
Leonardo de Moura
f5c546e810
feat(frontends/lean/parse_simp_tactic): add simp tactic parser
2015-07-14 14:21:39 -04:00
Leonardo de Moura
3ab0e07ba9
feat(frontends/lean): add simp tactic frontend stub
...
This commit also removes the fake_simplifier. It doesn't work anymore
because simp is now a reserved word.
2015-07-14 09:54:53 -04:00
Leonardo de Moura
84b439507b
chore(library/tactic): fix style
2015-07-13 19:43:33 -04:00
Leonardo de Moura
c2edc330ef
fix(library/tactic/rewrite_tactic): remove incorrect assertion
2015-07-13 19:19:12 -04:00
Leonardo de Moura
9c5bf98ed6
feat(library/tactic): add 'with_options' tactical
...
see issue #494
2015-07-13 18:34:31 -04:00
Leonardo de Moura
0f714e36b0
feat(library/tactic): add 'location' macro
2015-07-13 17:56:42 -04:00
Leonardo de Moura
58291024a9
fix(library/simplifier/ceqv): polish conditional rewrite internalization procedure
2015-07-13 16:40:18 -04:00
Leonardo de Moura
3cb8568fb5
feat(library/simplifier): we can "rewrite" with transitive relations
...
The simplifier does not really need the relation to be an equivalence.
Transitivity is the main required property (we need to chain rewrites
together).
2015-07-12 14:24:05 -04:00
Leonardo de Moura
4c0a656ecc
fix(library/tactic/unfold_rec): support indexed families + brec_on at unfold_rec
...
see issue #692
2015-07-12 12:45:05 -04:00
Leonardo de Moura
584f9e3f49
fix(library/tactic/unfold_rec): support indexed families at unfold_rec
...
This commit also removes many (now unnecessary) folds from the HoTT
library.
See issue #692
We still have to implement support for recursive definitions based on
brec_on that recurse over inductive families.
2015-07-12 12:32:58 -04:00
Leonardo de Moura
7fa5c3e5da
feat(library/tactic/unfold_rec): take '[recursor]' annotations into account at unfold_rec
2015-07-12 11:33:40 -04:00
Leonardo de Moura
b0ac78c2cb
feat(library/user_recursors): add is_user_defined_recursor predicate
2015-07-12 11:25:50 -04:00
Leonardo de Moura
8e8e08cfe7
feat(library/tactic): use occurrence object in unfold tactic family
2015-07-11 18:53:45 -04:00
Leonardo de Moura
554a42b407
fix(library/tactic/unfold_rec): add annother brec pattern that should be checked in the unfold recursive definition tactic
2015-07-10 22:16:23 -04:00
Leonardo de Moura
a9515ac7a4
feat(library/tactic/rewrite_tactic): try to fold nested recursive applications after unfolding a recursive function
...
See issue #692 .
The implementation still has some rough spots.
It is not clear what the right semantic is.
Moreover, the folds in e_closure could not be eliminated automatically.
2015-07-08 21:19:18 -04:00
Leonardo de Moura
6ffbb05118
feat(library/definitional/no_confusion): add [unfold] hint to no_confusion
2015-07-07 20:07:13 -07:00
Leonardo de Moura
26574e29a9
feat(library/normalize,frontends/lean): allow multiple arguments in [unfold] hint
...
closes #693
2015-07-07 18:01:57 -07:00
Leonardo de Moura
4b1b3e277f
feat(frontends/lean): rename '[unfold-c]' to '[unfold]' and '[unfold-f]' to '[unfold-full]'
...
see issue #693
2015-07-07 16:37:06 -07:00
Leonardo de Moura
991ff67b45
refactor(library/relation_manager): cleanup and add API for declaring a relation that may not be reflexive, symmetric nor transitive
2015-07-07 15:58:24 -07:00
Leonardo de Moura
7de7c5b73d
feat(library/definitional/projection): define projections using auxiliary macro
2015-07-02 10:49:49 -07:00
Leonardo de Moura
c15bcf1354
refactor(library/projection): remove projection macro from library
2015-07-02 08:48:13 -07:00
Leonardo de Moura
dd145926a2
fix(library/coercion): compilation warning
2015-07-02 07:26:00 -07:00
Leonardo de Moura
4ae9f3ea81
feat(library/coercion): new coercion manager
...
closes #668
2015-07-01 16:32:34 -07:00
Leonardo de Moura
fe26c37fcb
refactor(library/tc_multigraph): improve tc_multigraph API
2015-07-01 16:01:40 -07:00
Leonardo de Moura
765865ed41
chore(library/tc_multigraph): remove dead code
2015-07-01 15:48:55 -07:00
Leonardo de Moura
d44d576194
refactor(library/coercion): simplify coercion module API
2015-07-01 14:40:12 -07:00
Leonardo de Moura
d5c38777af
refactor(library/coercion): simplify coercion_class
2015-07-01 14:29:23 -07:00
Leonardo de Moura
0f5b7a36f5
chore(library/coercion): remove lua bindings for coercion module
...
Reason: we will refactor the coercion module.
See issue #668
2015-07-01 14:08:49 -07:00
Leonardo de Moura
880f212494
feat(library/class): allow transitive instances that have instances arguments
2015-06-30 14:54:12 -07:00
Leonardo de Moura
d20f831602
feat(library/class): add is_derived_trans_instance predicate
2015-06-30 13:59:02 -07:00
Leonardo de Moura
772ed111e5
refactor(kernel): move extra_opaque_converter to kernel, and rename it to hint_converter
2015-06-30 12:59:28 -07:00
Leonardo de Moura
e635d9be9f
refactor(kernel): rename get_weight to get_height at declaration
...
Motivation:
- It is the standard name for the concept: declaration height
- Avoid confusion with the expression weight
2015-06-30 12:59:10 -07:00
Leonardo de Moura
b5444c1314
refactor(frontends/lean/builtin_cmds): allow "constant" edges in the instance transitive closure graph
2015-06-29 18:57:05 -07:00
Leonardo de Moura
0fc2efe88e
fix(library/tactic/rewrite_tactic): fixes #702
2015-06-28 20:37:17 -07:00
Leonardo de Moura
1b864a838f
fix(library/tactic/induction_tactic.cpp): condition for checking whether 'induction' tatic is applicable or not
...
fixes #690
2015-06-28 13:07:02 -07:00
Leonardo de Moura
88844f6261
chore(src/library/user_recursors): add missing include
2015-06-28 12:53:48 -07:00
Leonardo de Moura
2f75768243
feat(library/tactic/rewrite_tactic): fail when nothing is rewritten
...
fixes #686
2015-06-28 12:05:00 -07:00
Leonardo de Moura
8616ed096e
fix(library/composition_manager): typo
2015-06-27 14:12:26 -07:00
Leonardo de Moura
ca0aa4eb47
feat(library/composition_manager): simplify compositions of the form (mk ... (proj (mk ...)) ...)
...
closes #666
2015-06-27 14:07:32 -07:00
Leonardo de Moura
430dc21a28
feat(library/composition_manager): disable conversion optimization for automatically generated compositions
...
see issue #666
2015-06-27 14:07:22 -07:00
Leonardo de Moura
bd0e9d958d
feat(library/tc_multigraph): shorter names for transitive edges
...
see issue #666
2015-06-27 14:07:15 -07:00
Leonardo de Moura
859ef441a0
feat(library/class): transitive instances
...
see issue #666
2015-06-27 14:06:56 -07:00
Leonardo de Moura
68785b8bed
fix(library/tactic/generalize_tactic): fixes #711
2015-06-26 19:35:30 -07:00
Leonardo de Moura
1886b71c17
fix(library/unifier): fixes #705
2015-06-26 19:10:46 -07:00
Leonardo de Moura
e3e9220ab9
fix(library/tactic/rewrite_tactic): fixes #708
2015-06-26 18:41:08 -07:00
Leonardo de Moura
c61e6f6595
feat(library/unifier): add new rule for constraints of the form (pr ...) =?= t, where (pr ...) is a "stuck" projection application
2015-06-26 17:18:29 -07:00
Leonardo de Moura
0b7859f387
feat(library,frontends/lean): add support for projections in the elaborator
...
The idea is to simulate the computation rules such as
pr1 (mk a b) ==> a
in the elaborator
2015-06-26 17:18:29 -07:00
Leonardo de Moura
31a4ee2ac3
fix(library/inductive_unifier_plugin): avoid potential assertion violation
2015-06-26 17:18:29 -07:00
Leonardo de Moura
a680114fd8
fix(library/tactic/rewrite_tactic): potential crash in the rewrite tactic
2015-06-26 17:18:29 -07:00
Leonardo de Moura
5581b735f4
feat(library/constants.txt): add poly_unit and poly_unit.star
2015-06-25 17:36:34 -07:00
Floris van Doorn
fa1979c128
feat(datatypes): let the type of unit be the lowest non-Prop universe
...
The definitional package (brec_on and cases_on) now use poly_unit instead of unit
closes #698
2015-06-25 17:33:46 -07:00
Leonardo de Moura
5687c24944
refactor(library/tactic/induction_tactic): cleanup
2015-06-22 10:23:54 -07:00
Leonardo de Moura
aeea8f83c4
feat(library/composition_manager): check if existing definition is definitionally equal
2015-06-21 16:53:08 -07:00
Leonardo de Moura
b8243934de
feat(library/tc_multigraph): finish transitive closed multigraph
2015-06-20 20:25:20 -07:00
Leonardo de Moura
c6ad37a651
chore(src/library/tc_multigraph): fix typo
2015-06-19 21:12:11 -07:00
Leonardo de Moura
6872761c67
fix(library/tc_multigraph): typos
2015-06-19 20:11:31 -07:00
Leonardo de Moura
1f753aeccb
feat(library): add tc_multigraph skeleton
2015-06-19 20:05:05 -07:00
Leonardo de Moura
70fc05294b
refactor(library/local_context): avoid hack in local_context
2015-06-18 15:41:00 -07:00
Leonardo de Moura
694eef7f6a
fix(util/sexpr/format): retract change that may be creating problems for emscripten
2015-06-18 10:49:13 -07:00
Leonardo de Moura
a4c0699e81
feat(library/tactic/constructor_tactic): restore 'constructor' tactic old semantics, add 'fconstructor' tactic
...
See issue #676
Add new test demonstrating why it is useful to have the old semantics
for 'constructor'
2015-06-17 23:48:54 -07:00
Leonardo de Moura
bf71d9f342
fix(library/tactic/rewrite_tactic): fixes #682
2015-06-17 18:49:02 -07:00
Leonardo de Moura
ce8f2a1674
feat(library/class): allow any constant to be marked as a class
...
closes #679
2015-06-17 16:26:45 -07:00
Leonardo de Moura
c59e1f49db
feat(library): add composition manager
2015-06-17 14:41:50 -07:00
Leonardo de Moura
14c33c4e01
feat(kernel/error_msgs): add workaround for issue #669
...
This issue should fix the new problem reported at #669 .
It only disables beta-reduction in the pretty printer for application
type mismatch at (f n) when f is a lambda expression.
2015-06-17 12:00:25 -07:00
Leonardo de Moura
f60cdee14b
fix(library/tactic/rewrite_tactic): memory leak
2015-06-16 15:47:21 -07:00
Leonardo de Moura
0ae24faae3
feat(library/tactic/constructor_tactic): use 'fapply' in 'constructor' tactic
...
closes #676
2015-06-16 12:03:31 -07:00
Leonardo de Moura
2277b170f6
feat(library/tactic/exact_tactic): use 'append' instead of 'orelse' at eassumption 'tactic'
2015-06-16 11:58:10 -07:00
Leonardo de Moura
169f956143
fix(library/tactic): remove dead code
2015-06-16 11:57:37 -07:00
Leonardo de Moura
d8620ef4c9
fix(kernel,library,frontends/lean): improve error messages
...
see #669
2015-06-14 19:44:00 -07:00
Leonardo de Moura
8699d2dfb7
feat(library/tactic/rewrite_tactic): display list of overloads occurring in a failed rewrite step
2015-06-14 16:30:18 -07:00
Leonardo de Moura
9fbf267a3f
feat(library/tactic/rewrite_tactic): when 'rewrite' step fails apply esimp and try again
...
closes #670
2015-06-12 19:48:58 -07:00
Leonardo de Moura
7bad9fe554
feat(library/error_handling/error_handling): set 'pp.beta' to false when displaying errors
...
see issue #669
2015-06-12 14:46:51 -07:00
Leonardo de Moura
69be4c720c
fix(library/tactic/subst_tactic): bug in 'subst' tactic
2015-06-12 12:11:44 -07:00
Leonardo de Moura
25cbc5c154
fix(kernel/expr): remove 'cast_binder_info'
...
We should put it back when we decide to implement it.
We also fix the bogus comment at src/frontends/lean/parser.cpp.
see issue #667
2015-06-11 18:11:22 -07:00
Leonardo de Moura
8b7dc4e03a
feat(frontends/lean): apply eta-reduction in postprocessing step
...
Perhaps, we should add an option to disable this new feature.
Remark: this commit makes commit 46d418a
redundant.
I'm keeping 46d418a
because we may retract this commit in the future.
2015-06-10 16:29:30 -07:00
Leonardo de Moura
46d418af3d
feat(library/abbreviation): apply eta-reduction when expanding abbreviations
2015-06-10 14:52:59 -07:00
Leonardo de Moura
f3d50963ce
fix(library/idx_metavar): compilation problem in debug mode
2015-06-09 14:37:17 -07:00
Leonardo de Moura
e3a0e62859
fix(library/unifier): try to generate approximate solution for flex-flex constraints before discarding them
...
fixes #662
2015-06-09 14:36:31 -07:00
Leonardo de Moura
f7dd85a935
chore(*): fix 'breif' typos
2015-06-08 16:54:55 -07:00
Leonardo de Moura
627e05c9e6
fix(library/tactic/rewrite_tactic): improve krewrite
2015-06-08 16:46:28 -07:00
Leonardo de Moura
d6a483fe84
feat(library): add idx_metavar module
2015-06-08 16:02:37 -07:00
Leonardo de Moura
496189feed
feat(kernel/default_converter): cache failures for (f t =?= f s) heuristic
...
See item 4 at
https://groups.google.com/forum/?utm_medium=email&utm_source=footer#!msg/lean-discuss/oJXwW5wT2Ds/d1Dgr8B-pE0J
See also
https://github.com/leanprover/lean/pull/659
2015-06-08 10:41:30 -07:00
Leonardo de Moura
0e099b5fd8
feat(library/tactic/rewrite_tactic): apply beta&eta reduction before rewriting steps, add option 'rewrite.beta_eta' (default true) to control new feature.
2015-06-06 20:43:52 -07:00
Leonardo de Moura
1cbace9df6
feat(library/tactic/congruence_tactic): add congruence lemma generator
...
The generated congruence theorems ignore arguments that are subsingleton types.
2015-06-05 22:00:10 -07:00
Leonardo de Moura
d0d3f9bb41
refactor(kernel,library,frontends/lean): add helper functions, and cleanup collect_locals
2015-06-05 17:29:36 -07:00
Leonardo de Moura
c76d92284f
feat(library/pp_options): add 'pp.all' option
2015-06-05 08:41:46 -07:00
Leonardo de Moura
c8ad1874a2
fix(library/util): compilation error in debug mode
2015-06-03 17:39:03 -07:00
Leonardo de Moura
68688ecdf6
fix(library/tactic/subst_tactic): in the standard mode, use dependent elimination in the subst tactic (when needed)
...
Before this commit, the subst tactic was producing an type incorrect
result when dependent elimination was needed (see new test for an example).
2015-06-03 17:36:04 -07:00
Leonardo de Moura
dce86b3a84
feat(library/init/logic): add 'eq.drec' (in standard Lean) with a signature very similar to eq.rec
in the HoTT library
2015-06-03 17:29:26 -07:00
Leonardo de Moura
b2f8d2000c
fix(library/simplifier/rewrite_rule_set): avoid compiler specific behavior
2015-06-01 22:23:34 -07:00
Leonardo de Moura
d6997300f1
fix(library/private): use environment fingerprint to compute private decls "unique" identifier
...
fixes #648
2015-06-01 22:21:31 -07:00
Leonardo de Moura
4ace996057
fix(library/simplifier): bug in is_permutation_ceqv
2015-06-01 18:07:31 -07:00
Leonardo de Moura
0fbc944cdd
feat(frontends/lean): add '[rewrite]' attribute
2015-06-01 17:58:24 -07:00
Leonardo de Moura
d547698a56
refactor(library,library/tactic): move class_instance_synth to library
...
This module will be needed by the simplifier
2015-06-01 16:30:40 -07:00
Leonardo de Moura
8a89588079
refactor(library,library/tactic): move auxiliary procedures from tactic to library
2015-06-01 16:19:55 -07:00
Leonardo de Moura
b62e6bb133
feat(library/simplifier): add rewrite rule sets
2015-06-01 15:15:57 -07:00
Leonardo de Moura
780d313686
fix(library/annotation): add missing == and hash methods for annotation class
...
We have multiple annotations. The default == and hash methods were
ignoring that.
2015-06-01 11:27:46 -07:00
Leonardo de Moura
ca110012d8
feat(library/tactic): automate "generalize-intro-induction/cases" idiom
...
closes #645
2015-05-30 21:57:28 -07:00
Leonardo de Moura
6d2f37857d
feat(frontends/lean/builtin_cmds): add 'print [reducible]', 'print [irreducible]' and 'print [quasireducible]' commands
2015-05-29 16:47:29 -07:00
Leonardo de Moura
c07d14e94a
fix(library/tactic/rewrite_tactic): incorrect assertion
2015-05-29 15:59:03 -07:00
Leonardo de Moura
0ceedbe69e
fix(library/normalize): fixes #640
2015-05-29 15:58:59 -07:00
Leonardo de Moura
f48cdccd20
fix(frontends/lean/pp): abbreviation with parameters
...
closes #639
2015-05-29 15:13:31 -07:00
Leonardo de Moura
a071012346
fix(frontends/lean/pp,library/head_map): handle 'as_atomic' annotation
...
This commit fixes local notation that contains parameters
see issue #639
2015-05-29 14:51:28 -07:00
Leonardo de Moura
ae0bdaa836
chore(library,util): fix style
2015-05-27 16:46:58 -07:00
Leonardo de Moura
d95c064a29
feat(library/simplifier/ceqv): add to_ceqv procedure
2015-05-27 16:35:56 -07:00
Leonardo de Moura
85409a59d3
feat(library/tactic/rewrite_tactic): add xrewrite and krewrite tactic variants
...
closes #511
2015-05-27 16:32:43 -07:00
Leonardo de Moura
7d73f4f091
refactor(library,frontends/lean): simplify the creation of custom normalizers
2015-05-27 15:33:20 -07:00
Leonardo de Moura
dc6411b903
feat(library/inductive_unifier_plugin): restrict rule that was generating non-terminating behavior
...
see issue #632
2015-05-27 14:41:12 -07:00
Leonardo de Moura
47e5633498
feat(frontends/lean/calc_proof_elaborator): avoid unnecessary unfolding in the calc tactic
2015-05-27 12:07:39 -07:00
Leonardo de Moura
77f742ae8e
feat(library/relation_manager): add auxiliary functions
2015-05-27 12:07:06 -07:00
Leonardo de Moura
ea43f3ea80
fix(frontends/lean/builtin_cmds): fixes #630
2015-05-26 22:19:42 -07:00
Leonardo de Moura
ed01242bc1
chore(library/tactic/apply_tactic): remove dead code
2015-05-26 12:18:50 -07:00
Leonardo de Moura
7f0951b8e7
feat(library/tactic): improve assumption tactic performance
2015-05-25 20:22:37 -07:00
Leonardo de Moura
d0987eb3ac
feat(library/tactic): add 'subtvars' tactic
2015-05-25 16:36:44 -07:00