Leonardo de Moura
6887a99f08
feat(library/init/category/state): make state and state_t universe polymorphic
...
The new definitions are not fully general since they force data and
state to be in the same universe.
2017-03-22 23:45:29 -07:00
Leonardo de Moura
60dd85719c
feat(library/system/io): system.io without axioms
2017-03-22 23:36:05 -07:00
Sebastian Ullrich
897b4f9db1
fix(frontends/lean/builtin_exprs): override scope behavior for strict quoted names
2017-03-22 07:34:50 -07:00
Sebastian Ullrich
793f0baee8
feat(library/tactic/vm_monitor): use attribute for registering VM monitors
2017-03-22 07:34:27 -07:00
Leonardo de Moura
a31de3b7bc
feat(library/unification_hint): improve unification_hint matcher
...
Improvements:
- Use heuristic match explicit arguments first and then match implicit.
- Skip annotations.
- Follow metavariable assigments.
- Use is_def_eq when pattern doest not contain matching variables.
2017-03-21 10:19:34 -07:00
Leonardo de Moura
aa68d72fa5
fix(library/equations_compiler/elim_match): skip nonvar + inaccessible
2017-03-21 08:08:36 -07:00
Leonardo de Moura
fdadada3a9
fix(frontends/lean): fixes #1468
...
@kha I had to add yet another hack to fix this issue.
In notation declarations, names are resolved at notation declaration time.
So, users do not expect them to be resolved again at tactic execution time.
I addressed this problem by wrapping constants occurring in notation
declarations with a "frozen_name" annotation. This transformation is
only performed if m_in_quote is true.
Then resolve_names_fn at elaborator.cpp will not try to resolve the
names again.
This change broke two other modules. `-` notation for inverting
equations at `rw`, and `calc` expressions inside quotes.
The broke for the same reason. They were not expecting the constants
to be wrapped with an annotation.
2017-03-18 13:48:21 -07:00
Sebastian Ullrich
421a6d6f01
feat(frontends/lean/interactive,emacs): highlight current tactic parameter
2017-03-17 18:20:44 -07:00
Leonardo de Moura
11dcab1b31
fix(frontends/lean/elaborator): fixes #1458
2017-03-16 10:31:21 -07:00
Daniel Selsam
cddf5f081d
fix(library/tactic/kabstract.cpp): only use replace_fn cache if replacing all occs
2017-03-15 19:40:52 -07:00
Daniel Selsam
9135e231f0
fix(tests/lean/inductive_sorry.lean): fix broken test
2017-03-15 19:40:52 -07:00
Leonardo de Moura
83fbb605f4
chore(tests/lean): fix tests
2017-03-15 19:40:52 -07:00
Sebastian Ullrich
e3b9190fe2
refactor(library/tactic/user_attribute): use attribute for registering attributes. naturally.
2017-03-15 14:06:34 -07:00
Sebastian Ullrich
647d7a8501
fix(frontends/lean/elaborator): expr patterns should ignore binding names
2017-03-15 14:06:00 -07:00
Leonardo de Moura
8d409d7c63
feat(library/unification_hint): unification hint validation
2017-03-12 16:42:16 -07:00
Leonardo de Moura
c694dbd600
fix(frontends/lean/elaborator): conflict between (: t :) and (::) notations
...
It was preventing us from using `(::)`
2017-03-12 09:29:42 -07:00
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
Daniel Selsam
538ac8d187
feat(inductive_compiler): generate injectivity lemmas
2017-03-10 22:27:18 -08:00
Sebastian Ullrich
16558bf082
refactor(library,library): rename pre_monad to has_bind
2017-03-09 20:32:25 -08:00
Sebastian Ullrich
763097dbd2
refactor(library): revise the monadic hierarchy
2017-03-09 20:30:03 -08:00
Leonardo de Moura
b0a33259ee
fix(library/compiler/simp_inductive): array^.data should not be treated as a regular projection
2017-03-09 19:11:51 -08:00
Leonardo de Moura
9d3c0497cb
chore(frontends/lean): rename transient commands
...
See issue #1432
2017-03-09 18:41:19 -08:00
Leonardo de Moura
a00f2e49a7
chore(frontends/lean): remove several command aliases
...
We still have many more to remove and rename.
See issue #1432
2017-03-09 16:49:03 -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
8979663164
feat(library/tactic/simplify): relax reducibility constraints when matching implicit arguments
...
Motivation: if the explicit part matches (what the user sees), then the implicit part must morally match too.
If it doesn't because of reducibility setting, the behavior is usually counterintuitive.
2017-03-08 20:08:54 -08:00
Leonardo de Moura
4ab0a6d8d2
fix(library): problems with the subtype constructor and field renaming
...
The problem was not detected by the test suite because of issue #1446
2017-03-08 19:42:12 -08:00
Jeremy Avigad
666ca36470
fix(library/tests/lean/*): fix tests
2017-03-08 19:31:27 -08:00
Leonardo de Moura
d775ee98b4
feat(frontends/lean): auto_param support at structure_instance, and better error messages
...
Summary:
- A field value was being elaborated more than once when there is
another field whose default value depends on it.
The new test `structure_default_value_issue.lean` exposes the problem.
- Better error message and localization at field type mismatches.
When there is field type mismatch, the error message contains the
field name, and the error is reported at the field position instead of
`{`.
- We add support for auto_param at structure instances `{...}`
See #1422
2017-03-08 18:04:36 -08:00
Leonardo de Moura
23935ee390
feat(frontends/lean): allow auto_param notation in structure declarations
...
See #1422
TODO: take the auto_param into account in the `{ ... }` notation.
2017-03-08 15:41:30 -08:00
Leonardo de Moura
7a99d87cbd
fix(library/tactic/ac_tactics): allow nested ac_app macros in perm_ac macro
...
fixes #1442
2017-03-08 13:46:49 -08:00
Daniel Selsam
42e08cac36
chore(tests/lean/run/1430.lean): repro for #1430
2017-03-07 20:12:07 -08:00
Leonardo de Moura
1ac240e2db
chore(tests/lean): fix tests
2017-03-07 19:45:00 -08:00
Leonardo de Moura
8d3c7e7180
fix(frontends/lean/builtin_exprs): fixes #1433
2017-03-07 16:21:12 -08:00
Leonardo de Moura
839645c489
feat(library/system/io): replace io.monad with io.bind, io.return and io.map
2017-03-07 16:10:47 -08:00
Leonardo de Moura
0c6108ce7a
chore(library/init/data/quot): use Sort instead of Type
...
Remark: The kernel was already using Sort. So, the limitation was
artificial. Moreover, it may seem unnecessary to have quotients of
proofs in a proof irrelevant system, but this is useful for proving
a more general funext lemma. This more general version is needed in
the new tested contributed by @digama0.
2017-03-07 14:29:57 -08:00
Daniel Selsam
7dcc36277a
feat(frontends/lean/inductive_cmds.cpp): better resultant universe inference
2017-03-07 12:55:01 -08:00
Leonardo de Moura
1d71103f29
feat(library/tactic/cases_tactic): add support for generalized inductive datatypes at 'cases' tactic
2017-03-06 11:49:04 -08:00
Sebastian Ullrich
c4ebfab14c
fix(frontends/lean/structure_cmd): inheriting defaulted field depending on field starting with implicit parameter
2017-03-06 11:02:51 -08:00
Sebastian Ullrich
87b98d5aa2
fix(frontends/lean/structure_cmd): fix assertion violation when field depends on defaulted field
2017-03-06 11:02:50 -08:00
Leonardo de Moura
4608782669
fix(init/logic): eq.mpr and eq.mp can be use for type casting
...
So, they should be `def`. Otherwise code generation will fail.
2017-03-06 09:13:39 -08:00
Leonardo de Moura
045fe4ad25
fix(frontends/lean/structure_cmd): allow default values for function fields
2017-03-06 07:41:42 -08:00
Leonardo de Moura
61c9a7d466
feat(frontends/lean/elaborator): address issue described at https://github.com/leanprover/lean/issues/1403#issuecomment-282846138
...
see #1403
2017-03-05 21:01:12 -08:00
Leonardo de Moura
fa99861788
feat(frontends/lean/elaborator): add new ^. notation
...
see #1403
2017-03-05 20:12:49 -08:00
Leonardo de Moura
832246c06b
chore(tests/lean/run/soundness): remove old comment
2017-03-05 09:55:42 -08:00
Leonardo de Moura
959fa737eb
fix(library/equations_compiler/structural_rec): motive for brec_on
2017-03-05 09:50:38 -08:00
Sebastian Ullrich
5d68938a9c
feat(frontends/lean): expr literals ```(...)
2017-03-05 08:37:16 -08:00
Leonardo de Moura
5189a002bf
chore(tests/lean/run/ginductive_induction_tactic): remove using ...
...
Otherwise, we are not testing anything.
2017-03-04 15:15:39 -08:00
Leonardo de Moura
35952f2941
test(tests/lean/run/ginductive_pred): mutually inductive predicates
...
@dselsam We do not have a "story" for this kind of inductive definition.
2017-03-04 15:06:36 -08:00
Leonardo de Moura
d50da0feb7
feat(library/tactic/induction_tactic): add support for ginductive in the induction tactic
2017-03-04 14:55:35 -08:00
Leonardo de Moura
1ae23708f5
test(tests/lean/run/nested_inductive_code_gen): add code gen test
2017-03-04 14:23:55 -08:00