Commit graph

4542 commits

Author SHA1 Message Date
Leonardo de Moura
df008dc3c3 feat(frontends/lean/inductive_cmd): create a namespace for each declared datatype 2014-11-01 19:15:46 -07:00
Leonardo de Moura
ea55ec4090 feat(frontends/lean/decl_cmds): remove useless name from 'example' commad 2014-11-01 16:12:23 -07:00
Leonardo de Moura
1e6f7cdbb4 chore(frontends/lean/decl_cmds): add 'example' command
It is like a theorem, but it is discarded after checking
2014-11-01 11:37:39 -07:00
Leonardo de Moura
b1c2efecbb chore(frontends/lean/decl_cmds): add missing static 2014-11-01 11:18:10 -07:00
Leonardo de Moura
94cf10284a fix(frontends/lean/calc_proof_elaborator): bug when inserting symmetry proofs for heq, fixes #286
The problem was that heq type is
    Pi {A : Type} (a : A) {B : Type} (b : B), Prop

The calc_proof_elaborator was assuming that (a : A) (b : B) were the
last two arguments in any relation supported by calc.

The fix is to remove this assumption.
2014-11-01 07:30:04 -07:00
Leonardo de Moura
2688ca38bf feat(frontends/lean/inductive_cmd): notation for enumeration types 2014-10-31 19:01:32 -07:00
Leonardo de Moura
aaad9a3c43 feat(library/definitional/projection): add option for marking main premise as instance implicit (i.e., [] binder decorator) 2014-10-31 19:01:32 -07:00
Soonho Kong
cae543e665 chore(emacs): remove unnecessary requires 2014-10-31 16:01:10 -07:00
Soonho Kong
96f620adf6 doc(README.md): add Aquamacs case, ask to update lean-rootdir
[skip ci]
2014-10-31 09:58:15 -07:00
Leonardo de Moura
57b19b787b feat(frontends/lean/calc_proof_elaborator): when 'elaborator.calc_assistant' is on, generate same info that is generated if ! was used 2014-10-31 09:49:45 -07:00
Leonardo de Moura
dc7ab17d2a feat(frontends/lean/calc_proof_elaborator): add 'elaborator.calc_assistant' option 2014-10-31 09:49:45 -07:00
Leonardo de Moura
4bdee07af2 refactor(library/algebra/category/basic): use calc assistant 2014-10-31 09:49:45 -07:00
Leonardo de Moura
8d3e9fdc20 refactor(library/data/nat/basic): remove unnecessary {} 2014-10-31 09:49:45 -07:00
Leonardo de Moura
d7beabe91c fix(frontends/lean/calc_proof_elaborator): improve calc proof assistant 2014-10-31 09:49:45 -07:00
Soonho Kong
4bc7a4d32a doc(make/osx-10.9.md): update available compilers and required/optional pacakges
[skip ci]
2014-10-31 09:48:27 -07:00
Leonardo de Moura
c56274d821 chore(doc/make): we don't use thread_local keyword anymore 2014-10-31 07:29:09 -07:00
Leonardo de Moura
8a4d4409cd feat(frontends/lean/calc_proof_elaborator): add '{...⁻¹}' if needed in calc proofs, closes #268
This commit also simplifies library/data/nat/basic.lean
2014-10-31 01:02:49 -07:00
Leonardo de Moura
17df85f592 feat(frontends/lean/calc_proof_elaborator): add '{...}' if needed in calc proof steps
This is part of #268
2014-10-31 00:55:19 -07:00
Leonardo de Moura
42dba5cc98 feat(frontends/lean/calc): expose get_calc_subst_info and get_calc_refl_info APIs 2014-10-30 23:56:38 -07:00
Leonardo de Moura
5f23179388 refactor(library/data/nat): remove unnecessary ! and eq.symm
The calc command automatically adds them now.
2014-10-30 23:28:35 -07:00
Leonardo de Moura
591e566472 feat(frontends/lean): try to inject symmetry (if needed) in calc proofs, add calc_symm command for configuring the symmetry theorem for a given operator
This is part of #268
2014-10-30 23:24:09 -07:00
Leonardo de Moura
c5a62f8abb feat(frontends/lean): insert ! in calculational proofs when needed
This is part of #268
2014-10-30 22:22:04 -07:00
Leonardo de Moura
09c6c05e26 chore(library/data/quotient): replace 'let' with 'have' and cleanup 2014-10-30 18:44:05 -07:00
Leonardo de Moura
407e35692b feat(frontends/lean/calc): wrap calc proofs with 'proof-qed' annotation to identify places where proof influences what is being proved
Later, we will add a custom annotation and elaborator for calc proofs.
This is the first step for issue #268.

Remark: we don't wrap the proof if it is of the form

   - `by tactic`
   - `begin tactic-seq end`
   - `{ expr }`
2014-10-30 18:33:47 -07:00
Leonardo de Moura
b87764eaf6 test(tests/lean): add unique class instance resolution test 2014-10-30 14:50:32 -07:00
Leonardo de Moura
e79c7d9852 feat(frontends/lean): make set_option affect fingerprints 2014-10-30 14:45:35 -07:00
Leonardo de Moura
498b2f681e feat(frontends/lean/placeholder_elaborator): better error message for ambiguous class-instance resolution 2014-10-30 14:44:58 -07:00
Leonardo de Moura
79f73c44dc feat(frontends/lean/placeholder_elaborator): add 'elaborator.unique_class_instances' flag, closes #265
By default, it is false.
When it is true, class instance resolution generates an error if there
is more than one solution.
2014-10-30 14:21:24 -07:00
Leonardo de Moura
64c3ba7b74 feat(frontends/lean): display metavariable application arguments in check command
The idea is to "fix" counter-intuitive output like the ones were
produced in the tests check.lean and check2.lean
2014-10-30 13:28:25 -07:00
Leonardo de Moura
dcd7e53fa7 feat(frontends/lean/builtin_cmds): remove workaround for getting nice metavariable names in the check command
We don't need it anymore after previous commit 2a16050
2014-10-30 13:12:45 -07:00
Leonardo de Moura
2a160508c3 feat(frontends/lean): lean --server should display meta-variables using the approach used in check command, closes #280 2014-10-30 12:45:41 -07:00
Leonardo de Moura
a1ea087f8e fix(frontends/lean/info_manager): std::set insert is a noop if set already contains an equivalent element 2014-10-30 10:35:45 -07:00
Soonho Kong
b7d805a145 feat(emacs/lean-settings): add 'lean-follow-changes' option 2014-10-29 23:58:50 -07:00
Leonardo de Moura
84b516994c fix(library/tactic): type check generalization result, fixes #273 2014-10-29 20:34:01 -07:00
Leonardo de Moura
61f333d2c2 chore(library/tactic/expr_to_tactic): fix compilation warning 2014-10-29 19:47:47 -07:00
Leonardo de Moura
6107da05db fix(frontends/lean): universe variable is treated as parameter inside section, fixes #283 2014-10-29 19:47:14 -07:00
Leonardo de Moura
d7ded15486 fix(tests/lean/interactive): modify to reflect recent changes 2014-10-29 19:44:53 -07:00
Leonardo de Moura
9547e2d077 feat(library/tactic): add rotate_left/rotate_right tactics, closes #278 2014-10-29 19:13:55 -07:00
Leonardo de Moura
8e9f97e95e fix(frontends/lean): do not save identifier info 2014-10-29 17:38:59 -07:00
Leonardo de Moura
c1653a9fb4 feat(frontends/lean): only valid proof states should be displayed, closes #275 2014-10-29 17:29:40 -07:00
Soonho Kong
5ad312f6ce test(emacs/lean-info-test): add test cases for goal visualization
[skip ci]
2014-10-29 17:09:08 -07:00
Soonho Kong
6973d3e7aa feat(emacs/lean-info): add goal visualization options 'lean-proofstate-display-style'
lean-proofstate-display-style:

 - 'show-all: Show all goals
        a : Prop,
        b : Prop,
        c : Prop,
        H_1 : a,
        H_2 : b,
        H_3 : c
        ⊢ id a

        a : Prop,
        b : Prop,
        c : Prop,
        H_1 : a,
        H_2 : b,
        H_3 : c
        ⊢ b ∧ c

 - 'show-first: Show only the first
        a : Prop,
        b : Prop,
        c : Prop,
        H_1 : a,
        H_2 : b,
        H_3 : c
        ⊢ id a

 - 'show-first-and-other-conclusions: Show the first goal, and the
   conclusions of all other goals (DEFAULT OPTION)
        a : Prop,
        b : Prop,
        c : Prop,
        H_1 : a,
        H_2 : b,
        H_3 : c
        ⊢ id a

        ⊢ b ∧ c

Close #279
2014-10-29 17:08:55 -07:00
Leonardo de Moura
a98b12f067 fix(frontends/lean/elaborator): incorrect error position in begin-end block, fixes #276 2014-10-29 16:51:06 -07:00
Leonardo de Moura
95e843e8ed feat(library/tactic/proof_state): add empty line between goals, closes #281 2014-10-29 16:51:06 -07:00
Leonardo de Moura
b0a7888346 fix(emacs/lean-flycheck): should accept error messages with empty lines 2014-10-29 16:51:06 -07:00
Leonardo de Moura
1c9992800f fix(frontends/lean/info_manager): suppress useless tactic type information, closes #277 2014-10-29 16:51:06 -07:00
Leonardo de Moura
88d55bfef0 fix(library/definitional/projection): remove redundant 'error in' 2014-10-29 16:51:06 -07:00
Soonho Kong
854e7ba1be fix(emacs/lean-type): improve displaying proof state messages
- Do not repeat the same message
 - Do not display the empty message
 - Do not display "[stale]" for proof states
2014-10-29 16:02:48 -07:00
Soonho Kong
99f85c8dbc fix(emacs/lean-info): proofstate display problem 2014-10-29 14:33:05 -07:00
Soonho Kong
fe710ac6d0 test(emacs/lean-info-test): add test for proofstate info 2014-10-29 14:33:05 -07:00