Leonardo de Moura
77d3a788e8
refactor(init): init/category ==> init.control
2018-04-27 08:33:08 -07:00
Leonardo de Moura
ba47a28dde
chore(library/init/category/state): remove unnecessary assumption
...
cc @kha
2018-04-25 17:25:41 -07:00
Leonardo de Moura
1fd399d06f
feat(library/init/compiler/ir): use run_state and run_reader
2018-04-24 12:48:12 -07:00
Leonardo de Moura
9389176380
feat(library/init/category): add missing @[inline] to adapt functions
2018-04-23 10:38:54 -07:00
Sebastian Ullrich
a41d797900
fix(init/category/state): lift unintended universe restriction
2018-03-26 13:00:23 +02:00
Sebastian Ullrich
7daf6a2133
refactor(init/category): change _functor classes into new _adapter classes, add docs
2018-03-20 14:58:37 -07: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
112bddd343
chore(init/category/lift): remove unused monad_run.unrun field
2018-03-20 14:58:37 -07:00
Sebastian Ullrich
3adc5113cb
feat(init/category/state): make zoom work linearly
2018-03-20 14:58:36 -07:00
Sebastian Ullrich
c104d5d34b
doc(init/category/state): add docs and tests
2018-03-20 14:58:36 -07:00
Sebastian Ullrich
c56606d06a
refactor(init/category/state): remove flipped state_t.run
2018-03-20 14:58:36 -07:00
Sebastian Ullrich
afe3078b4b
chore(init/category): final touches
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
b5c9569d86
feat(init/category): add cont_t monad transformer
2018-03-20 14:58:36 -07:00
Sebastian Ullrich
ace8ef286a
feat(init/category): even more refactorings, simp lemmas
2018-03-20 14:58:36 -07:00
Sebastian Ullrich
5599c9ca67
feat(init/category): misc enhancements from the tactic refactoring
2018-03-20 14:58:36 -07:00
Sebastian Ullrich
4742d44a74
feat(init/category/state): add monad_except instance for state_t
2018-03-20 14:58:36 -07:00
Sebastian Ullrich
b372dd94d3
feat(init/category/transformers): add monad_run class
2018-03-20 14:58:36 -07:00
Sebastian Ullrich
69cfdbd290
refactor(init/category): make all monad transformers structures, replace monad classes with has_monad_lift_t wrappers
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
1a0363c7c2
feat(init/category/state): add run method, rename with_state
2018-03-20 14:58:36 -07:00
Sebastian Ullrich
c36393066e
feat(init/category): introduce monad_functor and implement it for reader, state, and except
2018-03-20 14:58:36 -07:00
Sebastian Ullrich
7565ce380f
feat(init/category): some helper functions
2018-03-20 14:58:35 -07:00
Sebastian Ullrich
e24b364d0e
refactor(init/category/state): change monad_state.state to monad_state.embed taking state
2018-03-20 14:58:35 -07:00
Sebastian Ullrich
788e8695eb
refactor(init/category/state): replace modify/put (returning unit) with modify'/put' (returning punit)
2018-03-20 14:58:35 -07:00
Sebastian Ullrich
b28a0392f7
feat(frontends/lean/structure_cmd): allow implicitness infer annotation and parameters in field declaration
2018-03-20 14:58:35 -07:00
Sebastian Ullrich
e9b2d1fdc8
refactor(init/category/state): remove dependency on tactic framework
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
Leonardo de Moura
c943576e5a
feat(library/init): add funext tactic
2017-12-04 14:54:39 -08:00
Sebastian Ullrich
f6b113849b
fix(init/category/monad): bind_pure: remove stray parameter
2017-11-28 17:00:22 +01:00
Leonardo de Moura
52d6adc19c
chore(library): use new structure update notation in the core lib
2017-11-17 16:57:54 -08:00
Sebastian Ullrich
0a48809469
refactor(frontends/lean/tactic_notation): rename note/define tactics to have/let
2017-06-22 08:03:23 -07:00
Mario Carneiro
b775a01fba
refactor(init/meta/interactive): merge assert -> note
2017-06-22 08:03:23 -07:00
Leonardo de Moura
cabb4350d9
feat(library): instances are not reducible by default anymore
...
Motivation: see "Other goodies" section at
https://github.com/leanprover/lean/wiki/Refactoring-structures
We had to add a new transparency mode: Instances at type_context.
In this mode, instances and reducible definitions are considered
transparent.
The new mode is used in the defeq_canonizer, code generator,
and sizeof lemma generation at inductive_compiler.
We also use the new mode in the unfold tactics.
2017-04-26 14:10:11 -07:00
Leonardo de Moura
cdafd4b791
chore(library): cleanup proofs
2017-04-25 17:23:42 -07:00
Sebastian Ullrich
e9a6c544af
refactor(frontends/lean/{elaborator,structure_cmd}): compile structure inheritance to nested fields
2017-04-24 19:35:15 +02: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
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
Sebastian Ullrich
763097dbd2
refactor(library): revise the monadic hierarchy
2017-03-09 20:30:03 -08:00
Leonardo de Moura
c37634c815
feat(library/init): add helper functions and instances
2017-02-13 14:53:32 -08:00
Gabriel Ebner
6b15f6cef9
feat(library/tools/super): add super prover
2016-12-16 18:18:13 -08:00
Leonardo de Moura
6577cc87a3
feat(library): add pre_monad
...
closes #1235
2016-12-08 12:48:55 -08:00
Leonardo de Moura
00f5a807af
refactor(library/init): create init.category folder
2016-12-02 15:52:49 -08:00