Commit graph

124 commits

Author SHA1 Message Date
Sebastian Ullrich
3fefe94757 refactor(library/init/core,library/init/unit): make unit an abbreviation of punit.{0} 2018-03-27 10:33:04 -07:00
Sebastian Ullrich
06e0d78e21 chore(doc/changes): update changelog 2018-03-26 12:55:38 +02:00
Sebastian Ullrich
70167def6f refactor(init/category/state): replace monad_state_lift with Haskell's MonadState
* does not leak information about the inner monad via out_param
* can be derived from an inner `monad_state` instance
2018-03-20 14:58:37 -07:00
Sebastian Ullrich
bcbe5ec9f4 refactor(init/category/functor): merge has_map into functor 2018-03-20 14:58:36 -07:00
Sebastian Ullrich
bac0f66ca0 chore(init/category/combinators): remove unnecessary monad.lift{n} 2018-03-20 14:58:36 -07:00
Sebastian Ullrich
f4c2499063 chore(init/category/transformers): remove now-unused monad_transformer class, rename to lift.lean 2018-03-20 14:58:36 -07:00
Sebastian Ullrich
22d15bac7f chore(changes.md): changelog 2018-03-20 14:58:36 -07:00
Sebastian Ullrich
8c157eba64 refactor(init/category/state): replace monad_state with monad_state_lift 2018-03-20 14:58:36 -07:00
Sebastian Ullrich
940aca1ec3 refactor(init/category/lawful): unbundle lawful classes 2018-03-20 14:58:35 -07:00
Sebastian Ullrich
159b45c74f refactor(init/category/state): introduce monad_state
* rename `read/write` to `get/put`, as in Haskell
* define `state` as `state_t id`
2018-03-20 14:58:35 -07:00
Sebastian Ullrich
1c6861528b refactor(init/category): move monad laws into separate type classes defined after the tactic framework 2018-03-20 14:58:35 -07:00
Sebastian Ullrich
63382cf7e3 chore(init/category/transformers): move monad_transformer, monad_lift out of monad namespace, make universe polymorphic 2018-03-20 14:58:35 -07:00
Sebastian Ullrich
1abf8738fc feat(frontends/lean/structure_cmd): allow implicitness infer annotation and parameters in field declaration 2018-02-28 12:49:22 +01:00
Sebastian Ullrich
cf8dd9e75e feat(fronteds/lean/builtin_exprs): do notation: use overloadable bind instead of has_bind.bind 2018-02-28 12:49:22 +01:00
Sebastian Ullrich
f247363305 feat(library/time_task): print cumulative times on --profile 2018-02-19 09:13:24 -08:00
Sebastian Ullrich
b3262d53b4 feat(frontends/lean/elaborator): structure notation: fall back to inferring superclasses 2018-02-02 08:58:53 -08:00
Sebastian Ullrich
86e231e6c9 feat(frontends/lean/structure_cmd): make superclass fields inst implicit 2018-02-02 08:58:53 -08:00
Sebastian Ullrich
9f25cf665e feat(frontends/lean/elaborator): structure instance notation: allow implicit fields 2018-02-02 08:58:53 -08:00
Leonardo de Moura
0ad5497462 refactor(library/io): make io easier to extend and use 2018-01-23 15:03:31 -08:00
matt rice
1538615e8c feat(util): allow some math alphanum symbol latin letter variations
Add the Script, Double-struck, and Fractur blocks from,
https://unicode.org/charts/PDF/U1D400.pdf
to is_letter_like() so they may be bound to variables.
2018-01-23 11:20:05 -08:00
Leonardo de Moura
368f17d0b1 feat(library/tactic/simplify): add simp! 2018-01-16 17:29:24 -08:00
Leonardo de Moura
c195d7c2a1 feat(library/tactic/simp_tactic): improve mk_simp_attr
- An new simp attribute may depend on other existing attributes

- Add `[norm]` simp attribute. It is an extension of the default `[simp]` attribute.
  It should be used to add extra rules for normalizing goals.
  These extra rules are used to produce normal forms and/or reduce the
  number of constants used in a goal. Here is an example coming from a
  discussion with @kha. When working with monads, we may want to
  eliminate `<$>` by using the lemma `f <$> x = x >>= pure ∘ f`.
  This lemma is in the `[norm]` simp set, but it is not in `[simp]`
2018-01-16 16:47:30 -08:00
Sebastian Ullrich
1d1e997809 chore(doc/changes): document new leanpkg features 2018-01-15 09:58:19 +01:00
Sebastian Ullrich
b354feb8b9 fix(leanpkg): mandate path = "src"
Fixes #1880
2018-01-15 09:58:19 +01:00
Leonardo de Moura
cebde17bec feat(library/tactic/simplify): simp reduces c a_1 ... a_n = c b_1 ... b_n into a_1 = b_1 /\ ... /\ a_n = b_n 2018-01-12 18:18:56 -08:00
Leonardo de Moura
58fce78282 feat(library/init/meta/interactive): add interactive tactic subst_vars 2018-01-12 14:37:11 -08:00
Leonardo de Moura
5bad6d5372 feat(library/init/meta/tactic): subst supports heterogeneous equalities that are actually homogeneous 2018-01-12 14:32:49 -08:00
Leonardo de Moura
4bd314f7bd feat(library/tactic/simplify): simp reduces c_1 ... = c_2 ... to false 2018-01-12 11:30:45 -08:00
Leonardo de Moura
c3d4a9456e feat(library/init/meta/interactive): add sorry interactive tactic (alias for admit). 2018-01-11 16:58:46 -08:00
Leonardo de Moura
c5df94ed17 feat(library/tactic): add support for auto params at simp tactic 2018-01-11 16:47:22 -08:00
Leonardo de Moura
5cd0f25c1e doc(doc/changes): describe new "smart unfolding" feature 2018-01-09 16:47:32 -08:00
Leonardo de Moura
587540f11b feat(frontends/lean): add abbreviation command
This command is not just a cosmetic feature.
We need it to defined `id_rhs` before the tactic framework is defined.
We want `id_rhs` to be used in all definitions generated by the equation
compiler. Right now, it is only used in definitions defined after the
tactic framework.
2018-01-05 15:40:59 -08:00
Leonardo de Moura
91ff183b3e chore(library): remove out notation for out_param 2017-12-15 15:47:58 -08:00
Leonardo de Moura
f0352d31a1 feat(library/type_context, library): inout ==> out modifier in type class declarations
@kha: I decided to implement this change before I start the
type_context modifications. The change did not affect the corelib and
test suite much. The only annoying problem is that `out` cannot be
used to name locals anymore.
2017-12-15 14:46:47 -08:00
Leonardo de Moura
746134d11c feat(library/init/meta/interactive): add goal tagging support for by_cases
This commit also incorporates changes suggested at commit 84a1911949dec94.
2017-12-13 15:17:13 -08:00
Leonardo de Moura
6c44dd1b7f feat(frontends/lean): add hide command
cc: @kha
2017-12-13 11:53:21 -08:00
Leonardo de Moura
533ddc0279 fix(library/init/meta/interactive): remove buggy generalizing param from with_cases 2017-12-11 16:27:04 -08:00
Leonardo de Moura
b778d77c0c chore(doc/changes): with_cases and cases changes, - ==> * 2017-12-11 16:27:04 -08:00
Leonardo de Moura
d44996e034 feat(library/init/meta): propagate tag information 2017-12-10 19:15:41 -08:00
Leonardo de Moura
e23db3970a feat(library/init/meta/tactic): apply tactic return parameter name associated with new metavars 2017-12-10 12:11:58 -08:00
Leonardo de Moura
49e7a642c3 feat(library/init/meta/interactive): merge ginduction and induction
This commit is based on 638b34b16de6443.
The changes were applied manually to make sure all changes are
compatible with our plans to `induction`.
2017-12-07 19:10:10 -08:00
Leonardo de Moura
84db9e9e43 feat(library/init/meta/interactive): add constructor_matching tactic 2017-12-06 13:17:06 -08:00
Leonardo de Moura
c89e2457bb feat(library/init/meta/interactive): add cases_type tactic
see doc/changes.md
2017-12-06 12:55:10 -08:00
Leonardo de Moura
1b34160396 feat(library/tactic/tactic_state): display number of goals 2017-12-06 11:20:09 -08:00
Leonardo de Moura
e00c0de12e chore(library/data/rbtree, changes.md): cleanup 2017-12-06 09:55:06 -08:00
Leonardo de Moura
a056e87350 fix(library/init/meta/injection_tactic): add support for ginductive datatypes 2017-12-06 09:39:20 -08:00
Leonardo de Moura
03eda2ecc0 feat(library/init/meta/interactive): add cases_matching p tactic 2017-12-05 18:17:44 -08:00
Leonardo de Moura
b06549bc05 feat(library/init/meta): add guard_names { t } tactical 2017-12-05 16:29:46 -08:00
Leonardo de Moura
bc89ebc19c feat(kernel/inductive): improve how induction hypotheses are named
See doc/changes.md
2017-12-05 15:58:09 -08:00
Leonardo de Moura
a2f55e5d7b feat(library/tactic/induction_tactic): new name generator for induction and cases tactics 2017-12-05 14:57:36 -08:00