Leonardo de Moura
6887a99f08
feat(library/init/category/state): make state and state_t universe polymorphic
...
The new definitions are not fully general since they force data and
state to be in the same universe.
2017-03-22 23:45:29 -07:00
Leonardo de Moura
60dd85719c
feat(library/system/io): system.io without axioms
2017-03-22 23:36:05 -07:00
Scott Morrison
d6f5370ea7
doc(fixing_broken_links)
...
A stopgap fix for broken links in `library.md`. Addresses #1649 for now.
2017-03-22 08:13:36 -07:00
Sebastian Ullrich
a5db5ae4de
refactor(init/meta/interactive): rw: parse - separately to remove hack
2017-03-22 07:54:12 -07:00
Sebastian Ullrich
9cf80a6c94
feat(init/meta/interactive): rw goal info on ]
2017-03-22 07:54:12 -07:00
Sebastian Ullrich
da7e21696e
feat(init/meta/interactive): rw goal info on ,
2017-03-22 07:54:12 -07:00
Sebastian Ullrich
793f0baee8
feat(library/tactic/vm_monitor): use attribute for registering VM monitors
2017-03-22 07:34:27 -07:00
Rob Lewis
2e921dd533
fix(algebra): generalize theorem
2017-03-22 07:34:01 -07:00
Leonardo de Moura
8feacb27a6
feat(library/data): add buffer
2017-03-21 18:47:50 -07:00
Leonardo de Moura
fdadada3a9
fix(frontends/lean): fixes #1468
...
@kha I had to add yet another hack to fix this issue.
In notation declarations, names are resolved at notation declaration time.
So, users do not expect them to be resolved again at tactic execution time.
I addressed this problem by wrapping constants occurring in notation
declarations with a "frozen_name" annotation. This transformation is
only performed if m_in_quote is true.
Then resolve_names_fn at elaborator.cpp will not try to resolve the
names again.
This change broke two other modules. `-` notation for inverting
equations at `rw`, and `calc` expressions inside quotes.
The broke for the same reason. They were not expecting the constants
to be wrapped with an annotation.
2017-03-18 13:48:21 -07:00
Leonardo de Moura
31b6dc222d
feat(library/init/meta/expr): add expr.is_annotation
2017-03-18 13:40:11 -07:00
Sebastian Ullrich
7c31e62b16
feat(init/meta/interactive): improve pretty-printing of list_of and itactic
2017-03-17 18:20:44 -07:00
Sebastian Ullrich
421a6d6f01
feat(frontends/lean/interactive,emacs): highlight current tactic parameter
2017-03-17 18:20:44 -07:00
Sebastian Ullrich
c46936d180
fix(frontends/lean/interactive): hard-code tactic pretty printing
2017-03-17 18:20:44 -07:00
Sebastian Ullrich
803d3073ae
feat(frontends/lean): add interactive.type_formatter attribute and use it to pretty print interactive tactics
2017-03-17 18:20:44 -07:00
Sebastian Ullrich
0792bc13db
feat(frontends/lean/elaborator,init/meta/interactive): relax expr pattern elaboration and use it to implement a tactic signature pretty printer
2017-03-17 18:20:44 -07:00
Gabriel Ebner
886c824e33
feat(library/init/data/list/instances): prove decidability of bounded quantification
2017-03-17 18:03:26 -07:00
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
Daniel Selsam
aa209d89e7
fix(library/smt/prove.lean): collect_props was collecting (H : Prop)
2017-03-12 09:54:01 -07:00
Simon Hudon
58b9d0ae8e
feat(library/data/bitvec): to_nat and of_nat cancel each other
2017-03-12 09:38:57 -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
37f3e5cc69
refactor(library/data/dlist): change 'inv' to 'invariant'
2017-03-08 19:31:27 -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