Commit graph

192 commits

Author SHA1 Message Date
Sebastian Ullrich
4552fc13f2 chore(tests): add tests for goal at pos 2016-12-27 21:41:02 -08:00
Sebastian Ullrich
b10ebade8c chore(tests/lean/interactive/test_single): ignore progress responses 2016-12-27 10:07:34 -08:00
Sebastian Ullrich
c9a8c02fdc feat(emacs,frontends/lean/parser,shell/server): more accurate info command using server-side parsing 2016-12-27 10:07:34 -08:00
Leonardo de Moura
a358ea32ac fix(tests/lean/interactive): remove local paths 2016-12-20 12:46:10 -08:00
Leonardo de Moura
c9e0727ac0 fix(tests/lean/interactive/info1): fix test 2016-12-20 12:32:21 -08:00
Gabriel Ebner
f9a61b2b29 fix(tests/lean/interactive): fix test 2016-12-20 10:15:19 -08:00
Sebastian Ullrich
00b8c2ca81 feat(frontends/lean/elaborator): save info on field of field expression 2016-12-18 23:48:50 -08:00
Leonardo de Moura
1cfef1c6d9 fix(frontends/lean/parser): save next_inst_idx in the parser snapshot
This fixes issues with anonymous instances in sections.
In Emacs, we would get spurious error messages such as:

   invalid parameter/variable declaration, '_inst_1' has already been declared

This commit also adds a regression test for the problem.
2016-12-18 23:39:28 -08:00
Gabriel Ebner
45d0525e52 feat(shell,emacs): new lean server protocol 2016-12-06 17:14:29 -08:00
Gabriel Ebner
3b2bb854be fix(tests/lean/interactive/test_single): do not use deprecated realpath command
The realpath executable is not installed by default on ubuntu.  Also
contains a fix for macOS where the default readlink executable does not
understand -f.  The ./readlinkf.sh script does not work for directories
either.
2016-12-02 17:01:58 -08:00
Leonardo de Moura
ffcb9f240e fix(tests/lean/interactive/test_single): MSYS2 compatibility 2016-12-01 11:55:55 -08:00
Gabriel Ebner
a8df381d20 feat(*): parallel compilation 2016-11-29 11:12:40 -08:00
Leonardo de Moura
922d48524b fix(frontends/lean): fixes #1188
This commit also adds support for recording the type of local variables
in the info_manager
2016-11-10 15:08:25 -08:00
Sebastian Ullrich
ef633abec7 chore(*): fix test and style 2016-11-08 08:37:41 -08:00
Sebastian Ullrich
1f9554a014 refactor(frontends/lean/info_manager): always pass column in requests 2016-11-08 08:37:41 -08:00
Sebastian Ullrich
ba1b6165e3 feat(frontends, shell): implement basic server 'info' command 2016-11-08 08:37:41 -08:00
Leonardo de Moura
e98340ddae chore(tests/lean/interactive): remove "interactive" tests
In Lean3, we will not use the --server option anymore
2016-09-19 17:20:44 -07:00
Leonardo de Moura
928d567a3f chore(tests/lean): providing universes 2016-09-17 12:54:20 -07:00
Sebastian Ullrich
fd2c42a8bf chore(library, tests): switch to new attribute declaration syntax
sed -Ei 's/^(\s*)((private |protected )?(noncomputable )?(abbreviation|definition|meta_definition|theorem|lemma|proposition|corollary)\s+\S+\s*)((\s*\[(\S+(\s+[0-9]+)*|priority.*)\])+)\s*/\1attribute \6\n\1\2/' library/**/*.lean tests/**/*.lean
sed -Ei 's/\s+$//' library/**/*.lean  # remove trailing whitespace
2016-08-12 15:36:12 -07:00
Leonardo de Moura
e0e5a84f84 chore(tests/lean): adjust tests 2016-07-23 12:48:35 -07:00
Leonardo de Moura
6893ddc11c chore(tests/lean/interactive/alias): fix test expected output 2016-06-27 14:37:18 +01:00
Leonardo de Moura
583a55c7c3 refactor(library): move 'none', 'some', 'tt', 'ff' to top-level 2016-06-25 12:39:19 -07:00
Leonardo de Moura
4f7f59e47f chore(tests/lean): fix tests output 2016-06-20 11:18:16 -07:00
Leonardo de Moura
4b022fea01 chore(tests/lean): fix/disable tests 2016-06-10 18:29:41 -07:00
Leonardo de Moura
384e8bf7bf refactor(library): remove unifier_plugin 2016-03-21 17:57:53 -07:00
Leonardo de Moura
2c70ca83a8 refactor(frontends/lean/calc): remove '{}' notation for eq.subst in calc mode 2016-03-03 14:18:20 -08:00
Leonardo de Moura
4a43e33d45 chore(*): disable big chunk of the standard library and tests 2016-03-03 13:43:08 -08:00
Leonardo de Moura
d84a20d68b remove(frontends/lean/server): FINDG command 2016-03-03 10:12:24 -08:00
Leonardo de Moura
ac9d6c2021 refactor(library/data/bool): cleanup bool proofs and fix bxor definition 2016-01-01 13:52:42 -08:00
Leonardo de Moura
54f2c0f254 feat(library/blast/forward): inst_simp should use the left-hand-side as a pattern (if none is provided by the user)
The motivation is to reduce the number of instances generated by ematching.

For example, given

   inv_inv:  forall a, (a⁻¹)⁻¹ = a

the new heuristic uses ((a⁻¹)⁻¹) as the pattern.
This matches the intuition that inv_inv should be used a simplification
rule.

The default pattern inference procedure would use (a⁻¹). This is bad
because it generates an infinite chain of instances whenever there is a
term (a⁻¹) in the proof state.
By using (a⁻¹), we get
   (a⁻¹)⁻¹ = a
Now that we have (a⁻¹)⁻¹, we can match again and generate
   ((a⁻¹)⁻¹)⁻¹ = a⁻¹
and so on
2015-12-31 20:20:39 -08:00
Sebastian Ullrich
2185ee7e95 feat(library/tactic): make let tactic transparent, introduce new opaque note tactic
The new let tactic is semantically equivalent to let terms, while `note`
preserves its old opaque behavior.
2015-12-14 10:14:02 -08:00
Leonardo de Moura
e3a35ba4fd feat(frontends/lean): add 'with_attributes' tactical
closes #494
2015-12-13 18:27:44 -08:00
Leonardo de Moura
a507ac8594 test(tests/lean/interactive/findp): remove test that breaks whenever we revise init/logic.lean
closes #888
2015-12-10 10:11:55 -08:00
Leonardo de Moura
b36ce49f2b fix(tests,doc): adjust tests to changes in the standard library 2015-12-05 23:52:16 -08:00
Leonardo de Moura
2edf91ce42 fix(tests/lean/interactive/findp): broken test output 2015-12-04 08:40:21 -08:00
Leonardo de Moura
989a2e077b fix(tests/lean): adjust tests 2015-11-22 17:15:28 -08:00
Leonardo de Moura
c280ddb2b0 fix(tests,doc): adjust tests and documentation 2015-11-20 17:03:17 -08:00
Leonardo de Moura
e580e6cdb1 fix(tests/lean/interactive/findp): adjust test 2015-11-18 10:10:46 -08:00
Leonardo de Moura
5095f05303 fix(tests/lean/interactive/findp): adjust test to recent changes in the standard lib 2015-11-16 21:30:28 -08:00
Jeremy Avigad
eea4e4ec55 fix(tests/lean/*): fix tests 2015-11-08 14:04:59 -08:00
Leonardo de Moura
6df31d3406 refactor(library/data/nat/basic): mark some theorems as protected to avoid overloading 2015-11-08 14:04:56 -08:00
Leonardo de Moura
4e78e35f77 fix(tests/lean): adjust remaining tests to changes in the standard library 2015-11-08 14:04:56 -08:00
Leonardo de Moura
44c6e92a64 fix(tests/lean): notation ℕ is now defined in the top-level 2015-09-01 14:58:14 -07:00
Leonardo de Moura
d2eb99bf11 refactor(library/logic): move logic/choice.lean to init/classical.lean
choice axiom is now in the classical namespace.
2015-08-12 18:37:33 -07:00
Jeremy Avigad
305f72bf4f fix(tests/lean): fix three tests broken by setext renaming 2015-08-09 22:14:25 -04:00
Leonardo de Moura
bbd6946a15 refactor(library/logic/axioms): we have only one extra axiom 2015-07-29 13:36:23 -07:00
Leonardo de Moura
589f9df103 fix(tests/lean): adjust tests to reflect recent changes in the standard library 2015-07-13 21:46:09 -04:00
Leonardo de Moura
7e0844a9e6 fix(tests): to reflect recent changes in the standard library 2015-07-06 15:05:01 -07:00
Leonardo de Moura
7f12401ea7 fix(frontends/lean/elaborator): save type information for 'obtain' declarations 2015-05-29 10:16:12 -07:00
Leonardo de Moura
11fbee269b fix(frontends/lean/parser): must save state of name_generator in parser snapshot
To provide typing and auto-completion information, we create a
background process by starting lean with the option --server.
In "server" mode, we create snapshots of the parser state.
The idea is to be able to quickly reprocess a file when the user makes a
modification. This commit fixes a bug in the snapshot operation.
It was not saving in the snapshots the unique name generator used by the parser.
By creating a fresh name generator, we may accidentally
assign the same internal name to two different constants.
This bug triggered the crash described in issue #593.

This commit fixes the test in the comment
https://github.com/leanprover/lean/issues/593#issuecomment-101768484

This commit also adds a smaller version of the problem to the test suite
2015-05-13 12:28:23 -07:00