Leonardo de Moura
477a137db9
feat(frontends/lean): remove 'using' expressions
...
Reason: we have include/omit commands
2016-07-28 09:53:27 -07:00
Leonardo de Moura
01283512a6
feat(frontends/lean/elaborator): add code for deciding which function application elaboration procedure should be used
2016-07-25 12:55:28 -07:00
Leonardo de Moura
212d222047
feat(frontends/lean): quoted names
2016-07-22 19:06:57 -07:00
Leonardo de Moura
599916c352
fix(frontends/lean/builtin_exprs): position information
2016-07-22 11:22:37 -07:00
Leonardo de Moura
9721757d87
fix(frontends/lean/builtin_exprs): position information when parsing do-notation
2016-07-22 11:14:33 -07:00
Leonardo de Moura
9740515be1
chore(frontends/lean/builtin_exprs): remove '#tactic'
2016-07-02 11:15:46 +01:00
Leonardo de Moura
6cb63d5f9a
feat(frontends/lean/builtin_exprs): simplify '@' and '@@'
2016-07-02 11:08:18 +01:00
Leonardo de Moura
90d920b7c9
chore(frontends/lean,library/explicit): remove dead code
2016-07-02 01:57:43 +01:00
Leonardo de Moura
97719a4c5f
refactor(frontends/lean): disable '!' operator, and adjust standard library
2016-07-02 01:41:46 +01:00
Leonardo de Moura
fbec9053dc
feat(frontends/lean/builtin_exprs): add 'else case' for do-match notation
2016-06-27 15:28:17 +01:00
Leonardo de Moura
c624c2d932
feat(frontends/lean): allow patterns in 'do' notation
2016-06-24 19:28:48 -07:00
Leonardo de Moura
9de819baaf
chore(library/init/monad): change precedence for >>= and >>
...
We are now using the same one used in Haskell.
2016-06-21 18:29:07 -07:00
Leonardo de Moura
46cf91c969
chore(frontends/lean): remove 'assert' keyword
...
In Lean3, `assert` was just an alias for `have`.
2016-06-17 14:20:26 -07:00
Leonardo de Moura
586baa4118
feat(library,frontends/lean): support for quoted expressions in the VM, compiler and frontend
...
TODO: invoke elaborator at tactic.to_expr
2016-06-15 16:06:39 -07:00
Leonardo de Moura
3996f9db4d
feat(frontends/lean): add ( token and remove token
2016-06-15 13:22:31 -07:00
Leonardo de Moura
5459e9ad8a
chore(frontends/lean): remove dead code
2016-06-13 10:42:38 -07:00
Leonardo de Moura
b54203f6b3
feat(frontends/lean): parse by-expression
2016-06-13 10:25:26 -07:00
Leonardo de Moura
d16e1d85fb
chore(frontends/lean): remove proof-qed expressions
2016-06-13 10:04:51 -07:00
Leonardo de Moura
0261a81eb0
feat(frontends/lean): add '()' as notation for unit.star
2016-06-08 17:26:48 -07:00
Leonardo de Moura
a61a6abba1
feat(src/frontends/lean/builtin_exprs): allow user to specify type of local decls in 'do' notation
2016-06-06 14:44:57 -07:00
Sebastian Ullrich
9561b45af1
fix(frontends/lean): uniform handling of declaration compound names
...
* allow compound names in `namespace` and `structure`
* adjust error messages
Conflicts:
src/frontends/lean/builtin_tactics.cpp
2016-06-02 18:13:50 -07:00
Leonardo de Moura
7c97d88be5
feat(frontends/lean/builtin_exprs): add optional curly braces for do-notation
2016-05-25 15:15:39 -07:00
Leonardo de Moura
174fba9dbd
feat(frontends/lean): add support for monadic 'do'-notation
2016-05-24 17:18:15 -07:00
Leonardo de Moura
54f68226f4
chore(frontends/lean): disable old tactic framework and blast
2016-04-25 16:22:15 -07:00
Leonardo de Moura
fdea718d9d
chore(frontends/lean): remove all #include "library/tactic.*" from frontends/lean
2016-04-25 15:41:12 -07:00
Leonardo de Moura
d88098f38d
chore(frontends/lean): remove some of the tactic support
2016-04-25 15:26:56 -07:00
Leonardo de Moura
de64750621
chore(frontends/lean): disable expressions that use tactic framework
2016-04-25 15:07:26 -07:00
Leonardo de Moura
22f3efc5be
remove(frontends/lean): begin_end pre-tactics
...
This was never used
2016-03-03 10:02:09 -08:00
Leonardo de Moura
3c878ecd01
feat(kernel): add let-expressions to the kernel
...
The frontend is still using the old "let-expression macros".
We will use the new let-expressions to implement the new tactic framework.
2016-02-29 16:40:17 -08:00
Leonardo de Moura
f55e456c84
chore(*): remove remaining references to by+ and begin+
2016-02-29 13:59:06 -08:00
Leonardo de Moura
b7b4b6d838
chore(src/frontends/lean/builtin_exprs): remove unnecessary parameter
2016-02-29 13:57:18 -08:00
Leonardo de Moura
fbe5188480
refactor(frontends/lean): remove 'by+' and 'begin+' tokens
2016-02-29 13:45:43 -08:00
Leonardo de Moura
bf60999ede
fix(frontends/lean/builtin_exprs): 'using' expression
2016-02-29 13:23:39 -08:00
Leonardo de Moura
2b1d734544
feat(kernel/expr): remove 'contextual' flag from binder_info
2016-02-29 12:41:43 -08:00
Leonardo de Moura
b41c65f549
feat(frontends/lean): remove '[visible]' annotation, remove 'is_visible' tracking
2016-02-29 12:31:23 -08:00
Leonardo de Moura
101cf1ec4c
feat(frontends/lean): remove difference between 'have' and 'assert'
2016-02-29 11:28:20 -08:00
Leonardo de Moura
04eaf184a9
feat(frontends/lean,library/unifier): checkpoints at have-expressions
...
@avigad, @fpvandoorn, @rlewis1988, @dselsam
This commit modifies how have-expressions are elaborated.
Now, to process
have H : <type>, from <proof>,
<rest>
we first process the constraints in <type> and <proof> simultaneously.
After all these constraints are solved, the elaborator performs
a Prolog-like cut, and process the constraints in <rest>.
So, all overloads, type classes and coercions in <type> and <proof> are solved
before we start processing <rest>. Moreover, while processing <rest>, we
cannot backtrack to <type> and <proof> anymore.
I fixed all affected proofs in the standard and HoTT libraries in
previous commits pushed today and yesterday. I think most affected proofs were not using a good
style and/or were easy to fix. Here is a common pattern that does not
work anymore.
structure has_scalar [class] (F V : Type) :=
(smul : F → V → V)
infixl ` • `:73 := has_scalar.smul
proposition smul_zero (a : R) : a • (0 : M) = 0 :=
have a • 0 + a • 0 = a • 0 + 0, by rewrite [-smul_left_distrib, *add_zero],
!add.left_cancel this
The `have` doesn't work because Lean can't figure out the type of 0 before
it starts processing `!add.left_cancel this`. This is easy to fix, we just have to
annotate one of the `0`s in the `have`:
proposition smul_zero (a : R) : a • (0 : M) = 0 :=
have a • (0:M) + a • 0 = a • 0 + 0, by rewrite [-smul_left_distrib, *add_zero],
!add.left_cancel this
BTW, all tactics are still being executed after all constraints are solved.
We may change that in the future. I didn't want to execute
the tactics at <proof> before <rest> because of universe
meta-variables. In Lean, unassigned universe meta-variables become
parameters. Moreover, we perform this conversion *before*
we start processing tactics. Reason: universe meta-variables
create many problems for tactics such as `rewrite`, `blast` and `simp`.
Finally, we can recover the previous behavior using the option
set_option parser.checkpoint_have false
2016-02-04 19:01:19 -08:00
Leonardo de Moura
ba392f504f
feat(kernel/expr,library/blast/blast,frontends/lean/decl_cmds): add workaround for allowing users to use blast inside of recursive equations
2016-01-03 21:53:31 -08:00
Leonardo de Moura
732a92de05
feat(frontends/lean): add 'simp' as shortcut for 'with_options [blast.strategy "simp"] blast'
2015-12-06 13:14:04 -08:00
Leonardo de Moura
edd1b34143
doc(library/blast/forward/pattern): describe pattern inference heuristic
2015-11-25 11:57:30 -08:00
Leonardo de Moura
017abdfb6a
feat(frontends/lean): add notation for providing patterns
2015-11-24 18:48:22 -08:00
Daniel Selsam
6b06a19294
chore(frontends/lean): remove whitespace
2015-11-08 14:05:00 -08:00
Daniel Selsam
fa58d7c71e
feat(frontends/lean): basic support for partial explicit
2015-11-08 14:05:00 -08:00
Leonardo de Moura
1d670e3193
feat(frontends/lean): support for '@@' -- the partial explicit operator
2015-11-08 14:05:00 -08:00
Leonardo de Moura
28a5ca5809
fix(frontends/lean): fixes #830
2015-09-18 07:51:02 -07:00
Leonardo de Moura
1fdbd681cc
feat(frontends/lean/builtin_exprs): name hypothesis in suffices
...
closes #817
2015-09-03 16:09:39 -07:00
Leonardo de Moura
3a72cd9621
fix(frontends/lean): rename multiword keyword "suffices to show" to "suffices"
2015-08-18 17:57:53 -07:00
Leonardo de Moura
3ce8c5d6f7
feat(frontends/lean): add "suffices to show A, from B, C" construct
2015-08-18 17:04:38 -07:00
Leonardo de Moura
06f20694c8
fix(frontends/lean/builtin_exprs): fixes #768
2015-08-08 04:20:17 -07:00
Leonardo de Moura
f21647899f
feat(frontends/lean/builtin_exprs): rename 'show' hidden name to 'this'
...
This is useful if 'show' is recursive
2015-08-07 13:29:21 -07:00