Leonardo de Moura
4ec0e1b07c
feat(frontends/lean): improve calc mode
...
Now, it automatically supports transitivity of the form
(R a b) -> (b = c) -> R a c
(a = b) -> (R b c) -> R a c
closes #507
2015-04-04 08:58:35 -07:00
Leonardo de Moura
dbc8e9e13a
refactor(*): add method get_num_univ_params
2015-01-28 17:22:18 -08:00
Leonardo de Moura
bc65aeb5e1
fix(frontends/lean/calc): add expected type for single-step calc expressions, fixes #357
...
This is not an issue for calc expressions containing multiple steps,
since the transitivity step will "force" the expected type for the proofs.
2014-11-29 15:35:09 -08:00
Leonardo de Moura
94cf10284a
fix(frontends/lean/calc_proof_elaborator): bug when inserting symmetry proofs for heq, fixes #286
...
The problem was that heq type is
Pi {A : Type} (a : A) {B : Type} (b : B), Prop
The calc_proof_elaborator was assuming that (a : A) (b : B) were the
last two arguments in any relation supported by calc.
The fix is to remove this assumption.
2014-11-01 07:30:04 -07:00
Leonardo de Moura
42dba5cc98
feat(frontends/lean/calc): expose get_calc_subst_info and get_calc_refl_info APIs
2014-10-30 23:56:38 -07:00
Leonardo de Moura
591e566472
feat(frontends/lean): try to inject symmetry (if needed) in calc proofs, add calc_symm command for configuring the symmetry theorem for a given operator
...
This is part of #268
2014-10-30 23:24:09 -07:00
Leonardo de Moura
c5a62f8abb
feat(frontends/lean): insert !
in calculational proofs when needed
...
This is part of #268
2014-10-30 22:22:04 -07:00
Leonardo de Moura
407e35692b
feat(frontends/lean/calc): wrap calc proofs with 'proof-qed' annotation to identify places where proof influences what is being proved
...
Later, we will add a custom annotation and elaborator for calc proofs.
This is the first step for issue #268 .
Remark: we don't wrap the proof if it is of the form
- `by tactic`
- `begin tactic-seq end`
- `{ expr }`
2014-10-30 18:33:47 -07:00
Leonardo de Moura
486839881c
feat(*): use environment fingerprint to detect when the cache cannot be used because the configuration changed, closes #75
...
We are not taking into the account the options object yet.
2014-09-29 18:30:00 -07:00
Leonardo de Moura
9f6a8827e0
refactor(*): use name_map
2014-09-28 10:23:11 -07:00
Leonardo de Moura
531046626a
refactor(*): explicit initialization/finalization for environment extensions
2014-09-22 17:30:29 -07:00
Leonardo de Moura
df60ab4ada
fix(frontends/lean/calc): allow calc_subst to be defined for multiple operators, allow calc cmds to be organized into namespaces, fixes #65
...
Signed-off-by: Leonardo de Moura <leonardo@microsoft.com>
2014-08-23 16:45:04 -07:00
Leonardo de Moura
4cf3d32e0c
chore(*): create alias for std::pair
...
Signed-off-by: Leonardo de Moura <leonardo@microsoft.com>
2014-08-20 16:46:19 -07:00
Leonardo de Moura
0f44e3c9f4
fix(frontends/lean): calc configuration commands, add check_constant_next auxiliary method
...
Signed-off-by: Leonardo de Moura <leonardo@microsoft.com>
2014-07-15 01:19:47 +01:00
Leonardo de Moura
656bcd55ed
fix(frontends/lean): save 'choice' position
...
Signed-off-by: Leonardo de Moura <leonardo@microsoft.com>
2014-06-26 08:50:44 -07:00
Leonardo de Moura
d055c4880f
feat(frontends/lean): connect new elaborator to frontend
...
Signed-off-by: Leonardo de Moura <leonardo@microsoft.com>
2014-06-25 08:31:00 -07:00
Leonardo de Moura
461689f758
refactor(frontends/lean/builtin_cmds): move declaration commands to new file
...
Signed-off-by: Leonardo de Moura <leonardo@microsoft.com>
2014-06-18 15:55:52 -07:00
Leonardo de Moura
4cbc429192
feat(frontends/lean/calc): add parse_calc function
...
Signed-off-by: Leonardo de Moura <leonardo@microsoft.com>
2014-06-17 17:16:15 -07:00
Leonardo de Moura
e178979061
feat(frontends/lean): add calc_subst, calc_refl, calc_trans commands for configuring calc-expressions
...
Signed-off-by: Leonardo de Moura <leonardo@microsoft.com>
2014-06-17 13:35:31 -07:00
Leonardo de Moura
ddba6b222a
feat(frontends/lean): add calculational proof environment extension, it stores transitivity, reflexivity (and substitution) rules
...
Signed-off-by: Leonardo de Moura <leonardo@microsoft.com>
2014-06-17 13:13:13 -07:00