Commit graph

3096 commits

Author SHA1 Message Date
Mario Carneiro
c5bb5cb1eb fix(init/meta/interactive_base): declare |- notation 2017-08-17 11:34:00 +02:00
Leonardo de Moura
12b28546e8 chore(library/library.md): update documentation 2017-08-16 14:17:26 -07:00
Leonardo de Moura
d25ee51b43 refactor(library): move lazy_list back to core library 2017-08-16 14:08:46 -07:00
Leonardo de Moura
dc68cc7445 refactor(library): move stream back to the core library 2017-08-16 13:45:36 -07:00
Leonardo de Moura
19ee270c60 refactor(library): remove vector and bitvec from init
Reason: vector in in init folder was introducing an overload (`::`) for
all Lean users. The workaround (use `local infix ::`) was
counterintuitive.

We currently have no special support for bitvectors in the code
generator. Thus, there is no need to have vector and bitvec in the init
folder right now. Moreover, the new parser and elaborator (issue #1674) should
provide better ways of managing overloaded symbols.
2017-08-16 13:40:50 -07:00
Sebastian Ullrich
579d4a459e chore(init/meta/interactive): check simp lemmas for ambiguous overloads
Fixes #1786
2017-08-15 12:43:02 +02:00
Gabriel Ebner
32ddac5f40 feat(library/tactic/kabstract): expose kabstract to VM 2017-08-14 11:41:54 +02:00
Gabriel Ebner
867bc46d99 feat(library/vm/vm_parser): expose parse_command_like to the vm 2017-08-14 11:41:48 +02:00
Gabriel Ebner
7e4a5a78c8 chore(library/init/algebra/order): generalize lemma 2017-08-06 09:58:24 +02:00
Gabriel Ebner
22011dcde4 chore(init/algebra/order): typo
Thanks to @fpvandoorn for proof-reading!
2017-08-02 15:41:51 +01:00
Gabriel Ebner
66b80dde54 chore(library/init/algebra/order): remove unused lemmas 2017-08-02 14:41:35 +01:00
Gabriel Ebner
5922f71c50 feat(library/init/algebra/order): add default value for lt 2017-08-02 14:41:35 +01:00
Gabriel Ebner
b1954f949b chore(init/data/int): remove unused lemmas 2017-08-02 14:41:35 +01:00
Gabriel Ebner
ce509e621a refactor(library/init/algebra): remove order_pair classes 2017-08-02 14:41:35 +01:00
Sebastian Ullrich
4f66673fc2 feat(init/meta/attribute,library/tactic/attribute): user_attribute apply handlers 2017-08-02 14:32:39 +01:00
Leonardo de Moura
39fa7625b8 feat(library/init/meta/interactive): add specialize tactic
closes #1779
2017-08-02 10:20:25 +01:00
Mario Carneiro
1b28b9f5bd chore(init/data/int/basic): define nat_abs using equation compiler 2017-07-28 16:47:53 +01:00
Mario Carneiro
490cc50b51 chore(init/data/nat): mark simp rules 2017-07-28 16:47:53 +01:00
Mario Carneiro
fb4e952ac8 fix(init/meta/congr_tactic): congr tries assumption first
This gives a workaround for the situation where the `congr` tactic does too much congruence applications, such as reducing `|- a + b = b + a` to `|- a = b` and `|- b = a`, by supplying the desired equalities to stop at using `have`.
2017-07-28 16:47:53 +01:00
Mario Carneiro
f369e34bd6 chore(library/standard): remove standard.lean (unused, and confusing given stdlib) 2017-07-28 16:47:53 +01:00
Mario Carneiro
9ca2113790 refactor(init/algebra/group): parameterize transport_mul_to_add 2017-07-28 16:47:53 +01:00
Mario Carneiro
bd19736b21 feat(init/data/nat/bitwise): definitional lemmas for nat.shiftl 2017-07-28 16:47:53 +01:00
Mario Carneiro
89131ba1ff feat(init/meta/interactive): expose custom hyp name in by_contra 2017-07-28 16:47:53 +01:00
Mario Carneiro
e6294710db refactor(init/classical): simplify classical proofs 2017-07-28 16:47:53 +01:00
Mario Carneiro
ec82afb45a fix(tests): fix tests 2017-07-28 16:47:02 +01:00
Mario Carneiro
26548c956c feat(init/meta/interactive): rw at *, rw at h1 h2 |- support
Now tactics supporting locations can also specify the goal among the locations by using the name `⊢` or `|-`. Also `rw at *` is implemented so that it will rewrite any hypotheses or the goal for which the whole sequence of rewrites succeeds. (This is different from `rw at h1 h2 ... hn |-`, which requires that all rewrites run to completion on each specified target.)
2017-07-28 16:47:02 +01:00
Leonardo de Moura
870ce5c0fe fix(library/init/meta/constructor_tactic): fixes #1771 2017-07-28 09:45:51 +01:00
Leonardo de Moura
16e7976b1a chore(library/init/data/vector): remove [...] notation for vectors
This is a temporary workaround. The problem is that this notation
overloads the one in list, and we currently can't handle nary
overloads in patterns.
2017-07-26 13:45:30 +01:00
Leonardo de Moura
a258620425 feat(library/init/data/default): add vector and bitvec 2017-07-26 13:38:51 +01:00
Leonardo de Moura
1ec65bed44 refactor(library/init): move bitvector to main repo
@digama0 I moved bitvec back to the main repo, and many nat lemmas.
I want these lemmas here for now. I will need some of them for future
decision procedures.
2017-07-26 13:35:38 +01:00
Mario Carneiro
fb2447468b chore(init/category/combinators): remove monad.for
and variations, in favor of monad.map and variations
2017-07-26 11:52:11 +01:00
Mario Carneiro
4dc261393f refactor(init/data/list): move out advanced list defs 2017-07-26 11:52:11 +01:00
Mario Carneiro
813fda9ba5 refactor(init/data/{nat,list}): rename for consistency with stdlib 2017-07-26 11:52:10 +01:00
Mario Carneiro
09f9cada65 chore(init/data/nat): rename add_one_eq_succ -> add_one 2017-07-26 11:52:10 +01:00
Mario Carneiro
cc81118892 refactor(init/data): move out some nat lemmas 2017-07-26 11:52:10 +01:00
Mario Carneiro
74aeb250ec refactor(*): move out stdlib 2017-07-26 11:52:10 +01:00
Gabriel Ebner
d68665f7a2 chore(library/init/meta/tactic): fix copy-paste error in docstring 2017-07-23 09:48:08 +01:00
Leonardo de Moura
4faae27069 perf(frontends/lean): add notation #[...]
The new notation should be use to input long sequences.
Closes #1755
2017-07-21 04:20:48 -07:00
Leonardo de Moura
af80c2890d chore(library/init/meta/tactic): define focus_aux using is_assigned 2017-07-21 02:39:55 -07:00
Mario Carneiro
97a01d25fd fix(init/meta/tactic): skip solved goals in seq_focus and seq
and all/any_goals. This occurs when solving the first subgoal generated by `tac1; tac2` closes the second goal as well, before the second `tac2` invocation is run. Reported by @jldodds on gitter.
2017-07-21 02:10:48 -07:00
Sebastian Ullrich
a1066525ca feat(init/meta/interactive): auto-generalize inductive major premise args
Like Isabelle
2017-07-20 01:51:00 -07:00
Sebastian Ullrich
20c2232bc6 feat(init/meta/interactive): auto-generalize induct parameter
Like Isabelle
2017-07-20 01:51:00 -07:00
Sebastian Ullrich
7d39b3e948 refactor(init/meta/interactive): merge generalize and generalize2 and introduce nicer syntax 2017-07-20 01:51:00 -07:00
Mario Carneiro
89e860ac8b doc(init/core): Document init_quotient in lean
This way people can search for "constant quot" and find it in the lean source. Plus the init_quotient command only occurs once, so this way people know what it means.
2017-07-20 01:36:28 -07:00
Mario Carneiro
dfbcb72f38 chore(init/meta/tactic): remove superfluous fail clause 2017-07-20 01:28:21 -07:00
Mario Carneiro
4ae2f87bc8 refactor(init/meta/tactic): use dite instead of cases in by_cases
This fixes the issue in PR #1752 by using `dite`, which is essentially nondependent cases, so that the decidable instances are not substituted.
2017-07-20 01:28:21 -07:00
Gabriel Ebner
ba2718a89d feat(library/init/meta/environment): expose function to unfold all macros 2017-07-18 19:49:53 +01:00
Sebastian Ullrich
cbf65c1339 fix(init/meta/interactive): implement generalize2 via generalize/kabstract 2017-07-17 13:59:21 +02:00
Leonardo de Moura
9afb53fad5 feat(kernel/expr): allow metavariables to have user-facing names
We need this feature for:
1) Defining nonlinear search patterns. Example: (?m <= ?m + 1)
2) Preprocessing recursive equations and support the pattern
refinement approach used in Agda. Example: in Agda, they accept
```
def append {A : Type} : Π (m n : nat), Vec A m -> Vec A n -> Vec A (m + n)
| m n nil            ys := ys
| m n (cons m' x xs) ys := cons x (append m' n xs ys)
```
These equations have to be refined. For example, `m` has to be
replaced with `0` (in the first equation), and `succ m'` in the
second. To implement this kind of refinement, we need to convert
the pattern variables (local constants) into metavariables during
elaboration. Then, the unassigned metavariables become local constants
again. This preprocessing step will fix some of the issues on #1594.
To completely fix #1594, we will need yet another preprocessing step
which will implement "complete transition" used in the equation
compiler before we start elim_match.cpp
2017-07-16 07:16:41 -07:00
Gabriel Ebner
563c1bcffe chore(library/init/meta/tactic): make first argument of id_locked implicit 2017-07-15 17:47:46 +01:00