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
Sebastian Ullrich
b3887f21a4
fix(shell/server): remove unnecessary dependencies of info_task and use intermediate envs
2017-03-08 10:40:59 -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
876a2bee46
feat(frontends/lean/elaborator): flag expr quotes containing universe params
2017-03-05 08:37:16 -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
Leonardo de Moura
b74740648e
fix(library/tactic): fixes #1414
2017-03-03 20:50:00 -08:00
Jeremy Avigad
f460cbdf2e
feat(library/init/classical): simpler choice axiom
2017-03-03 12:43:31 -08:00
Leonardo de Moura
d9da6f05b5
fix(library/tactic/cases_tactic): issue reported by @johoelzl at slack
2017-03-02 18:00:55 -08:00
Daniel Selsam
5ef892bb45
feat(inductive_compiler): cases_on for mutual and nested
2017-03-02 16:08:00 -08:00
Daniel Selsam
9590f2b7d0
feat(inductive_compiler): support nested inductive propositions
2017-03-02 16:01:45 -08:00
Leonardo de Moura
259d9271ab
fix(library/equations_compiler): use ginductive API
...
fixes #1334
2017-03-02 15:48:03 -08:00
Leonardo de Moura
525242561a
fix(library/init/meta/tactic): use zeta reduction by default in the abstract tactic
...
Abstracting let-exprs may produce type errors.
In the future we may consider another strategy for `abstract`.
First, we try to abstract the `let`, then if it fails, we expand.
Not sure if this is a good idea.
2017-03-02 11:34:28 -08:00
Leonardo de Moura
b1848efbc4
chore(library/init/meta): add head prefix to head reduction tactics, and add zeta tactic (that applies zeta reduction to all subterms)
2017-03-02 10:55:38 -08:00
Daniel Selsam
1f6306d068
perf(library/inductive_compiler): simplification with sizeof lemmas
2017-03-01 21:13:20 -08:00
Jeremy Avigad
4108e5c98b
feat(library/init/classical): replace strong indefinite description with indefinite description
2017-03-01 21:13:03 -08:00
Johannes Hölzl
f44cbb896c
fix(src/library/equations_compiler/elim_match): handle mixing of inaccessible terms and variables
2017-03-01 21:12:42 -08:00
Leonardo de Moura
1542cd750f
feat(library/tactic/induction_tactic): use drec in the induction tactic
...
The new test failed before this change.
2017-03-01 18:34:24 -08:00
Leonardo de Moura
1ded3b70b8
feat(library/constructions/drec): add dcases_on
2017-03-01 15:46:19 -08:00
Leonardo de Moura
2fb5f6a49e
feat(library/init/meta): add subst_vars tactic
2017-03-01 15:11:17 -08:00
Leonardo de Moura
132a629eb7
fix(library/tactic/induction_tactic): use whnf when inferring C.rec name
2017-03-01 14:29:26 -08:00
Leonardo de Moura
7b0a18167b
feat(library/constructions/drec): add drec_on and refactor
2017-03-01 14:12:10 -08:00
Leonardo de Moura
17556758cb
feat(library/constructions,library/inductive_compiler): automatically generate dependent eliminator for inductive predicates
...
The dependent eliminator for an inductive predicate C is called C.drec
TODO: construct dcases_on and drec_on using C.drec
We need this recursor for implementing dependent elimination for
inductive predicates.
We don't need to define acc.drec and eq.drec in the standard library anymore.
2017-02-28 20:58:04 -08:00
Leonardo de Moura
28938090c1
feat(library/data): add hash_map's
2017-02-27 23:17:10 -08:00
Leonardo de Moura
2386c18ee5
fix(library/tactic/eval): make sure old position information nested in the expression being evaluated is not used in type error messages
...
see #1401
2017-02-26 22:38:24 -08:00
Leonardo de Moura
184d505d51
fix(library/compiler/preprocess): do not unfold noncomputable definitions in the compiler
...
see #1401
2017-02-26 22:05:16 -08:00
Leonardo de Moura
5a924699d0
feat(library/tools/mini_crush): add nano crush
2017-02-24 23:14:05 -08:00
Leonardo de Moura
52221cdbd1
fix(frontends/lean/elaborator): {} elaboration issue
2017-02-24 21:20:39 -08:00
Leonardo de Moura
921d72b6c4
feat(library/init/meta): add helper tactics
2017-02-24 16:26:47 -08:00
Gabriel Ebner
9bcfc06bd0
fix(library/module): has_sorry: check examples
2017-02-24 21:08:49 +01:00