Commit graph

3288 commits

Author SHA1 Message Date
Leonardo de Moura
b12fa5c8da feat(frontends/lean): add support for 'suffices'-expression in the new elaborator 2016-09-08 17:26:27 -07:00
Leonardo de Moura
dcc314c109 feat(library/noncomputable): improve is_noncomputable 2016-09-08 14:02:23 -07:00
Leonardo de Moura
5c7150c813 fix(frontends/lean/elaborator): make sure equations do not contain unassigned metavars before using eqn compiler 2016-09-08 10:47:15 -07:00
Leonardo de Moura
7d56382baa feat(library/equations_compiler/util): generate equation lemmas for equations using invertible functions 2016-09-07 17:57:10 -07:00
Leonardo de Moura
57f02dd768 test(tests/lean/run/pack_unpack1): add dependent function example 2016-09-07 16:05:05 -07:00
Leonardo de Moura
2f7a1a3579 feat(library/equations_compiler/elim_match): add support for invertible functions 2016-09-07 08:53:56 -07:00
Leonardo de Moura
f954ddbdbf feat(library/injectivity): add injectivity attribute 2016-09-06 18:01:09 -07:00
Leonardo de Moura
31de40ff4d refactor(frontends/lean): rename attribute [constructor] ==> [elab_with_expected_type] 2016-09-06 13:12:51 -07:00
Leonardo de Moura
d5aae42b7c feat(frontends/lean): use new elaborator to elaborate examples when set_option new_elaborator true 2016-09-05 09:52:01 -07:00
Leonardo de Moura
2a912c2650 feat(frontends/lean, library): move constructor attribute to frontend
Now, it only affects the elaborator.
2016-09-05 09:34:45 -07:00
Leonardo de Moura
81a30a69d2 refactor(library/normalize): remove unfold and unfold_full attributes 2016-09-05 08:40:58 -07:00
Leonardo de Moura
d6d68cd70a feat(library/vm): expose reducibility_hints 2016-09-04 18:09:10 -07:00
Leonardo de Moura
e8397681a5 fix(library/tactic/induction_tactic): normalize type in the induction tactic 2016-09-04 17:36:26 -07:00
Leonardo de Moura
6c80f7b75c feat(library/tactic/cases_tactic): normalize type 2016-09-04 17:18:50 -07:00
Leonardo de Moura
2354341c58 test(tests/lean/run): add test for equation compiler 2016-09-04 16:46:11 -07:00
Leonardo de Moura
a74f02546b refactor(*): remove abbreviation command 2016-09-03 17:11:29 -07:00
Leonardo de Moura
696b190a8d feat(library/type_context): mimic behavior of the kernel type_checker 2016-09-03 16:43:33 -07:00
Leonardo de Moura
80607c8895 perf(kernel/type_checker): use definitional height again at is_def_eq 2016-09-03 16:18:39 -07:00
Leonardo de Moura
a862c6e89f refactor(library/init/meta/declaration): def will be a keyword 2016-09-03 15:02:27 -07:00
Leonardo de Moura
4d7c233684 feat(library/equations_compiler/elim_match): use if-then-else when next pattern for every equation is a variable or value 2016-09-03 13:22:25 -07:00
Leonardo de Moura
13f0d4e09a refactor(library/equations_compiler): new equation lemma generation
The idea is to generate a lemma based on the left-hand-side provided by
the user. This feature is essential for supporting the derived inductive
datatype constructors.
2016-09-02 14:04:09 -07:00
Leonardo de Moura
bf096eb292 chore(library/equations_compiler/structural_rec): "lemmas" ==> "equations" 2016-09-02 11:17:38 -07:00
Leonardo de Moura
691b200244 feat(library/equations_compiler/util): add [eqn_sanitizer] attribute for defeq lemmas that should be automatically applied 2016-09-02 11:06:31 -07:00
Leonardo de Moura
5e4aabf62d feat(library/init/datatypes): add default has_sizeof instance
Motivation: make sure sizeof is defined for every type
2016-09-02 10:32:37 -07:00
Leonardo de Moura
02316c39b8 feat(frontends/lean/elaborator): throw an error if a local instance is declared in the middle of a declaration 2016-09-01 18:06:38 -07:00
Leonardo de Moura
9a2c95f35a test(tests/lean): add test for unset_attribute tactic 2016-09-01 14:50:03 -07:00
Leonardo de Moura
a38264439f fix(library/attribute_manager): get_instances returns deleted instances 2016-09-01 14:48:03 -07:00
Leonardo de Moura
39dc336310 feat(library/tactic/user_attribute): add set_basic_attribute and unset_attribute tactics 2016-09-01 14:17:05 -07:00
Leonardo de Moura
546f65b542 refactor(init/datatypes, init/logic): define sizeof instances and simp lemmas 2016-09-01 10:33:50 -07:00
Leonardo de Moura
4131b4168c refactor(library/init): define sizeof at init/datatypes 2016-09-01 09:47:46 -07:00
Leonardo de Moura
ff05f16caa fix(library/type_context): store instance fingerprint 2016-09-01 09:01:43 -07:00
Leonardo de Moura
54fd9adb47 feat(library/equations_compiler): use defeq simplifier to cleanup types of automatically synthesized lemmas 2016-08-31 15:54:03 -07:00
Leonardo de Moura
51a338d9a1 fix(library/equations_compiler/structural_rec): support for reflexive inductive datatypes 2016-08-31 10:46:32 -07:00
Leonardo de Moura
a8690205c9 feat(library/type_context): improve on_is_def_eq_failure for stuck terms 2016-08-30 10:51:40 -07:00
Leonardo de Moura
bd99de9bf8 fix(frontends/lean/pp): remove unnecessary parenthesis when pretty printing (A -> (Pi (b : B), C b)) 2016-08-29 16:36:04 -07:00
Leonardo de Moura
230db1bc92 feat(library/equations_compiler/structural_rec): generate brec_on-based function
We still need to generate lemmas and induction principle.
2016-08-29 15:58:13 -07:00
Leonardo de Moura
71916acbf0 test(tests/lean): another test for bad annotations 2016-08-28 14:54:35 -07:00
Leonardo de Moura
204d950a5f test(tests/lean/run/def13): add map-like test for dependent patter matching 2016-08-28 14:45:39 -07:00
Leonardo de Moura
f0f9880ece refactor(library/equations_compiler/elim_match,library/tactic/cases_tactic):
new design for elim_match

I still need to fix lemma generation, and refactor induction/subst tactics
2016-08-28 13:15:10 -07:00
Leonardo de Moura
f52be8c96f fix(tests/lean/bad_inaccessible): expected output 2016-08-28 08:34:39 -07:00
Leonardo de Moura
16a99436b4 fix(frontends/lean/elaborator): make sure all inductive datatype parameters in constructor applications are marked as inaccessible 2016-08-28 07:58:18 -07:00
Leonardo de Moura
0ed61c97c9 test(tests/lean/inaccessible2): add more invalid pattern tests 2016-08-28 07:57:55 -07:00
Leonardo de Moura
ae63821cdb fix(frontends/lean/elaborator): reject inaccessible annotation inside inaccessible annotation 2016-08-28 07:57:44 -07:00
Leonardo de Moura
95e8228e8a refactor(library/tactic/cases_tactic): improve low-level API 2016-08-25 16:34:40 -07:00
Leonardo de Moura
98aefca014 fix(library/local_context): depends_on should take into account assigned metavariables 2016-08-25 13:49:54 -07:00
Leonardo de Moura
7851b9c097 fix(frontends/lean/definition_cmds): parameter handling 2016-08-23 21:13:54 -07:00
Sebastian Ullrich
cee5bfd983 feat(frontends/lean/decl_attributes): disallow persistent attribute removal 2016-08-23 14:09:35 -07:00
Sebastian Ullrich
abd040589f feat(frontends/lean/decl_attributes, library/attribute_manager): implement attribute removal 2016-08-23 14:09:35 -07:00
Leonardo de Moura
e18500dcd4 feat(frontends/lean/parser): _ is an anonymous variable again in patterns. 2016-08-23 14:06:24 -07:00
Leonardo de Moura
e4fd627ae2 feat(library/attribute_manager): fingerprints
The fingerprint changes whenever a new attribute is added.
2016-08-23 08:20:37 -07:00