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
66a59d5b51
feat(frontends/lean/util): remove hack that overrides priority namespace
...
closes #789
2015-08-11 18:01:40 -07:00
Leonardo de Moura
0b8f57841a
feat(frontends/lean/decl_cmds): closes #791
2015-08-11 17:53:33 -07:00
Daniel Selsam
40471ca8e3
doc(frontends/lean/elaborator): assert invariant in visit_app
2015-08-11 17:02:38 -07:00
Leonardo de Moura
23118371d1
refactor(library/aliases): cleanup
2015-08-11 06:41:56 -07:00
Leonardo de Moura
1f34c72192
fix(frontends/lean/parser): fixes #770
2015-08-08 09:48:31 -07:00
Leonardo de Moura
6c5832a564
feat(frontends/lean/decl_cmds): allow recursive examples
...
closes #774
2015-08-08 08:26:25 -07:00
Leonardo de Moura
06f20694c8
fix(frontends/lean/builtin_exprs): fixes #768
2015-08-08 04:20:17 -07:00
Leonardo de Moura
5568085ab9
fix(frontends/lean/elaborator): closes #771
...
Produce nicer error message when type/goal is a metavariable and
universe metavariables have already been instantiated with universe
parameters.
2015-08-07 13:29:22 -07:00
Leonardo de Moura
f21647899f
feat(frontends/lean/builtin_exprs): rename 'show' hidden name to 'this'
...
This is useful if 'show' is recursive
2015-08-07 13:29:21 -07:00
Leonardo de Moura
60ba3d15ff
feat(library/data/matrix): add basic matrix module
2015-08-01 19:33:31 +01:00
Leonardo de Moura
1f304ad4b9
fix(frontends/lean/pp): pretty printing 'binder'
...
This commit also replaces many occurrences of 'binders' with 'binder'.
2015-07-31 11:27:38 -07:00
Leonardo de Moura
8f5a760b89
feat(frontends/lean/elaborator): display the whole proof state in option "--goal"
...
see issue #755
2015-07-31 08:56:17 -07:00
Leonardo de Moura
656b642c4a
fix(frontends/lean): identifier size when using unicode
...
see issue #756
2015-07-30 11:32:24 -07:00
Leonardo de Moura
a39cac4fad
feat(frontends/lean): improve '--info' command line option
...
see issue #756
2015-07-30 11:05:39 -07:00
Leonardo de Moura
cc4f18c062
feat(frontends/lean): add "--info" command line option for extracting identifier/keyword information
...
see issue #756
2015-07-30 10:18:03 -07:00
Leonardo de Moura
be61fb0566
feat(frontends/lean/elaborator): add "noncomputable theory" command, display "noncomputable" when printing definitions
...
When the command "noncomputable theory" is used, Lean will not sign an
error when a noncomputable definition is not marked as noncomputable
2015-07-29 17:54:35 -07:00
Leonardo de Moura
384ccf2b6c
feat(frontends/lean/elaborator): change behavior of "show goal" for incomplete "by tactic"
...
If "by tactic" did not completely solved the goal, then we show the
final state when the user presses "C-c C-g"
2015-07-29 17:34:42 -07:00
Leonardo de Moura
ed41a01a51
fix(frontends/lean/elaborator): fixes #755
2015-07-29 16:41:30 -07:00
Leonardo de Moura
0bda39c8ac
feat(frontends/lean): check for noncomputability when moving theorems from theorem_queue to environment
2015-07-29 13:01:07 -07:00
Leonardo de Moura
69ead0ddd8
feat(frontends/lean/decl_cmds): reject unnecessary "noncomputable" annotations
2015-07-29 13:01:07 -07:00
Leonardo de Moura
74be3031b1
feat(frontends/lean/decl_cmds): sign an error if "noncomputable" keyword is used in the HoTT library or with non-definitions
2015-07-29 13:01:06 -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
7e8a394caf
chore(tests/lean): fix style and adjust tests
2015-07-28 18:15:25 -07:00
Leonardo de Moura
b81d4d50f1
feat(frontends/lean/bultin_cmds): add 'print axioms <declname>' command that prints axioms a giving declaration depends on
2015-07-28 18:15:25 -07:00
Leonardo de Moura
cfa9412f96
fix(frontends/lean): "show goal" localization, add "position", support "by tactic"
2015-07-28 12:48:12 -07:00
Leonardo de Moura
91f83835bb
fix(frontends/lean/elaborator): "show goal" command line option for nested "begin...end" blocks
2015-07-27 20:11:27 -07:00
Leonardo de Moura
d50fa26ca2
fix(frontends/lean/parser): caching problem when using "show hole" and "show goal" command line options
2015-07-27 18:55:20 -07:00
Leonardo de Moura
0786841c71
feat(frontends/lean): use uniform delimiter
2015-07-27 18:45:33 -07:00
Leonardo de Moura
3fb16d6287
feat(frontends/lean): add "show hole" command line option
2015-07-27 18:42:57 -07:00
Leonardo de Moura
68370d5c8e
feat(frontends/lean): process "show goal" command line option
2015-07-27 17:44:43 -07:00
Leonardo de Moura
966e0109ff
feat(library/simplifier): initialize simplification set.
2015-07-27 14:59:21 -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
e0209a1532
feat(frontends/lean): better error localization for 'have'-expressions in tactic mode
2015-07-23 18:52:59 -07:00
Leonardo de Moura
946308b187
feat(frontends/lean): allow anonymous 'have'-expressions in tactic mode
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
cc396cba76
feat(frontends/lean): allow backticks in binder declarations
2015-07-22 13:54:47 -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
e969c7a8d6
refactor(library): remove 'simp' hack
2015-07-22 10:13:19 -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
b9451549d1
feat(frontends/lean): add type
notation for referencing hypotheses
2015-07-20 21:43:47 -07:00
Leonardo de Moura
812ddf1ef5
feat(frontends/lean): add 'suppose'-expression
...
It is a variant of 'assume' that allow anonymous declarations.
2015-07-19 12:15:12 -07:00
Leonardo de Moura
92f8eb173b
feat(frontends/lean): use 'this' as the name for anonymous 'have'-expression
2015-07-18 13:36:05 -05: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
267545ca0c
feat(frontends/lean): parse 'with_options' tactical
...
see issue #492
2015-07-13 19:13:41 -04:00
Leonardo de Moura
f8d472c9f1
feat(frontends/lean/parse_rewrite_tactic): change the semantics of rewrite[↑f] when f is recursive
...
After this commit it behaves like 'unfold f'.
That is, it will unfold f even if it fails to fold recursive
applications. Now, only 'esimp[f]' will not unfold f-applications when
it cannot fold the recursive applications.
This commit also closes #692 . It is part of a series of commits that
addresses this issue.
closes #692
2015-07-12 13:20:21 -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
967f9ece8e
fix(frontends/lean/notation_cmd): workaround incorrect warning produced by clang++ on OSX
2015-07-07 21:01:48 -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
a27b20cd9c
feat(frontends/lean/notation_cmd): allow local notation to override reserved notation
...
closes #712
2015-07-07 17:30:46 -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
fb833a724b
fix(src/frontends/lean/parser): add extra annotations to workaround with clang 6.0.0
2015-07-06 16:39:47 -07:00
Leonardo de Moura
b0c56273e2
fix(frontends/lean/elaborator): fixes #724
2015-07-06 15:19:19 -07:00
Leonardo de Moura
c843690d27
fix(frontends/lean/elaborator): fixes #719
2015-07-03 12:37:28 -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
d44d576194
refactor(library/coercion): simplify coercion module API
2015-07-01 14:40:12 -07:00
Leonardo de Moura
cabe30ba71
feat(frontends/lean): allow user to assign priorities to notation declarations
2015-06-30 17:10:27 -07:00
Leonardo de Moura
a1d1a8272a
refactor(frontends/lean): move parse_priority to util
2015-06-30 16:22:52 -07:00
Leonardo de Moura
4ea57196ff
chore(frontends/lean/parser_config): remove dead code
2015-06-30 16:04:00 -07:00
Leonardo de Moura
9a9e975bc8
feat(frontends/lean/migrate_cmd): ignore derived transitive instances in the migrate command
2015-06-30 14:00:41 -07:00
Leonardo de Moura
9cefe708ee
feat(frontends/lean/builtin_cmds): display derived instances
2015-06-29 11:06:59 -07:00
Leonardo de Moura
95720b1670
fix(frontends/lean/elaborator): fixes #687
2015-06-28 19:58:57 -07:00
Leonardo de Moura
d1eaa7bcda
feat(frontends/lean/parse_rewrite_tactic): accept trailing comman in rewrite tactic
...
see issue #695
2015-06-28 11:45:30 -07:00
Leonardo de Moura
4a4ef48344
fix(frontends/lean/parse_rewrite_tactic): fixes #691
2015-06-28 11:28:05 -07:00
Leonardo de Moura
869ad261c5
fix(frontends/lean/elaborator): fixes #689
2015-06-27 16:19:38 -07:00
Leonardo de Moura
3fa1829b22
feat(frontends/lean/migrate_cmd): add profile for migrate command
2015-06-27 14:07:32 -07:00
Leonardo de Moura
3215af3926
feat(frontends/lean): add '[trans-instance]' attribute
...
see issue #666
2015-06-27 14:07:29 -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
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
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
919c4ea8ee
feat(frontends/lean/calc_proof_elaborator): cleanup communication between unifier and calc_proof_elaborator
2015-06-24 14:14:44 -07:00
Leonardo de Moura
1c70514231
feat(frontends/lean/structure_cmd): disable conversion optimization for automatically generated coercions
2015-06-21 16:57:37 -07:00
Leonardo de Moura
2109dff46a
feat(frontends/lean): remove unnecessary flag
2015-06-17 17:23:20 -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
9e6e406f73
feat(frontends/lean): add '#compose' command for testing composition manager
2015-06-17 14:42:25 -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
382d4d32b7
feat(frontends/lean): 'override' command and '#<namespace> <expr>' notation also override aliases
...
Before this commit they were only overriding notation declarations.
2015-06-14 15:48:36 -07:00
Leonardo de Moura
01f8f3c11d
fix(frontends/lean): memory access violation
2015-06-14 15:37:45 -07:00
Leonardo de Moura
45684588cc
fix(frontends/lean/nested_declaration): compilation error in debug mode
2015-06-13 13:10:10 -07:00
Leonardo de Moura
8a85e4ee87
feat(frontends/lean/builtin_cmds): improve print <id>
when <id>
is a not yet revealed theorem
...
We add a remark saying the command `reveal <id>` should be used to
access `<id>` definition.
2015-06-13 12:12:22 -07:00
Leonardo de Moura
591fb91f34
fix(frontends/lean/builtin_cmds): fixes #671
2015-06-13 11:35:03 -07:00
Leonardo de Moura
3d9b557cfd
feat(frontends/lean): allow the user to mark subterms that should be automatically abstracted into new definitions
...
closes #484
2015-06-12 17:49:26 -07:00
Leonardo de Moura
4694f47ea4
refactor(frontends/lean/decl_attributes): move decl_attributes to a separate module
2015-06-12 13:38:57 -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
f64784378a
fix(frontends/lean/pp): make pp_have more robust
...
We should not assume the argument of a have_annotation is a lambda.
2015-06-10 16:26:20 -07:00
Leonardo de Moura
ca43f6e62e
refactor(frontends/lean): add postprocess procedure and cleanup
2015-06-10 15:19:35 -07:00
Leonardo de Moura
4b91cfccff
feat(frontends/lean/builtin_exprs): make notation ( e : T )
builtin
...
In the previous approach, the following (definitionally equal) term was being generated
(fun (A : Type) (a : A), a) T e
2015-06-10 14:52:59 -07:00
Leonardo de Moura
f7dd85a935
chore(*): fix 'breif' typos
2015-06-08 16:54:55 -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
134740182d
fix(frontends/lean): fixes #652
2015-06-03 21:53:51 -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
b6fde68012
feat(frontends/lean/decl_cmds): avoid funny names when displaying error messages for "examples"
2015-06-01 15:35:28 -07:00