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
Gabriel Ebner
ee56f71260
fix(library/init/data/nat/lemmas): make various lemmas rfl
2017-07-15 10:38:06 +01:00
Leonardo de Moura
8dcccd3bfc
fix(frontends/lean/parser): make sure imax and max level arguments are parsed using the same precendence we use to parse application arguments
...
This commit addresses an issue raised by @digama0 on the Lean slack channel.
2017-07-07 12:43:07 -07:00
Leonardo de Moura
9555a104d6
feat(library/init/meta/tactic): simplify ‹p› notation
...
@jroesch See the new test :)
2017-07-07 12:05:02 -07:00
Leonardo de Moura
b7b331957a
chore(library/init/data/nat/bitwise): we now support rw [f] for applying f-eqn_lemmas
2017-07-07 12:03:47 -07:00
Sebastian Ullrich
ac8de2472e
feat(library/tactic/induction_tactic): clear hypothesis before introducing new ones
2017-07-07 10:06:30 -07:00
Gabriel Ebner
c5b6c52ad1
feat(library/init/data/nat/lemmas): decidable_linear_ordered_cancel_comm_monoid instance
2017-07-07 08:49:12 +02:00
Leonardo de Moura
ced4b6a54d
fix(library/init/meta/interactive): fixes #1733
2017-07-06 22:34:24 -07:00
Sebastian Ullrich
1c389cb925
chore(init/meta/interactive): hide rw ASCII notation in syntax description
2017-07-06 14:03:08 +02:00
Jeremy Avigad
5fd113f50f
feat(library/init/logic): add simp rule for 'true implies p'
2017-07-05 14:26:04 -07:00
Leonardo de Moura
70ade81a30
feat(library/init/meta/interactive): allow user to set configuration options at unfold_projs
...
See issue #1725
2017-07-05 13:00:43 -07:00
Leonardo de Moura
9645e7588e
chore(library/init/data): recent changes
2017-07-05 12:44:56 -07:00
Mario Carneiro
b557d9012d
refactor(init/data/nat/gcd): swap args in gcd.induction
...
to match swapped induction arg of gcd
2017-07-05 12:37:54 -07:00
Mario Carneiro
50bf075d73
feat(data/hash_map): hash_map.of_list
2017-07-05 12:37:54 -07:00
Mario Carneiro
a1cfce88d5
feat(init/data/list): filter theorems, non-meta qsort
2017-07-05 12:37:54 -07:00
Mario Carneiro
8920d55f8d
feat(init/logic): decidability of partial functions
2017-07-05 12:37:54 -07:00
Mario Carneiro
35ed9e9301
feat(init/data/ordering): ordering.or_else, string lex order
2017-07-05 12:37:54 -07:00