Leonardo de Moura
71685e4dd6
feat(frontends/lean): add support for t.<id> and t.<idx> when t is a composite term
...
Replace `^.` with `.` in the stdlib
2017-03-28 17:47:49 -07:00
Leonardo de Moura
87932f1c56
feat(frontends/lean): change notation for inaccessible patterns
...
The following are accepted
.(t)
._
We don't accept .t anymore because it will conflict with the field
access notation.
2017-03-28 16:09:15 -07:00
Sebastian Ullrich
9e8ef54402
refactor(init/data/list/instances): simplify proofs
2017-03-27 13:42:08 -07:00
Sebastian Ullrich
dfd84666e2
feat(library): add functor, applicative, and monad laws, and prove them correct for non-meta instances
2017-03-27 13:42:08 -07:00
Sebastian Ullrich
3ead6be9ca
feat(init): add default value proofs to the monadic hierarchy
2017-03-27 13:42:08 -07:00
Leonardo de Moura
900c56be05
feat(frontends/lean,library/equations_compiler): abstract proofs in equations and regular definitions
2017-03-25 14:22:52 -07:00
Leonardo de Moura
8feacb27a6
feat(library/data): add buffer
2017-03-21 18:47:50 -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
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
Sebastian Ullrich
763097dbd2
refactor(library): revise the monadic hierarchy
2017-03-09 20:30:03 -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
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
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
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
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
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
Leonardo de Moura
05962604f1
feat(library/init/data/bool): add basic simp lemmas for bool
2017-03-04 16:31:16 -08:00
Leonardo de Moura
d8371a4b0d
feat(library/data/hash_map): avoid read' and write' operations that require an extra test
2017-03-01 22:06:48 -08:00
Leonardo de Moura
04991692bf
feat(library/init/data/nat/lemmas): aux lemmas
2017-03-01 20:28:27 -08:00
Leonardo de Moura
52221cdbd1
fix(frontends/lean/elaborator): {} elaboration issue
2017-02-24 21:20:39 -08:00
Leonardo de Moura
b9204cefbc
feat(library/init/data/array): add helper functions and instances
2017-02-21 13:45:03 -08:00
Daniel Selsam
5f630e5866
fix(library/init/data/option/basic.lean): remove unused type parameter in instance
2017-02-21 11:00:40 -08:00
Leonardo de Moura
d1d5428808
feat(library): add check_constants.lean validation, cleanup unused names, minor stdlib fixes
2017-02-21 10:45:31 -08:00
Leonardo de Moura
e9a98362d3
feat(library): functional arrays
2017-02-20 22:00:02 -08:00
Leonardo de Moura
1ca5c78cf8
feat(library/tools/mini_crush): improve mini_crush
2017-02-19 18:33:12 -08:00
Leonardo de Moura
b52e8d67be
feat(library/init/meta): simp&intro tactics
2017-02-19 13:02:27 -08:00
Leonardo de Moura
0d22410e2e
feat(library/tactic): add zeta option, refactor simplify config option, allow users to change simplify_config in interactive mode
2017-02-19 12:11:22 -08:00
Leonardo de Moura
4f3fd2cba6
feat(library/init/data/list/qsort): add temp qsort as meta definition
2017-02-17 21:07:09 -08:00
Sebastian Ullrich
b9424975b3
refactor(init/meta): replace dynamically-checked quotes where possible
2017-02-17 19:59:57 -08:00
Leonardo de Moura
632c98aade
feat(library/data/list): cleanup proofs
2017-02-17 19:42:57 -08:00
Sebastian Ullrich
d15591a2d8
feat(library,frontends/lean): expose parser to Lean and use for parsing tactic parameters
2017-02-17 13:45:56 +01:00
Rob Lewis
46a46c9ee0
feat(norm_num): handle nat subtraction as a special case
2017-02-12 17:15:08 -08:00
Leonardo de Moura
2f5159e7eb
feat(library/init/meta): add simple tactics for testing where a declaration was defined
2017-02-11 10:57:06 -08:00
Leonardo de Moura
32e6442d0a
feat(frontends/lean): no global universes in the frontend
2017-02-08 17:23:04 -08:00
Leonardo de Moura
38557b5d6c
feat(library/init/data/nat/basic): missing lemma
2017-02-07 17:21:26 -08:00