Leonardo de Moura
36770119b6
feat(library): do not generate C.destruct (for structures), and C.induction_on (for structures and inductive datatypes)
2017-03-15 14:45:13 -07:00
Sebastian Ullrich
e3b9190fe2
refactor(library/tactic/user_attribute): use attribute for registering attributes. naturally.
2017-03-15 14:06:34 -07:00
Leonardo de Moura
e0e3f51c44
feat(library/init): add unification hint for add/succ
2017-03-12 13:45:30 -07:00
Simon Hudon
b6889e91fe
feat(lib/init/data/nat): add function pow and a Galois connection between div and mul
2017-03-12 09:38:19 -07:00
Leonardo de Moura
3a4cd38ba9
chore(library/init): remove reducible annotations for id, const, etc, and move $ notation to core.lean
2017-03-11 11:34:16 -08:00
Leonardo de Moura
2f6c4d91e4
feat(library/init/core): simplify proofs
2017-03-10 22:42:21 -08:00
Daniel Selsam
e72d516252
refactor(inductive_compiler): use subst to prove packs injective instead of constructors
2017-03-10 22:27:29 -08:00
Daniel Selsam
538ac8d187
feat(inductive_compiler): generate injectivity lemmas
2017-03-10 22:27:18 -08:00
Leonardo de Moura
98e93b73b2
feat(library/init/meta/name): add name.replace_prefix
2017-03-10 22:16:21 -08:00
Sebastian Ullrich
16558bf082
refactor(library,library): rename pre_monad to has_bind
2017-03-09 20:32:25 -08:00
Sebastian Ullrich
763097dbd2
refactor(library): revise the monadic hierarchy
2017-03-09 20:30:03 -08:00
Leonardo de Moura
9d3c0497cb
chore(frontends/lean): rename transient commands
...
See issue #1432
2017-03-09 18:41:19 -08:00
Leonardo de Moura
a00f2e49a7
chore(frontends/lean): remove several command aliases
...
We still have many more to remove and rename.
See issue #1432
2017-03-09 16:49:03 -08:00
Leonardo de Moura
3e757d890a
feat(library/tactic/intro_tactic): allow '_' in interactive mode as the anonymous name for intros, cases, induction
2017-03-09 15:42:36 -08:00
Leonardo de Moura
b6f6126075
feat(frontends/lean/pp): add attribute [pp_using_anonymous_constructor] for marking structures we should use the anonymous constructor notation when pretty printing instances
2017-03-09 15:17:18 -08:00
Leonardo de Moura
c58f61e925
feat(frontends/lean/elaborator): new encoding for structure updates {s with ...}
...
See discussion at #1438
https://github.com/leanprover/lean/pull/1438#discussion_r105007325
@digama0 With this commit, the original `array_list.write` will also
perform a destructive update when the reference counter for `l` is 1.
```lean def write {α} (l : array_list α) : fin l^.length → α → array_list α :=
λ ⟨n, h⟩ v, { l with data := l^.data^.write ⟨n, l^.lt_capacity h⟩ h v }
```
2017-03-09 00:11:51 -08:00
Leonardo de Moura
c086c58b4a
fix(library/init/meta/simp_tactic): simp_intro_aux tactic should not fail when hypothesis cannot be simplified
2017-03-08 21:20:43 -08:00
Jeremy Avigad
95f75bbbee
refactor(library/init/data/subtype/basic): rename subtype constructor and projections
2017-03-08 19:31:27 -08:00
Leonardo de Moura
7ac6b14d2a
chore(library/init/data/int/basic): use abstract when transfering in an instance declaration
...
@johoelzl I'm using `abstract` tactic because instances are
automatically marked as [reducible], and they will be unfolded when
solving unification constraints. This cannot be avoided since we need to
solve unification constraints such as
int.has_add =?= comm_ring.to_has_add int.comm_ring
The `abstract tac` tactic creates an auxiliary lemma to store the proof
generated by `tac`. If we use `print int.comm_ring` we can see that
the definition is much smaller. The proofs are irrelevant. So, this has
no drawbacks, and gives us a good performance boost.
2017-03-07 19:57:43 -08:00
Johannes Hölzl
d6eae3265c
feat(library/data/dlist): setup transfer for dlist
2017-03-07 19:30:51 -08:00
Johannes Hölzl
9d62638e9a
chore(library/init/meta/transfer): short documentation of transfer rules
2017-03-07 19:30:51 -08:00
Johannes Hölzl
1f45995c16
feat(library/init/meta/transfer): add transfer and use for int
...
This commit introduces the transfer method. As application it is
used it to prove that the integers form a commutative ring.
2017-03-07 19:30:51 -08:00
Johannes Hölzl
ca0fe37c41
feat(library/init/meta/tactic): add mk_local_pis
2017-03-07 19:30:51 -08:00
Johannes Hölzl
da4f552a7a
feat(library/init/meta): add decidable_eq for binder_info
2017-03-07 19:30:51 -08:00
Johannes Hölzl
69ed20f656
feat(library/init/meta/match_tactic): add tactic_format for pattern
2017-03-07 19:30:51 -08:00
Johannes Hölzl
0ad5f5bc89
feat(library/init/meta/expr): add instantiate_local(s)
2017-03-07 19:30:51 -08:00
Johannes Hölzl
9e9b289031
feat(library/init/data/prod): add prod.map
2017-03-07 19:30:51 -08:00
Johannes Hölzl
b593d090f2
feat(library/init/data/list): add remove_all
2017-03-07 19:30:51 -08:00
Johannes Hölzl
1c30a593c1
feat(library/init/data/list): add enum
2017-03-07 19:30:51 -08:00
Johannes Hölzl
16aaa9b88e
feat(library/init/data/list): add unzip
2017-03-07 19:30:51 -08:00
Johannes Hölzl
4c88e2c5b0
feat(library/init/data/int): use relators for proof of int is a ring
2017-03-07 19:30:51 -08:00
Leonardo de Moura
0c6108ce7a
chore(library/init/data/quot): use Sort instead of Type
...
Remark: The kernel was already using Sort. So, the limitation was
artificial. Moreover, it may seem unnecessary to have quotients of
proofs in a proof irrelevant system, but this is useful for proving
a more general funext lemma. This more general version is needed in
the new tested contributed by @digama0.
2017-03-07 14:29:57 -08:00
Mario Carneiro
793017b190
feat(library/init/logic.lean): add Sort -> Prop universe lift
2017-03-07 14:01:59 -08:00
Leonardo de Moura
51958df84b
chore(frontends/lean/token_table): remove dead keywords
2017-03-07 14:00:49 -08:00
Leonardo de Moura
9a263a2766
chore(library/init): instances are reducible and are inlined by the compiler
...
So, these instances would create two copies of `p` after inlining
2017-03-07 10:58:09 -08:00
Jeremy Avigad
803e1958fa
refactor(library/init/classical.lean): move definition of some
2017-03-06 10:54:42 -08:00
Leonardo de Moura
4608782669
fix(init/logic): eq.mpr and eq.mp can be use for type casting
...
So, they should be `def`. Otherwise code generation will fail.
2017-03-06 09:13:39 -08:00
Leonardo de Moura
156e5603d6
feat(library/init/category/combinators): put list combinators in the namespace list
...
In this way we can use them with the ^. notation
2017-03-05 21:30:30 -08:00
Leonardo de Moura
59c0cbd2e4
chore(library): test new '^.' notation in the standard library, and cleanup definitions using it
2017-03-05 21:21:50 -08:00
Leonardo de Moura
7cae7a5b02
feat(library/init/data/fin/ops): add def lemmas
2017-03-05 16:57:36 -08:00
Leonardo de Moura
0049a42336
feat(library/init/data/fin): add div
2017-03-05 16:43:15 -08:00
Leonardo de Moura
1cdf13821c
feat(library/init/data/unsigned): add basic unsigned operations
2017-03-05 16:14:16 -08:00
Leonardo de Moura
6134a4a70e
feat(library/init): basic operations for (fin n)
2017-03-05 16:00:02 -08:00
Leonardo de Moura
76f989d51c
chore(library/init/data/bool/lemmas): add (coe tt) and (coe ff) simp lemmas
2017-03-05 09:50:01 -08:00
Sebastian Ullrich
ddfdca2e57
chore(init/meta): replace some uses of to_expr `(...) with ``(...)
2017-03-05 08:37:16 -08:00
Sebastian Ullrich
5d68938a9c
feat(frontends/lean): expr literals ```(...)
2017-03-05 08:37:16 -08:00
Simon Hudon
b34eac6f1d
feat(library/init/data/nat): add theorem decomposing numbers into quotient and remainder
2017-03-05 08:29:34 -08:00
Leonardo de Moura
471c3644a3
chore(library/init/data/option/basic): add lift for option_t
2017-03-05 08:17:55 -08:00
Leonardo de Moura
aeb370ac6b
feat(library/init/data/bool/lemmas): add more simp lemmas for bool
2017-03-04 17:01:52 -08:00
Leonardo de Moura
c812e12651
chore(library/init/data/list/lemmas): remove old comment
2017-03-04 16:31:31 -08:00