From 9d3c0497cbdc09eec3d3d112abdd5a21aed83716 Mon Sep 17 00:00:00 2001 From: Leonardo de Moura Date: Thu, 9 Mar 2017 17:24:26 -0800 Subject: [PATCH] chore(frontends/lean): rename transient commands See issue #1432 --- library/init/algebra/group.lean | 2 +- library/init/default.lean | 2 +- library/init/meta/smt/rsimp.lean | 4 +- library/init/meta/smt/smt_tactic.lean | 4 +- library/init/meta/tactic.lean | 2 +- library/tools/debugger/cli.lean | 2 +- library/tools/super/prover_state.lean | 2 +- script/gen_constants_cpp.py | 2 +- src/emacs/lean-syntax.el | 13 +- src/frontends/lean/builtin_cmds.cpp | 36 +- src/frontends/lean/print_cmd.cpp | 32 +- src/frontends/lean/token_table.cpp | 9 +- tests/lean/1292.lean | 2 +- tests/lean/1299.lean | 6 +- tests/lean/1334a.lean | 4 +- tests/lean/1334b.lean | 12 +- tests/lean/584a.lean | 8 +- tests/lean/584b.lean | 8 +- tests/lean/584c.lean | 10 +- tests/lean/634.lean | 10 +- tests/lean/634b.lean | 46 +- tests/lean/634c.lean | 44 +- tests/lean/634d.lean | 20 +- tests/lean/652.lean | 12 +- tests/lean/671.lean | 2 +- tests/lean/712.lean | 12 +- tests/lean/alias.lean | 10 +- tests/lean/alias2.lean | 2 +- tests/lean/anc1.lean | 24 +- tests/lean/assert_tac3.lean | 2 +- tests/lean/attribute_bug1.lean | 2 +- tests/lean/bad_print.lean | 6 +- tests/lean/bad_print.lean.expected.out | 6 +- tests/lean/bug1.lean | 2 +- tests/lean/by_contradiction.lean | 6 +- tests/lean/caching_user_attribute.lean | 10 +- tests/lean/calc1.lean | 6 +- tests/lean/cases_induction_fresh.lean | 2 +- tests/lean/char_lits.lean | 16 +- tests/lean/check.lean | 8 +- tests/lean/check2.lean | 2 +- tests/lean/choice_expl.lean | 6 +- tests/lean/choice_expl.lean.expected.out | 4 +- tests/lean/coe1.lean | 24 +- tests/lean/coe1.lean.expected.out | 4 +- tests/lean/coe2.lean | 20 +- tests/lean/coe2.lean.expected.out | 4 +- tests/lean/coe3.lean | 4 +- tests/lean/coe4.lean | 8 +- tests/lean/coe5.lean | 10 +- tests/lean/coe6.lean | 2 +- tests/lean/concrete_instance.lean | 8 +- tests/lean/const.lean | 4 +- tests/lean/ctxopt.lean | 4 +- tests/lean/curly_notation.lean | 26 +- tests/lean/def3.lean | 2 +- tests/lean/def4.lean | 14 +- tests/lean/def4.lean.expected.out | 4 +- tests/lean/def_inaccessible_issue.lean | 2 +- tests/lean/def_ite_value.lean | 10 +- tests/lean/elab1.lean | 12 +- tests/lean/elab1.lean.expected.out | 8 +- tests/lean/elab11.lean | 8 +- tests/lean/elab11.lean.expected.out | 8 +- tests/lean/elab12.lean | 10 +- tests/lean/elab12.lean.expected.out | 12 +- tests/lean/elab13.lean | 2 +- tests/lean/elab14.lean | 2 +- tests/lean/elab15.lean | 2 +- tests/lean/elab2.lean | 6 +- tests/lean/elab2.lean.expected.out | 2 +- tests/lean/elab3.lean | 2 +- tests/lean/elab4.lean | 14 +- tests/lean/elab4.lean.expected.out | 12 +- tests/lean/elab4b.lean | 6 +- tests/lean/elab4b.lean.expected.out | 12 +- tests/lean/elab5.lean | 2 +- tests/lean/elab6.lean | 20 +- tests/lean/elab7.lean | 8 +- tests/lean/elab8.lean | 6 +- tests/lean/elab9.lean | 4 +- tests/lean/elab_error_recovery.lean | 10 +- .../elab_error_recovery.lean.expected.out | 2 +- tests/lean/elab_meta2.lean | 16 +- tests/lean/error_full_names.lean | 4 +- tests/lean/error_full_names.lean.expected.out | 6 +- tests/lean/error_pos.lean | 6 +- tests/lean/error_pos.lean.expected.out | 6 +- tests/lean/eta_bug.lean | 2 +- tests/lean/eval_expr_error.lean | 4 +- tests/lean/expr_quote.lean | 2 +- tests/lean/extra/print_tests.lean | 8 +- tests/lean/field_access.lean | 6 +- tests/lean/field_access.lean.expected.out | 4 +- tests/lean/fold.lean | 16 +- tests/lean/ftree.lean | 4 +- tests/lean/hex_char.lean | 6 +- tests/lean/hex_numeral.lean | 10 +- tests/lean/hinst_lemmas1.lean | 2 +- tests/lean/hinst_lemmas2.lean | 4 +- tests/lean/import_invalid_tk.lean | 2 +- tests/lean/import_middle.lean | 2 +- tests/lean/induction_tac1.lean | 4 +- .../inductive_resultant_level_inference.lean | 44 +- tests/lean/inline_issue.lean | 2 +- tests/lean/inst.lean | 2 +- tests/lean/inst_error.lean | 2 +- tests/lean/inst_error.lean.expected.out | 2 +- tests/lean/instance_cache_bug1.lean | 4 +- .../instance_cache_bug1.lean.expected.out | 2 +- tests/lean/int_eval.lean | 36 +- tests/lean/interactive/info.lean | 2 +- tests/lean/interactive/rb_map_ts.lean | 4 +- tests/lean/io_bug1.lean | 10 +- tests/lean/io_bug2.lean | 2 +- tests/lean/key_eqv1.lean | 2 +- tests/lean/let1.lean | 6 +- tests/lean/let3.lean | 4 +- tests/lean/let4.lean | 4 +- tests/lean/let_elim_issue.lean | 2 +- tests/lean/list_monad1.lean | 2 +- tests/lean/local_notation_bug2.lean | 2 +- .../local_notation_bug2.lean.expected.out | 2 +- tests/lean/local_ref_bugs.lean | 18 +- tests/lean/meta_equation_pos.lean | 2 +- tests/lean/minimize_errors.lean | 8 +- tests/lean/mismatch.lean | 2 +- tests/lean/mismatch.lean.expected.out | 2 +- tests/lean/missing_import.lean | 2 +- tests/lean/namespace_bug.lean | 2 +- tests/lean/nary_overload.lean | 10 +- tests/lean/nary_overload.lean.expected.out | 4 +- tests/lean/nat_add_assoc_no_axioms.lean | 2 +- tests/lean/nat_pp.lean | 6 +- tests/lean/no_confusion_type.lean | 4 +- tests/lean/noncomputable_bytecode_issue.lean | 2 +- tests/lean/notation.lean | 22 +- tests/lean/notation2.lean | 4 +- tests/lean/notation3.lean | 8 +- tests/lean/notation4.lean | 8 +- tests/lean/notation6.lean | 10 +- tests/lean/notation7.lean | 4 +- tests/lean/notation8.lean | 4 +- tests/lean/notation_error_pos.lean | 8 +- .../lean/notation_error_pos.lean.expected.out | 14 +- tests/lean/num.lean | 24 +- tests/lean/num2.lean | 10 +- tests/lean/num2.lean.expected.out | 4 +- tests/lean/num3.lean | 6 +- tests/lean/num3.lean.expected.out | 2 +- tests/lean/num4.lean | 8 +- tests/lean/num5.lean | 8 +- tests/lean/offset_is_def_eq_trick.lean | 2 +- tests/lean/omit.lean | 4 +- tests/lean/open_namespaces.lean | 2 +- tests/lean/over_notation.lean | 10 +- tests/lean/over_notation.lean.expected.out | 4 +- tests/lean/param_binder_update.lean | 28 +- tests/lean/param_binder_update2.lean | 8 +- tests/lean/parsing_only.lean | 6 +- tests/lean/pp.lean | 14 +- tests/lean/pp_all.lean | 4 +- tests/lean/pp_all2.lean | 2 +- tests/lean/pp_beta.lean | 4 +- tests/lean/pp_binder_types.lean | 4 +- tests/lean/pp_bug.lean | 20 +- tests/lean/pp_char_bug.lean | 30 +- tests/lean/pp_no_proofs.lean | 8 +- tests/lean/pp_param_bug.lean | 2 +- tests/lean/pp_struct.lean | 18 +- tests/lean/pp_zero_bug.lean | 4 +- tests/lean/ppbug.lean | 2 +- tests/lean/print_ax1.lean | 2 +- tests/lean/print_ax2.lean.expected.out | 5 +- tests/lean/print_ax3.lean | 14 +- tests/lean/print_meta.lean | 2 +- tests/lean/print_reducible.lean | 6 +- tests/lean/private_structure.lean | 44 +- .../lean/private_structure.lean.expected.out | 20 +- tests/lean/prodtst.lean | 2 +- tests/lean/proj_notation.lean | 36 +- tests/lean/proj_notation.lean.expected.out | 8 +- tests/lean/protected.lean | 4 +- tests/lean/protected.lean.expected.out | 2 +- tests/lean/protected_consts.lean | 48 +- tests/lean/protected_consts.lean.expected.out | 12 +- tests/lean/protected_test.lean | 14 +- tests/lean/protected_test.lean.expected.out | 6 +- tests/lean/quot_bug.lean | 2 +- tests/lean/quot_ind_bug.lean | 6 +- tests/lean/record_rec_protected.lean | 2 +- .../record_rec_protected.lean.expected.out | 2 +- tests/lean/reserve_bugs.lean | 12 +- tests/lean/restrict_bug.lean | 2 +- tests/lean/right_assoc_dollar.lean | 2 +- tests/lean/rquote.lean | 14 +- tests/lean/rquote.lean.expected.out | 4 +- tests/lean/run/1302.lean | 6 +- tests/lean/run/1315b.lean | 2 +- tests/lean/run/252.lean | 6 +- tests/lean/run/331.lean | 2 +- tests/lean/run/444.lean | 4 +- tests/lean/run/445.lean | 6 +- tests/lean/run/490.lean | 4 +- tests/lean/run/600a.lean | 2 +- tests/lean/run/600b.lean | 2 +- tests/lean/run/600c.lean | 2 +- tests/lean/run/751.lean | 2 +- tests/lean/run/791.lean | 8 +- tests/lean/run/968.lean | 6 +- tests/lean/run/IO1.lean | 20 +- tests/lean/run/IO2.lean | 2 +- tests/lean/run/IO4.lean | 2 +- tests/lean/run/abstract_tac.lean | 2 +- tests/lean/run/anonymous_param.lean | 8 +- tests/lean/run/apply3.lean | 4 +- tests/lean/run/apply4.lean | 4 +- tests/lean/run/array1.lean | 16 +- tests/lean/run/array2.lean | 6 +- tests/lean/run/as.lean | 12 +- tests/lean/run/as_is_elab.lean | 4 +- tests/lean/run/assert_tac1.lean | 4 +- tests/lean/run/assert_tac3.lean | 2 +- tests/lean/run/at_at_bug.lean | 2 +- tests/lean/run/atomic2.lean | 2 +- tests/lean/run/atomic_notation.lean | 4 +- tests/lean/run/auto_param.lean | 8 +- tests/lean/run/auto_param2.lean | 8 +- tests/lean/run/auto_param_in_structures.lean | 8 +- tests/lean/run/basic.lean | 32 +- tests/lean/run/basic_monitor.lean | 2 +- tests/lean/run/basic_monitor1.lean | 4 +- tests/lean/run/basic_monitor2.lean | 4 +- tests/lean/run/basic_monitor3.lean | 2 +- tests/lean/run/booltst.lean | 2 +- tests/lean/run/bor_lazy.lean | 2 +- tests/lean/run/bug6.lean | 8 +- tests/lean/run/bug_proving_eqn_lemmas.lean | 2 +- tests/lean/run/calc_heq_symm.lean | 2 +- tests/lean/run/cases_tac1.lean | 4 +- tests/lean/run/check_constants.lean | 748 +++++++++--------- tests/lean/run/class1.lean | 2 +- tests/lean/run/class2.lean | 2 +- tests/lean/run/class3.lean | 2 +- tests/lean/run/cody2.lean | 2 +- tests/lean/run/coe_univ_bug.lean | 2 +- tests/lean/run/complete_rec_var.lean | 2 +- tests/lean/run/confuse_ind.lean | 2 +- tests/lean/run/consume.lean | 14 +- tests/lean/run/converter.lean | 6 +- tests/lean/run/cute_binders.lean | 8 +- tests/lean/run/decidable.lean | 2 +- tests/lean/run/decl_olean.lean | 14 +- tests/lean/run/declare_axiom.lean | 2 +- tests/lean/run/def1.lean | 10 +- tests/lean/run/def2.lean | 2 +- tests/lean/run/def3.lean | 2 +- tests/lean/run/def4.lean | 2 +- tests/lean/run/def5.lean | 4 +- tests/lean/run/def_brec3.lean | 2 +- tests/lean/run/def_complete_bug.lean | 12 +- tests/lean/run/def_ite_value.lean | 6 +- tests/lean/run/default_field_pi.lean | 2 +- tests/lean/run/default_field_values1.lean | 8 +- tests/lean/run/default_param.lean | 6 +- tests/lean/run/default_param2.lean | 6 +- tests/lean/run/dep_coe_to_fn.lean | 2 +- tests/lean/run/dep_coe_to_fn2.lean | 2 +- tests/lean/run/dep_coe_to_fn3.lean | 2 +- tests/lean/run/doc_string1.lean | 16 +- tests/lean/run/doc_string2.lean | 2 +- tests/lean/run/doc_string3.lean | 2 +- tests/lean/run/doc_string4.lean | 2 +- tests/lean/run/e1.lean | 6 +- tests/lean/run/e15.lean | 16 +- tests/lean/run/e16.lean | 16 +- tests/lean/run/e2.lean | 2 +- tests/lean/run/e3.lean | 4 +- tests/lean/run/e4.lean | 4 +- tests/lean/run/e5.lean | 38 +- tests/lean/run/elab3.lean | 2 +- tests/lean/run/elab4.lean | 2 +- tests/lean/run/elab5.lean | 10 +- tests/lean/run/elab6.lean | 2 +- tests/lean/run/elab_bool.lean | 6 +- tests/lean/run/elab_meta1.lean | 4 +- tests/lean/run/empty_eq.lean | 2 +- tests/lean/run/empty_match.lean | 2 +- .../lean/run/empty_set_inside_quotations.lean | 4 +- tests/lean/run/eq20.lean | 6 +- tests/lean/run/equation_with_values.lean | 42 +- tests/lean/run/eval_attr_cache.lean | 8 +- tests/lean/run/eval_constant.lean | 4 +- tests/lean/run/eval_expr_bug.lean | 4 +- tests/lean/run/eval_expr_partial.lean | 2 +- tests/lean/run/even_perf.lean | 10 +- tests/lean/run/ex.lean | 4 +- tests/lean/run/export.lean | 8 +- tests/lean/run/fib_wrec.lean | 6 +- tests/lean/run/fingerprint.lean | 10 +- tests/lean/run/fn_default.lean | 2 +- tests/lean/run/format.lean | 2 +- tests/lean/run/full.lean | 6 +- tests/lean/run/fun.lean | 12 +- tests/lean/run/hash_map1.lean | 16 +- tests/lean/run/have1.lean | 2 +- tests/lean/run/have2.lean | 2 +- tests/lean/run/have3.lean | 2 +- tests/lean/run/have4.lean | 2 +- tests/lean/run/have6.lean | 2 +- tests/lean/run/help_cmd.lean | 6 +- tests/lean/run/hinst_lemmas1.lean | 2 +- tests/lean/run/ho.lean | 4 +- tests/lean/run/id.lean | 18 +- tests/lean/run/if_dollar_prec.lean | 2 +- tests/lean/run/imp.lean | 22 +- tests/lean/run/imp2.lean | 6 +- tests/lean/run/imp3.lean | 4 +- tests/lean/run/implicit.lean | 2 +- tests/lean/run/ind0.lean | 4 +- tests/lean/run/ind1.lean | 6 +- tests/lean/run/ind2.lean | 8 +- tests/lean/run/ind3.lean | 18 +- tests/lean/run/ind5.lean | 6 +- tests/lean/run/ind6.lean | 10 +- tests/lean/run/ind7.lean | 8 +- tests/lean/run/ind8.lean | 10 +- tests/lean/run/ind_cnst_params.lean | 8 +- tests/lean/run/ind_ns.lean | 4 +- tests/lean/run/ind_tac1.lean | 4 +- tests/lean/run/induction_on.lean | 4 +- .../lean/run/inductive_nonrec_after_rec.lean | 8 +- tests/lean/run/infix_paren.lean | 8 +- tests/lean/run/injection1.lean | 2 +- tests/lean/run/inliner_bug.lean | 2 +- tests/lean/run/int_eq_num.lean | 8 +- tests/lean/run/io_state.lean | 2 +- tests/lean/run/kcomp.lean | 22 +- tests/lean/run/lambda_simp.lean | 4 +- tests/lean/run/let1.lean | 2 +- tests/lean/run/let2.lean | 2 +- tests/lean/run/let3.lean | 4 +- tests/lean/run/lift.lean | 4 +- tests/lean/run/lift2.lean | 4 +- tests/lean/run/lift_nested_rec.lean | 6 +- tests/lean/run/list_notation.lean | 26 +- tests/lean/run/local_notation.lean | 4 +- tests/lean/run/match_expr2.lean | 2 +- tests/lean/run/meta2.lean | 2 +- tests/lean/run/meta3.lean | 4 +- tests/lean/run/meta_env1.lean | 8 +- tests/lean/run/meta_expr1.lean | 42 +- tests/lean/run/meta_level1.lean | 22 +- tests/lean/run/meta_tac2.lean | 4 +- tests/lean/run/meta_tac7.lean | 2 +- .../run/mixed_tmp_non_tmp_universe_bug.lean | 4 +- tests/lean/run/mutual_inductive.lean | 96 +-- tests/lean/run/n3.lean | 10 +- tests/lean/run/n5.lean | 8 +- tests/lean/run/nat_bug7.lean | 2 +- .../lean/run/nested_common_subexpr_issue.lean | 4 +- tests/lean/run/nested_inductive.lean | 32 +- tests/lean/run/nested_inductive_code_gen.lean | 2 +- tests/lean/run/new_proj_notation.lean | 6 +- tests/lean/run/not_bug1.lean | 20 +- tests/lean/run/ns.lean | 8 +- tests/lean/run/ns1.lean | 2 +- tests/lean/run/ns2.lean | 24 +- tests/lean/run/num.lean | 10 +- tests/lean/run/one.lean | 8 +- tests/lean/run/one2.lean | 10 +- tests/lean/run/opt1.lean | 12 +- tests/lean/run/opt_param_cc.lean | 8 +- tests/lean/run/overload2.lean | 4 +- tests/lean/run/pack_unpack1.lean | 12 +- tests/lean/run/pack_unpack2.lean | 12 +- tests/lean/run/pack_unpack3.lean | 10 +- tests/lean/run/partial_explicit.lean | 4 +- tests/lean/run/period_after_eqns.lean | 2 +- tests/lean/run/pp_unit.lean | 6 +- tests/lean/run/pred_to_subtype_coercion.lean | 4 +- tests/lean/run/pred_using_structure_cmd.lean | 8 +- tests/lean/run/print_inductive.lean | 4 +- tests/lean/run/print_poly.lean | 20 +- tests/lean/run/protected.lean | 4 +- tests/lean/run/ptst.lean | 2 +- tests/lean/run/qexpr1.lean | 2 +- tests/lean/run/quote1.lean | 2 +- tests/lean/run/rb_map1.lean | 32 +- tests/lean/run/record1.lean | 22 +- tests/lean/run/record10.lean | 8 +- tests/lean/run/record2.lean | 12 +- tests/lean/run/record7.lean | 2 +- tests/lean/run/record8.lean | 2 +- tests/lean/run/record9.lean | 2 +- tests/lean/run/rel_tac1.lean | 2 +- tests/lean/run/reserve.lean | 2 +- tests/lean/run/root.lean | 12 +- tests/lean/run/run_tactic1.lean | 8 +- tests/lean/run/rw_set1.lean | 10 +- tests/lean/run/rw_set3.lean | 2 +- tests/lean/run/rw_set4.lean | 2 +- tests/lean/run/sec_bug.lean | 2 +- tests/lean/run/sec_notation.lean | 2 +- tests/lean/run/sec_var.lean | 14 +- tests/lean/run/seclvl.lean | 18 +- tests/lean/run/secnot.lean | 8 +- tests/lean/run/section1.lean | 6 +- tests/lean/run/section2.lean | 2 +- tests/lean/run/section4.lean | 8 +- tests/lean/run/section5.lean | 8 +- tests/lean/run/simp_attr_eqns.lean | 2 +- tests/lean/run/simple.lean | 8 +- .../lean/run/simplifier_custom_relations.lean | 4 +- tests/lean/run/sizeof2.lean | 6 +- tests/lean/run/smt_not_exists.lean | 2 +- tests/lean/run/struc_names.lean | 4 +- tests/lean/run/struct_bug1.lean | 2 +- tests/lean/run/struct_inst_exprs2.lean | 2 +- tests/lean/run/struct_value.lean | 22 +- tests/lean/run/structure_result_universe.lean | 8 +- tests/lean/run/structure_test.lean | 4 +- tests/lean/run/sub.lean | 4 +- tests/lean/run/sub_bug.lean | 2 +- tests/lean/run/subst_tac1.lean | 2 +- tests/lean/run/super.lean | 2 +- tests/lean/run/t1.lean | 16 +- tests/lean/run/t10.lean | 4 +- tests/lean/run/t11.lean | 8 +- tests/lean/run/t2.lean | 14 +- tests/lean/run/t3.lean | 4 +- tests/lean/run/t4.lean | 6 +- tests/lean/run/t5.lean | 10 +- tests/lean/run/t6.lean | 2 +- tests/lean/run/t7.lean | 2 +- tests/lean/run/tc_inout1.lean | 8 +- tests/lean/run/tc_loop.lean | 4 +- tests/lean/run/test_perm_ac1.lean | 2 +- tests/lean/run/tick_id.lean | 4 +- tests/lean/run/trace_call_stack_segfault.lean | 2 +- tests/lean/run/trace_tst.lean | 2 +- tests/lean/run/try_for1.lean | 4 +- tests/lean/run/unicode.lean | 6 +- tests/lean/run/unification_hints.lean | 4 +- tests/lean/run/unify_fo_approx_bug1.lean | 6 +- tests/lean/run/user_simp_attributes.lean | 10 +- tests/lean/run/vars_anywhere.lean | 4 +- tests/lean/run/vm_check_bug.lean | 2 +- tests/lean/run/vm_eval1.lean | 26 +- tests/lean/run/whenIO.lean | 4 +- tests/lean/sec3.lean | 2 +- tests/lean/sec3.lean.expected.out | 2 +- tests/lean/sec_param_pp.lean | 8 +- tests/lean/sec_param_pp2.lean | 8 +- tests/lean/set_of.lean | 12 +- tests/lean/set_opt_tac.lean | 4 +- tests/lean/slow_error.lean | 2 +- tests/lean/slow_error.lean.expected.out | 2 +- tests/lean/struct_class.lean | 4 +- tests/lean/subpp.lean | 2 +- tests/lean/t10.lean | 10 +- tests/lean/t10.lean.expected.out | 2 +- tests/lean/t11.lean | 6 +- tests/lean/t12.lean | 4 +- tests/lean/t12.lean.expected.out | 2 +- tests/lean/t13.lean | 4 +- tests/lean/t14.lean | 20 +- tests/lean/t14.lean.expected.out | 4 +- tests/lean/t2.lean | 4 +- tests/lean/t5.lean | 10 +- tests/lean/t5.lean.expected.out | 2 +- tests/lean/t6.lean | 6 +- tests/lean/task.lean | 4 +- tests/lean/trace1.lean | 2 +- tests/lean/trace2.lean | 2 +- tests/lean/trust0/t1.lean | 2 +- tests/lean/tuple.lean | 2 +- tests/lean/type_class_bug.lean | 4 +- tests/lean/type_error_at_eval_expr.lean | 2 +- tests/lean/uni_bug1.lean | 2 +- tests/lean/unification_hints1.lean | 6 +- tests/lean/univ.lean | 16 +- tests/lean/univ_vars.lean | 10 +- tests/lean/user_attribute.lean | 24 +- tests/lean/utf8.lean | 14 +- tests/lean/var2.lean | 2 +- tests/lean/vm_eval_crash.lean | 2 +- tests/lean/vm_let_expr.lean | 4 +- tests/lean/vm_sorry.lean | 8 +- tests/lean/whnf.lean | 8 +- 490 files changed, 2204 insertions(+), 2205 deletions(-) diff --git a/library/init/algebra/group.lean b/library/init/algebra/group.lean index 2ac92d4932..2f95b6f4e1 100644 --- a/library/init/algebra/group.lean +++ b/library/init/algebra/group.lean @@ -294,7 +294,7 @@ multiplicative_to_additive_pairs^.foldl (λ t ⟨src, tgt⟩, do else t) skip -run_command transport_multiplicative_to_additive +run_cmd transport_multiplicative_to_additive instance add_semigroup_to_is_eq_associative [add_semigroup α] : is_associative α add := ⟨add_assoc⟩ diff --git a/library/init/default.lean b/library/init/default.lean index ec86e1ba39..2f268c1df9 100644 --- a/library/init/default.lean +++ b/library/init/default.lean @@ -13,4 +13,4 @@ def debugger.attr : user_attribute := { name := `breakpoint, descr := "breakpoint for debugger" } -run_command attribute.register `debugger.attr +run_cmd attribute.register `debugger.attr diff --git a/library/init/meta/smt/rsimp.lean b/library/init/meta/smt/rsimp.lean index d6aaf37fc7..97371d0edb 100644 --- a/library/init/meta/smt/rsimp.lean +++ b/library/init/meta/smt/rsimp.lean @@ -45,8 +45,8 @@ do let t := ```(caching_user_attribute hinst_lemmas), add_decl (declaration.defn attr_decl_name [] t v reducibility_hints.abbrev ff), attribute.register attr_decl_name -run_command mk_name_set_attr `no_rsimp -run_command mk_hinst_lemma_attr_from_simp_attr `rsimp_attr `rsimp `simp `no_rsimp +run_cmd mk_name_set_attr `no_rsimp +run_cmd mk_hinst_lemma_attr_from_simp_attr `rsimp_attr `rsimp `simp `no_rsimp /- The following lemmas are not needed by rsimp, and they actually hurt performance since they generate a lot of instances. -/ diff --git a/library/init/meta/smt/smt_tactic.lean b/library/init/meta/smt/smt_tactic.lean index 4e693bf44d..4eaa29d78b 100644 --- a/library/init/meta/smt/smt_tactic.lean +++ b/library/init/meta/smt/smt_tactic.lean @@ -10,8 +10,8 @@ import init.meta.smt.ematch universe u -run_command mk_simp_attr `pre_smt -run_command mk_hinst_lemma_attr_set `ematch [] [`ematch_lhs] +run_cmd mk_simp_attr `pre_smt +run_cmd mk_hinst_lemma_attr_set `ematch [] [`ematch_lhs] /-- Configuration for the smt tactic preprocessor. The preprocessor diff --git a/library/init/meta/tactic.lean b/library/init/meta/tactic.lean index 8d66e4aaa0..b20ad83e2d 100644 --- a/library/init/meta/tactic.lean +++ b/library/init/meta/tactic.lean @@ -979,7 +979,7 @@ end list Remark: id_locked is used in the builtin implementation of tactic.change -/ -run_command do +run_cmd do let l := level.param `l, let Ty := expr.sort l, type ← to_expr ``(Π (α : %%Ty), α → α), diff --git a/library/tools/debugger/cli.lean b/library/tools/debugger/cli.lean index 743729b360..7c1cb9c308 100644 --- a/library/tools/debugger/cli.lean +++ b/library/tools/debugger/cli.lean @@ -232,4 +232,4 @@ meta def monitor : vm_monitor state := { init := init_state, step := step_fn } end debugger -run_command vm_monitor.register `debugger.monitor +run_cmd vm_monitor.register `debugger.monitor diff --git a/library/tools/super/prover_state.lean b/library/tools/super/prover_state.lean index 5fa1b483dd..4febeb776f 100644 --- a/library/tools/super/prover_state.lean +++ b/library/tools/super/prover_state.lean @@ -381,7 +381,7 @@ meta def inference := derived_clause → prover unit meta structure inf_decl := (prio : ℕ) (inf : inference) meta def inf_attr : user_attribute := ⟨ `super.inf, "inference for the super prover" ⟩ -run_command attribute.register `super.inf_attr +run_cmd attribute.register `super.inf_attr meta def seq_inferences : list inference → inference | [] := λgiven, return () diff --git a/script/gen_constants_cpp.py b/script/gen_constants_cpp.py index 89f39bd046..c89888b2e1 100755 --- a/script/gen_constants_cpp.py +++ b/script/gen_constants_cpp.py @@ -91,7 +91,7 @@ def main(argv=None): f.write("meta def script_check_id (n : name) : tactic unit :=\n"); f.write("do env ← get_env, (env^.get n >> return ()) <|> (guard $ env^.is_namespace n) <|> (attribute.get_instances n >> return ()) <|> fail (\"identifier '\" ++ to_string n ++ \"' is not a constant, namespace nor attribute\")\n"); for c in constants: - f.write("run_command script_check_id `%s\n" % c[1]) + f.write("run_cmd script_check_id `%s\n" % c[1]) for c in constants: cmd = ("cd .. && grep --silent --include=\"*.h\" --include=\"*.cpp\" --exclude=\".#*\" --exclude=\"constants.*\" -R \"get_%s_name\" *" % c[0]) if os.system(cmd) != 0: diff --git a/src/emacs/lean-syntax.el b/src/emacs/lean-syntax.el index 8a6ff9a66b..b6b3535397 100644 --- a/src/emacs/lean-syntax.el +++ b/src/emacs/lean-syntax.el @@ -9,20 +9,19 @@ (defconst lean-keywords1 '("import" "prelude" "protected" "private" "noncomputable" "definition" "meta" "renaming" - "hiding" "exposing" "parameter" "parameters" "begin" "conjecture" "constant" "constants" - "hypothesis" "lemma" "corollary" "variable" "variables" "premise" "premises" "theory" - "print" "theorem" "proposition" "example" + "hiding" "exposing" "parameter" "parameters" "begin" "constant" "constants" + "lemma" "variable" "variables" "#print" "theorem" "example" "open" "as" "export" "override" "axiom" "axioms" "inductive" "with" "without" - "structure" "record" "universe" "universes" - "alias" "help" "precedence" "reserve" "declare_trace" "add_key_equivalence" + "structure" "universe" "universes" + "alias" "#help" "precedence" "reserve" "declare_trace" "add_key_equivalence" "match" "infix" "infixl" "infixr" "notation" "postfix" "prefix" "instance" - "eval" "vm_eval" "check" "end" "this" "suppose" + "#eval" "#reduce" "#check" "end" "this" "suppose" "using" "using_well_founded" "namespace" "section" "fields" "attribute" "local" "set_option" "extends" "include" "omit" "classes" "class" "instances" "coercions" "attributes" "raw" "replacing" "calc" "have" "show" "suffices" "by" "in" "at" "do" "let" "forall" "Pi" "fun" "exists" "if" "dif" "then" "else" "assume" "take" "obtain" "from" "aliases" "register_simp_ext" - "mutual" "def" "run_command") + "mutual" "def" "run_cmd") "lean keywords ending with 'word' (not symbol)") (defconst lean-keywords1-regexp (eval `(rx word-start (or ,@lean-keywords1) word-end))) diff --git a/src/frontends/lean/builtin_cmds.cpp b/src/frontends/lean/builtin_cmds.cpp index 25b447defe..bbd8a49c14 100644 --- a/src/frontends/lean/builtin_cmds.cpp +++ b/src/frontends/lean/builtin_cmds.cpp @@ -179,14 +179,14 @@ environment check_cmd(parser & p) { return p.env(); } -environment eval_cmd(parser & p) { +environment reduce_cmd(parser & p) { bool whnf = false; if (p.curr_is_token(get_whnf_tk())) { p.next(); whnf = true; } expr e; level_param_names ls; - std::tie(e, ls) = parse_local_expr(p, "_eval"); + std::tie(e, ls) = parse_local_expr(p, "_reduce"); expr r; if (whnf) { type_checker tc(p.env(), true, false); @@ -197,7 +197,7 @@ environment eval_cmd(parser & p) { r = normalize(tc, e, eta); } auto out = p.mk_message(p.cmd_pos(), INFORMATION); - out.set_caption("eval result") << r; + out.set_caption("reduce result") << r; out.report(); return p.env(); } @@ -420,11 +420,11 @@ static environment compile_expr(environment const & env, name const & n, level_p return vm_compile(new_env, new_env.get(n)); } -static void vm_eval_core(vm_state & s, name const & main, optional const & initial_state) { +static void eval_core(vm_state & s, name const & main, optional const & initial_state) { if (initial_state) s.push(*initial_state); // push initial_state for IO/tactic monad. vm_decl d = *s.get_decl(main); if (!initial_state && d.get_arity() > 0) - throw exception("vm_eval result is a function"); + throw exception("eval result is a function"); s.invoke_fn(main); if (initial_state) { if (d.get_arity() == 0) { @@ -435,12 +435,12 @@ static void vm_eval_core(vm_state & s, name const & main, optional const } } -static environment vm_eval_cmd(parser & p) { +static environment eval_cmd(parser & p) { auto pos = p.pos(); expr e; level_param_names ls; std::tie(e, ls) = parse_local_expr(p, "_eval"); if (has_metavar(e)) - throw parser_error("invalid vm_eval command, expression contains metavariables", pos); + throw parser_error("invalid eval command, expression contains metavariables", pos); type_context tc(p.env(), transparency_mode::All); expr type0 = tc.infer(e); expr type = tc.whnf(type0); @@ -465,14 +465,14 @@ static environment vm_eval_cmd(parser & p) { optional initial_state; if (is_io) initial_state = mk_vm_simple(0); auto out = p.mk_message(p.cmd_pos(), INFORMATION); - out.set_caption("vm_eval result"); + out.set_caption("eval result"); vm_state::profiler prof(s, p.get_options()); // TODO(gabriel): capture output if (p.profiling()) { - timeit timer(out.get_text_stream().get_stream(), "vm_eval time"); - vm_eval_core(s, main, initial_state); + timeit timer(out.get_text_stream().get_stream(), "eval time"); + eval_core(s, main, initial_state); } else { - vm_eval_core(s, main, initial_state); + eval_core(s, main, initial_state); } if (is_io) { // do not print anything @@ -549,20 +549,20 @@ void init_cmd_table(cmd_table & r) { open_cmd)); add_cmd(r, cmd_info("export", "create aliases for declarations", export_cmd)); add_cmd(r, cmd_info("set_option", "set configuration option", set_option_cmd)); - add_cmd(r, cmd_info("exit", "exit", exit_cmd)); - add_cmd(r, cmd_info("print", "print a string", print_cmd)); + add_cmd(r, cmd_info("#exit", "exit", exit_cmd)); + add_cmd(r, cmd_info("#print", "print a string or information about an indentifier", print_cmd)); add_cmd(r, cmd_info("section", "open a new section", section_cmd)); add_cmd(r, cmd_info("namespace", "open a new namespace", namespace_cmd)); add_cmd(r, cmd_info("end", "close the current namespace/section", end_scoped_cmd)); - add_cmd(r, cmd_info("check", "type check given expression, and display its type", check_cmd)); - add_cmd(r, cmd_info("eval", "evaluate given expression", eval_cmd)); - add_cmd(r, cmd_info("vm_eval", "VM evaluation", vm_eval_cmd)); + add_cmd(r, cmd_info("#check", "type check given expression, and display its type", check_cmd)); + add_cmd(r, cmd_info("#reduce", "reduce given expression", reduce_cmd)); + add_cmd(r, cmd_info("#eval", "evaluate given expression using VM", eval_cmd)); add_cmd(r, cmd_info("local", "define local attributes or notation", local_cmd)); - add_cmd(r, cmd_info("help", "brief description of available commands and options", help_cmd)); + add_cmd(r, cmd_info("#help", "brief description of available commands and options", help_cmd)); add_cmd(r, cmd_info("init_quotient", "initialize quotient type computational rules", init_quotient_cmd)); add_cmd(r, cmd_info("declare_trace", "declare a new trace class (for debugging Lean tactics)", declare_trace_cmd)); add_cmd(r, cmd_info("add_key_equivalence", "register that to symbols are equivalence for key-matching", add_key_equivalence_cmd)); - add_cmd(r, cmd_info("run_command", "execute an user defined command at top-level", run_command_cmd)); + add_cmd(r, cmd_info("run_cmd", "execute an user defined command at top-level", run_command_cmd)); add_cmd(r, cmd_info("import", "import module(s)", import_cmd)); add_cmd(r, cmd_info("#unify", "(for debugging purposes)", unify_cmd)); add_cmd(r, cmd_info("#compile", "(for debugging purposes)", compile_cmd)); diff --git a/src/frontends/lean/print_cmd.cpp b/src/frontends/lean/print_cmd.cpp index 0266269162..3f7272d4ca 100644 --- a/src/frontends/lean/print_cmd.cpp +++ b/src/frontends/lean/print_cmd.cpp @@ -80,7 +80,7 @@ struct print_axioms_deps { static void print_axioms(parser & p, message_builder & out) { if (p.curr_is_identifier()) { - name c = p.check_constant_next("invalid 'print axioms', constant expected"); + name c = p.check_constant_next("invalid '#print axioms', constant expected"); auto env = p.env(); type_context tc(env, p.get_options()); auto new_out = io_state_stream(env, p.ios(), tc, out.get_text_stream().get_channel()); @@ -100,7 +100,7 @@ static void print_axioms(parser & p, message_builder & out) { } static void print_prefix(parser & p, message_builder & out) { - name prefix = p.check_id_next("invalid 'print prefix' command, identifier expected"); + name prefix = p.check_id_next("invalid '#print prefix' command, identifier expected"); buffer to_print; p.env().for_each_declaration([&](declaration const & d) { if (is_prefix_of(prefix, d.get_name())) { @@ -118,7 +118,7 @@ static void print_prefix(parser & p, message_builder & out) { static void print_fields(parser const & p, message_builder & out, name const & S, pos_info const & pos) { environment const & env = p.env(); if (!is_structure(env, S)) - throw parser_error(sstream() << "invalid 'print fields' command, '" << S << "' is not a structure", pos); + throw parser_error(sstream() << "invalid '#print fields' command, '" << S << "' is not a structure", pos); buffer field_names; get_structure_fields(env, S, field_names); for (name const & field_name : field_names) { @@ -224,7 +224,7 @@ static name to_user_name(environment const & env, name const & n) { static void print_definition(environment const & env, message_builder & out, name const & n, pos_info const & pos) { declaration d = env.get(n); if (!d.is_definition()) - throw parser_error(sstream() << "invalid 'print definition', '" << to_user_name(env, n) << "' is not a definition", pos); + throw parser_error(sstream() << "invalid '#print definition', '" << to_user_name(env, n) << "' is not a definition", pos); options opts = out.get_text_stream().get_options(); opts = opts.update_if_undef(get_pp_beta_name(), false); out.get_text_stream().update_options(opts) << d.get_value() << endl; @@ -282,12 +282,12 @@ static void print_inductive(parser const & p, message_builder & out, name const } } } else { - throw parser_error(sstream() << "invalid 'print inductive', '" << n << "' is not an inductive declaration", pos); + throw parser_error(sstream() << "invalid '#print inductive', '" << n << "' is not an inductive declaration", pos); } } static void print_recursor_info(parser & p, message_builder & out) { - name c = p.check_constant_next("invalid 'print [recursor]', constant expected"); + name c = p.check_constant_next("invalid '#print [recursor]', constant expected"); recursor_info info = get_recursor_info(p.env(), c); out << "recursor information\n" << " num. parameters: " << info.get_num_params() << "\n" @@ -461,13 +461,13 @@ static void print_unification_hints(parser & p, message_builder & out) { } static void print_simp_rules(parser & p, message_builder & out) { - name attr = p.check_id_next("invalid 'print [simp]' command, identifier expected"); + name attr = p.check_id_next("invalid '#print [simp]' command, identifier expected"); simp_lemmas slss = get_simp_lemmas(p.env(), transparency_mode::Reducible, attr); out << slss.pp_simp(out.get_formatter()); } static void print_congr_rules(parser & p, message_builder & out) { - name attr = p.check_id_next("invalid 'print [congr]' command, identifier expected"); + name attr = p.check_id_next("invalid '#print [congr]' command, identifier expected"); simp_lemmas slss = get_simp_lemmas(p.env(), transparency_mode::Reducible, attr); out << slss.pp_congr(out.get_formatter()); } @@ -532,8 +532,8 @@ environment print_cmd(parser & p) { } else if (p.curr_is_token_or_id(get_definition_tk())) { p.next(); auto pos = p.pos(); - name id = p.check_id_next("invalid 'print definition', constant expected"); - list cs = p.to_constants(id, "invalid 'print definition', constant expected", pos); + name id = p.check_id_next("invalid '#print definition', constant expected"); + list cs = p.to_constants(id, "invalid '#print definition', constant expected", pos); bool first = true; for (name const & c : cs) { if (first) @@ -548,12 +548,12 @@ environment print_cmd(parser & p) { print_constant(p, out, "definition", d); print_definition(env, out, c, pos); } else { - throw parser_error(sstream() << "invalid 'print definition', '" << to_user_name(p.env(), c) << "' is not a definition", pos); + throw parser_error(sstream() << "invalid '#print definition', '" << to_user_name(p.env(), c) << "' is not a definition", pos); } } } else if (p.curr_is_token_or_id(get_instances_tk())) { p.next(); - name c = p.check_constant_next("invalid 'print instances', constant expected"); + name c = p.check_constant_next("invalid '#print instances', constant expected"); for (name const & i : get_class_instances(env, c)) { out << i << " : " << env.get(i).get_type() << endl; } @@ -587,7 +587,7 @@ environment print_cmd(parser & p) { } else if (p.curr_is_token_or_id(get_fields_tk())) { p.next(); auto pos = p.pos(); - name S = p.check_constant_next("invalid 'print fields' command, constant expected"); + name S = p.check_constant_next("invalid '#print fields' command, constant expected"); print_fields(p, out, S, pos); } else if (p.curr_is_token_or_id(get_notation_tk())) { p.next(); @@ -595,13 +595,13 @@ environment print_cmd(parser & p) { } else if (p.curr_is_token_or_id(get_inductive_tk())) { p.next(); auto pos = p.pos(); - name c = p.check_constant_next("invalid 'print inductive', constant expected"); + name c = p.check_constant_next("invalid '#print inductive', constant expected"); print_inductive(p, out, c, pos); } else if (p.curr_is_token(get_lbracket_tk())) { p.next(); auto pos = p.pos(); auto name = p.check_id_next("invalid attribute declaration, identifier expected"); - p.check_token_next(get_rbracket_tk(), "invalid 'print []', ']' expected"); + p.check_token_next(get_rbracket_tk(), "invalid '#print []', ']' expected"); if (name == "recursor") { print_recursor_info(p, out); @@ -619,7 +619,7 @@ environment print_cmd(parser & p) { } } else if (print_polymorphic(p, out)) { } else { - throw parser_error("invalid print command", p.pos()); + throw parser_error("invalid '#print' command", p.pos()); } out.report(); return p.env(); diff --git a/src/frontends/lean/token_table.cpp b/src/frontends/lean/token_table.cpp index 8046f3c1b8..d7b417545e 100644 --- a/src/frontends/lean/token_table.cpp +++ b/src/frontends/lean/token_table.cpp @@ -104,13 +104,14 @@ void init_token_table(token_table & t) { {"theorem", "axiom", "axioms", "variable", "protected", "private", "definition", "meta", "mutual", "example", "noncomputable", "variables", "parameter", "parameters", "constant", "constants", - "check", "eval", "vm_eval", "using_well_founded", "[whnf]", - "print", "end", "namespace", "section", "prelude", "help", + "using_well_founded", "[whnf]", + "end", "namespace", "section", "prelude", "import", "inductive", "structure", "class", "universe", "universes", "local", "precedence", "reserve", "infixl", "infixr", "infix", "postfix", "prefix", "notation", - "exit", "set_option", "open", "export", "@[", + "set_option", "open", "export", "@[", "attribute", "instance", "include", "omit", "init_quotient", - "declare_trace", "run_command", "add_key_equivalence", + "declare_trace", "add_key_equivalence", + "run_cmd", "#check", "#reduce", "#eval", "#print", "#help", "#exit", "#compile", "#unify", nullptr}; pair aliases[] = diff --git a/tests/lean/1292.lean b/tests/lean/1292.lean index 07579d5027..7ef0bf342c 100644 --- a/tests/lean/1292.lean +++ b/tests/lean/1292.lean @@ -1,7 +1,7 @@ def fn (n : nat) : nat := match n with -exit +#exit theorem thm : true := begin end diff --git a/tests/lean/1299.lean b/tests/lean/1299.lean index 08cfbff873..e92ac751f8 100644 --- a/tests/lean/1299.lean +++ b/tests/lean/1299.lean @@ -7,8 +7,8 @@ add_decl (declaration.ax `new_ax [] prt), l ← to_expr `(new_ax), apply l -check d1 -print d1 +#check d1 +#print d1 theorem d2 : true = true := by do trace (("a", "a")), @@ -17,4 +17,4 @@ add_decl (declaration.ax `new_ax2 [] prt), l ← to_expr `(new_ax2), apply l -print d2 +#print d2 diff --git a/tests/lean/1334a.lean b/tests/lean/1334a.lean index 49fe0e6270..847680c9f8 100644 --- a/tests/lean/1334a.lean +++ b/tests/lean/1334a.lean @@ -8,5 +8,5 @@ def fn : nlist → nlist | (mk l) := mk [] | _ := atom -check fn.equations._eqn_1 -check fn.equations._eqn_2 +#check fn.equations._eqn_1 +#check fn.equations._eqn_2 diff --git a/tests/lean/1334b.lean b/tests/lean/1334b.lean index d0aebbb993..fcb4e9d069 100644 --- a/tests/lean/1334b.lean +++ b/tests/lean/1334b.lean @@ -7,17 +7,17 @@ def var_of : term → option nat | (term.var n) := some n | _ := none -check var_of.equations._eqn_1 -check var_of.equations._eqn_2 -check var_of.equations._eqn_3 +#check var_of.equations._eqn_1 +#check var_of.equations._eqn_2 +#check var_of.equations._eqn_3 def list_of : term → list term | (term.app ts) := ts | _ := [] -check list_of.equations._eqn_1 -check list_of.equations._eqn_2 -check list_of.equations._eqn_3 +#check list_of.equations._eqn_1 +#check list_of.equations._eqn_2 +#check list_of.equations._eqn_3 example (a : nat) (ls : list term) : term.var a = term.app ls → false := by contradiction diff --git a/tests/lean/584a.lean b/tests/lean/584a.lean index a16e38e71f..ae895fe269 100644 --- a/tests/lean/584a.lean +++ b/tests/lean/584a.lean @@ -3,17 +3,17 @@ variables (A : Type u) [H : inhabited A] (x : A) include H definition foo := x -check foo -- A and x are explicit +#check foo -- A and x are explicit variables {A x} definition foo' := x -check @foo' -- A is explicit, x is implicit +#check @foo' -- A is explicit, x is implicit open nat -check foo nat 10 +#check foo nat 10 definition test : foo' = (10:nat) := rfl set_option pp.implicit true -print test +#print test diff --git a/tests/lean/584b.lean b/tests/lean/584b.lean index 53fab51313..15d54110f8 100644 --- a/tests/lean/584b.lean +++ b/tests/lean/584b.lean @@ -7,21 +7,21 @@ section definition tst₁ := a - check @tst₁ + #check @tst₁ variable {A} definition tst₂ := a - check @tst₂ -- A is implicit + #check @tst₂ -- A is implicit lemma symm₂ : b = a := eq.symm H - check @symm₂ + #check @symm₂ end variable (a : A) definition tst₃ := a - check @tst₃ -- A is explicit again + #check @tst₃ -- A is explicit again end diff --git a/tests/lean/584c.lean b/tests/lean/584c.lean index cd4abd8b67..abddd52a26 100644 --- a/tests/lean/584c.lean +++ b/tests/lean/584c.lean @@ -22,8 +22,8 @@ section definition tst₃ := a end -check @tst₁ -check @tst₂ -- A is implicit -check @symm₂ -check @tst₃ -- A is explicit again -check @foo +#check @tst₁ +#check @tst₂ -- A is implicit +#check @symm₂ +#check @tst₃ -- A is explicit again +#check @foo diff --git a/tests/lean/634.lean b/tests/lean/634.lean index 1bdfce80c1..1d132077a5 100644 --- a/tests/lean/634.lean +++ b/tests/lean/634.lean @@ -5,13 +5,13 @@ section definition A {n : ℕ} : Type := X variable {n : ℕ} set_option pp.implicit true - check @A n + #check @A n set_option pp.full_names true - check @foo.A n - check @A n + #check @foo.A n + #check @A n set_option pp.full_names false - check @foo.A n - check @A n + #check @foo.A n + #check @A n end end foo diff --git a/tests/lean/634b.lean b/tests/lean/634b.lean index f675030785..4540e244a1 100644 --- a/tests/lean/634b.lean +++ b/tests/lean/634b.lean @@ -5,37 +5,37 @@ section definition A {n : ℕ} : Type := X definition B : Type := X variable {n : ℕ} - check @A n - check foo.A - check foo.A - check @foo.A 10 - check @foo.A n - check @foo.A n - check @foo.A n + #check @A n + #check foo.A + #check foo.A + #check @foo.A 10 + #check @foo.A n + #check @foo.A n + #check @foo.A n set_option pp.full_names true - check A - check foo.A - check @foo.A 10 - check @foo.A n - check @foo.A n + #check A + #check foo.A + #check @foo.A 10 + #check @foo.A n + #check @foo.A n set_option pp.full_names false set_option pp.implicit true - check @A n - check @foo.A 10 - check @foo.A n + #check @A n + #check @foo.A 10 + #check @foo.A n set_option pp.full_names true - check @foo.A n - check @A n + #check @foo.A n + #check @A n set_option pp.full_names false - check @foo.A n - check @foo.A n - check @foo.A n - check @foo.A n - check @foo.A n - check @A n + #check @foo.A n + #check @foo.A n + #check @foo.A n + #check @foo.A n + #check @foo.A n + #check @A n end end foo diff --git a/tests/lean/634c.lean b/tests/lean/634c.lean index 32ae348a77..94ae3fb162 100644 --- a/tests/lean/634c.lean +++ b/tests/lean/634c.lean @@ -4,35 +4,35 @@ section definition A {n : ℕ} : Type := X definition B : Type := X variable {n : ℕ} - check @A n - check _root_.A nat - check _root_.A (X × B) - check @_root_.A (X × B) 10 - check @_root_.A (_root_.B (@_root_.A X n)) n - check @_root_.A (@_root_.B (@_root_.A nat n)) n + #check @A n + #check _root_.A nat + #check _root_.A (X × B) + #check @_root_.A (X × B) 10 + #check @_root_.A (_root_.B (@_root_.A X n)) n + #check @_root_.A (@_root_.B (@_root_.A nat n)) n set_option pp.full_names true - check A - check _root_.A nat - check @_root_.A (X × B) 10 - check @_root_.A (@_root_.B (@_root_.A X n)) n - check @_root_.A (@_root_.B (@_root_.A nat n)) n + #check A + #check _root_.A nat + #check @_root_.A (X × B) 10 + #check @_root_.A (@_root_.B (@_root_.A X n)) n + #check @_root_.A (@_root_.B (@_root_.A nat n)) n set_option pp.full_names false set_option pp.implicit true - check @A n - check @_root_.A nat 10 - check @_root_.A X n + #check @A n + #check @_root_.A nat 10 + #check @_root_.A X n set_option pp.full_names true - check @_root_.A X n - check @_root_.A B n + #check @_root_.A X n + #check @_root_.A B n set_option pp.full_names false - check @_root_.A X n - check @_root_.A B n - check @_root_.A (@_root_.B (@A n)) n - check @_root_.A (@_root_.B (@_root_.A X n)) n - check @_root_.A (@_root_.B (@_root_.A nat n)) n - check @A n + #check @_root_.A X n + #check @_root_.A B n + #check @_root_.A (@_root_.B (@A n)) n + #check @_root_.A (@_root_.B (@_root_.A X n)) n + #check @_root_.A (@_root_.B (@_root_.A nat n)) n + #check @A n end diff --git a/tests/lean/634d.lean b/tests/lean/634d.lean index 2ce05ff37b..2723066ee7 100644 --- a/tests/lean/634d.lean +++ b/tests/lean/634d.lean @@ -1,23 +1,23 @@ section universe l definition A {n : ℕ} (t : Sort l) := t - check A - check _root_.A.{1} + #check A + #check _root_.A.{1} set_option pp.universes true - check A - check _root_.A.{1} + #check A + #check _root_.A.{1} end section universe l parameters {B : Sort l} definition P {n : ℕ} (b : B) := b - check P - check @_root_.P.{1} nat + #check P + #check @_root_.P.{1} nat set_option pp.universes true - check P - check _root_.P.{1} + #check P + #check _root_.P.{1} set_option pp.implicit true - check @P 2 - check @_root_.P.{1} nat + #check @P 2 + #check @_root_.P.{1} nat end diff --git a/tests/lean/652.lean b/tests/lean/652.lean index 17eab4846a..35c79846d9 100644 --- a/tests/lean/652.lean +++ b/tests/lean/652.lean @@ -17,9 +17,9 @@ section definition R6 := R end -check @R -check @R2 -check @R3 -check @R4 -check @R5 -check @R6 +#check @R +#check @R2 +#check @R3 +#check @R4 +#check @R5 +#check @R6 diff --git a/tests/lean/671.lean b/tests/lean/671.lean index 255e1c22f1..cfa8400466 100644 --- a/tests/lean/671.lean +++ b/tests/lean/671.lean @@ -1 +1 @@ -print nat.add +#print nat.add diff --git a/tests/lean/712.lean b/tests/lean/712.lean index 8b899e5661..24555fc456 100644 --- a/tests/lean/712.lean +++ b/tests/lean/712.lean @@ -4,21 +4,21 @@ reserve notation `[` a `][` b:10 `]` section local infix `~~~` := eq -print notation ~~~ +#print notation ~~~ local infix `~~~`:50 := eq -print notation ~~~ +#print notation ~~~ local infix `~~~`:100 := eq infix `~~~`:100 := eq -- FAIL -print notation ~~~ +#print notation ~~~ local notation `[` a `][`:10 b:20 `]` := a = b -print notation ][ +#print notation ][ end notation `[` a `][`:10 b:20 `]` := a = b -- FAIL @@ -26,5 +26,5 @@ notation `[` a `][`:10 b:20 `]` := a = b -- FAIL notation `[` a `][` b `]` := a = b infix `~~~` := eq -print notation ~~~ -print notation ][ +#print notation ~~~ +#print notation ][ diff --git a/tests/lean/alias.lean b/tests/lean/alias.lean index 4e32710948..d6c1d81eb2 100644 --- a/tests/lean/alias.lean +++ b/tests/lean/alias.lean @@ -13,12 +13,12 @@ end N2 open N2 open N1 constants a b : N1.num -print raw foo a b +#print raw foo a b open N2 -print raw foo a b +#print raw foo a b open N1 -print raw foo a b +#print raw foo a b open N1 -print raw foo a b +#print raw foo a b open N2 -print raw foo a b +#print raw foo a b diff --git a/tests/lean/alias2.lean b/tests/lean/alias2.lean index 896025fb36..6cc5a0f870 100644 --- a/tests/lean/alias2.lean +++ b/tests/lean/alias2.lean @@ -7,5 +7,5 @@ open foo namespace bla definition t := false - check foo.t -- <<< must print foo.t : Prop instead of t : Prop + #check foo.t -- <<< must print foo.t : Prop instead of t : Prop end bla diff --git a/tests/lean/anc1.lean b/tests/lean/anc1.lean index 079106b0e4..37ac99282a 100644 --- a/tests/lean/anc1.lean +++ b/tests/lean/anc1.lean @@ -1,48 +1,48 @@ -check (⟨1, 2⟩ : nat × nat) +#check (⟨1, 2⟩ : nat × nat) -check (⟨trivial, trivial⟩ : true ∧ true) +#check (⟨trivial, trivial⟩ : true ∧ true) example : true := sorry -check (⟨1, sorry⟩ : Σ' x : nat, x > 0) +#check (⟨1, sorry⟩ : Σ' x : nat, x > 0) open tactic -check show true, from ⟨⟩ +#check show true, from ⟨⟩ -check (⟨1, by intro1 >> contradiction⟩ : ∃ x : nat, 1 ≠ 0) +#check (⟨1, by intro1 >> contradiction⟩ : ∃ x : nat, 1 ≠ 0) universe variables u v -check λ (A B C : Prop), +#check λ (A B C : Prop), assume (Ha : A) (Hb : B) (Hc : C), show B ∧ A, from ⟨Hb, Ha⟩ -check λ (A B C : Prop), +#check λ (A B C : Prop), assume (Ha : A) (Hb : B) (Hc : C), show B ∧ A ∧ C ∧ A, from ⟨Hb, ⟨Ha, ⟨Hc, Ha⟩⟩⟩ -check λ (A B C : Prop), +#check λ (A B C : Prop), assume (Ha : A) (Hb : B) (Hc : C), show B ∧ A ∧ C ∧ A, from ⟨Hb, Ha, Hc, Ha⟩ -check λ (A B C : Prop), +#check λ (A B C : Prop), assume (Ha : A) (Hb : B) (Hc : C), show ((B ∧ true) ∧ A) ∧ (C ∧ A), from ⟨⟨⟨Hb, ⟨⟩⟩, Ha⟩, ⟨Hc, Ha⟩⟩ -check λ (A : Type u) (P : A → Prop) (Q : A → Prop), +#check λ (A : Type u) (P : A → Prop) (Q : A → Prop), take (a : A), assume (H1 : P a) (H2 : Q a), show ∃ x, P x ∧ Q x, from ⟨a, ⟨H1, H2⟩⟩ -check λ (A : Type u) (P : A → Prop) (Q : A → Prop), +#check λ (A : Type u) (P : A → Prop) (Q : A → Prop), take (a : A) (b : A), assume (H1 : P a) (H2 : Q b), show ∃ x y, P x ∧ Q y, from ⟨a, ⟨b, ⟨H1, H2⟩⟩⟩ -check λ (A : Type u) (P : A → Prop) (Q : A → Prop), +#check λ (A : Type u) (P : A → Prop) (Q : A → Prop), take (a : A) (b : A), assume (H1 : P a) (H2 : Q b), show ∃ x y, P x ∧ Q y, from ⟨a, b, H1, H2⟩ diff --git a/tests/lean/assert_tac3.lean b/tests/lean/assert_tac3.lean index a41842d4c8..98fde8c928 100644 --- a/tests/lean/assert_tac3.lean +++ b/tests/lean/assert_tac3.lean @@ -11,7 +11,7 @@ by do exact a, return () -print tst2 +#print tst2 definition tst3 (a b : nat) : a = a := by do diff --git a/tests/lean/attribute_bug1.lean b/tests/lean/attribute_bug1.lean index a85e401654..242c0bf745 100644 --- a/tests/lean/attribute_bug1.lean +++ b/tests/lean/attribute_bug1.lean @@ -13,7 +13,7 @@ by simp -- Succeeded as expected local attribute [-simp] fdef -print fdef -- we don't get the [simp] attribute when printing fdef +#print fdef -- we don't get the [simp] attribute when printing fdef example (n : nat) : f n = n + 1 := by simp -- Failed as expected, since we removed [simp] attribute diff --git a/tests/lean/bad_print.lean b/tests/lean/bad_print.lean index d11b42dcb8..ad24ed3712 100644 --- a/tests/lean/bad_print.lean +++ b/tests/lean/bad_print.lean @@ -1,7 +1,7 @@ constant boo : nat -print definition boo +#print definition boo -print 2 +#print 2 -print fields nat +#print fields nat diff --git a/tests/lean/bad_print.lean.expected.out b/tests/lean/bad_print.lean.expected.out index 4401d88352..39a6ee65b8 100644 --- a/tests/lean/bad_print.lean.expected.out +++ b/tests/lean/bad_print.lean.expected.out @@ -1,3 +1,3 @@ -bad_print.lean:3:17: error: invalid 'print definition', 'boo' is not a definition -bad_print.lean:5:6: error: invalid print command -bad_print.lean:7:13: error: invalid 'print fields' command, 'nat' is not a structure +bad_print.lean:3:18: error: invalid '#print definition', 'boo' is not a definition +bad_print.lean:5:7: error: invalid '#print' command +bad_print.lean:7:14: error: invalid '#print fields' command, 'nat' is not a structure diff --git a/tests/lean/bug1.lean b/tests/lean/bug1.lean index 51a932e73c..55bb23ab28 100644 --- a/tests/lean/bug1.lean +++ b/tests/lean/bug1.lean @@ -20,4 +20,4 @@ theorem and_intro3 (p q : bool) (H1 : p) (H2 : q) : q ∧ p theorem and_intro4 (p q : bool) (H1 : p) (H2 : q) : p ∧ q := fun (c : bool) (H : p -> q -> c), H H1 H2 -check and_intro4 +#check and_intro4 diff --git a/tests/lean/by_contradiction.lean b/tests/lean/by_contradiction.lean index e6f49eaad1..7d216cbe51 100644 --- a/tests/lean/by_contradiction.lean +++ b/tests/lean/by_contradiction.lean @@ -7,7 +7,7 @@ by do trace_state, contradiction -print "-------" +#print "-------" example (a b : nat) : ¬¬ a = b → a = b := by do @@ -16,7 +16,7 @@ by do trace_state, contradiction -print "-------" +#print "-------" example (p q : Prop) : ¬¬ p → p := by do @@ -24,7 +24,7 @@ by do by_contradiction `H, -- should fail trace_state -print "-------" +#print "-------" local attribute [instance] classical.prop_decidable -- Now all propositions are decidable diff --git a/tests/lean/caching_user_attribute.lean b/tests/lean/caching_user_attribute.lean index 310fdc34c3..2c8ecfdd1f 100644 --- a/tests/lean/caching_user_attribute.lean +++ b/tests/lean/caching_user_attribute.lean @@ -3,29 +3,29 @@ meta def foo_attr : caching_user_attribute string := mk_cache := λ ns, return $ list.join ∘ list.map (list.append "\n" ∘ to_string) $ ns, dependencies := [] } -run_command attribute.register `foo_attr +run_cmd attribute.register `foo_attr attribute [foo] eq.refl eq.mp set_option trace.user_attributes_cache true -run_command do +run_cmd do s : string ← caching_user_attribute.get_cache foo_attr, tactic.trace s -run_command do +run_cmd do s : string ← caching_user_attribute.get_cache foo_attr, tactic.trace s attribute [foo] eq.mpr local attribute [-foo] eq.mp -run_command do +run_cmd do s : string ← caching_user_attribute.get_cache foo_attr, tactic.trace s attribute [reducible] eq.mp -- should not affect [foo] cache -run_command do +run_cmd do s : string ← caching_user_attribute.get_cache foo_attr, tactic.trace s diff --git a/tests/lean/calc1.lean b/tests/lean/calc1.lean index b8a19cee4e..ca10125e06 100644 --- a/tests/lean/calc1.lean +++ b/tests/lean/calc1.lean @@ -23,7 +23,7 @@ axiom H1 : a = b axiom H2 : b ≤ c axiom H3 : c ≤ d axiom H4 : d = e -check calc a = b : H1 +#check calc a = b : H1 ... ≤ c : H2 ... ≤ d : H3 ... = e : H4 @@ -34,10 +34,10 @@ axiom lt_trans (a b c : A) (H1 : a < b) (H2 : b < c) : a < c axiom le_lt_trans (a b c : A) (H1 : a ≤ b) (H2 : b < c) : a < c axiom lt_le_trans (a b c : A) (H1 : a < b) (H2 : b ≤ c) : a < c axiom H5 : c < d --- check calc b ≤ c : H2 +-- #check calc b ≤ c : H2 -- ... < d : H5 -- Error le_lt_trans was not registered yet attribute [trans] le_lt_trans -check calc b ≤ c : H2 +#check calc b ≤ c : H2 ... < d : H5 constant le2 : A → A → bool diff --git a/tests/lean/cases_induction_fresh.lean b/tests/lean/cases_induction_fresh.lean index c3319a4348..169e73accc 100644 --- a/tests/lean/cases_induction_fresh.lean +++ b/tests/lean/cases_induction_fresh.lean @@ -7,7 +7,7 @@ begin constructor; assumption end -print "------------" +#print "------------" example (p q r s: Prop): p ∧ q → r ∧ s → s ∧ q := begin diff --git a/tests/lean/char_lits.lean b/tests/lean/char_lits.lean index f9a6567ac2..074bdb35ff 100644 --- a/tests/lean/char_lits.lean +++ b/tests/lean/char_lits.lean @@ -1,11 +1,11 @@ import system.io open io -check #"a" +#check #"a" -vm_eval #"a" -vm_eval #"\n" -vm_eval #"\\" -vm_eval put_str (list.cons #"\\" "aaa") -vm_eval put_str [#"\n"] -vm_eval put_str [#"\n"] -vm_eval put_str (list.cons #"\'" "aaa") +#eval #"a" +#eval #"\n" +#eval #"\\" +#eval put_str (list.cons #"\\" "aaa") +#eval put_str [#"\n"] +#eval put_str [#"\n"] +#eval put_str (list.cons #"\'" "aaa") diff --git a/tests/lean/check.lean b/tests/lean/check.lean index 05ecc7e300..092c1427e8 100644 --- a/tests/lean/check.lean +++ b/tests/lean/check.lean @@ -1,6 +1,6 @@ -- -check and.intro -check or.elim -check eq -check eq.rec +#check and.intro +#check or.elim +#check eq +#check eq.rec diff --git a/tests/lean/check2.lean b/tests/lean/check2.lean index 3f2e5ca523..b5ee7ee528 100644 --- a/tests/lean/check2.lean +++ b/tests/lean/check2.lean @@ -1,3 +1,3 @@ -- -check eq.rec_on +#check eq.rec_on diff --git a/tests/lean/choice_expl.lean b/tests/lean/choice_expl.lean index 2a4d97e976..d3fafec0dc 100644 --- a/tests/lean/choice_expl.lean +++ b/tests/lean/choice_expl.lean @@ -10,6 +10,6 @@ end N2 open N1 N2 constant N : Type.{1} constants a b : N -check @N1.pr -check @N2.pr N a b -check pr a b +#check @N1.pr +#check @N2.pr N a b +#check pr a b diff --git a/tests/lean/choice_expl.lean.expected.out b/tests/lean/choice_expl.lean.expected.out index 3df318f9cf..e982c9c875 100644 --- a/tests/lean/choice_expl.lean.expected.out +++ b/tests/lean/choice_expl.lean.expected.out @@ -1,8 +1,8 @@ pr : Π {A : Type u_1}, A → A → A pr a b : N -choice_expl.lean:15:6: error: ambiguous overload, possible interpretations +choice_expl.lean:15:7: error: ambiguous overload, possible interpretations N2.pr a b N1.pr a b Additional information: -choice_expl.lean:15:6: context: switched to basic overload resolution where arguments are elaborated without any information about the expected type because expected type was not available +choice_expl.lean:15:7: context: switched to basic overload resolution where arguments are elaborated without any information about the expected type because expected type was not available sorry : ?M_1 diff --git a/tests/lean/coe1.lean b/tests/lean/coe1.lean index c512e576a1..fa47b9aa9f 100644 --- a/tests/lean/coe1.lean +++ b/tests/lean/coe1.lean @@ -1,5 +1,5 @@ namespace hidden -check if tt then "a" else "b" +#check if tt then "a" else "b" /- Remark: in the standard library nat_to_int and int_to_real are has_lift instances instead of has_coe. -/ constant int : Type @@ -13,29 +13,29 @@ constants n m : nat constants i j : int constants x y : real -check sine x -check sine n -check sine i +#check sine x +#check sine n +#check sine i constant int_has_add : has_add int constant real_has_add : has_add real attribute [instance] int_has_add real_has_add -check x + i +#check x + i /- The following one does not work because the implicit argument ?A of add is bound to int when x is processed. -/ -check i + x -- FAIL +#check i + x -- FAIL /- The workaround is to use the explicit lift -/ -check ↑i + x +#check ↑i + x -check x + n +#check x + n -check n + x -- FAIL +#check n + x -- FAIL -check ↑n + x +#check ↑n + x -check (i:real) + x -check (n:real) + x +#check (i:real) + x +#check (n:real) + x end hidden diff --git a/tests/lean/coe1.lean.expected.out b/tests/lean/coe1.lean.expected.out index 1742ca496c..76e497ab9c 100644 --- a/tests/lean/coe1.lean.expected.out +++ b/tests/lean/coe1.lean.expected.out @@ -3,7 +3,7 @@ sine x : real sine ↑n : real sine ↑i : real x + ↑i : real -coe1.lean:28:8: error: type mismatch at application +coe1.lean:28:9: error: type mismatch at application i + x term x @@ -14,7 +14,7 @@ but is expected to have type sorry : ?M_1 ↑i + x : real x + ↑n : real -coe1.lean:35:8: error: type mismatch at application +coe1.lean:35:9: error: type mismatch at application n + x term x diff --git a/tests/lean/coe2.lean b/tests/lean/coe2.lean index 56c2464717..84c2e92ab2 100644 --- a/tests/lean/coe2.lean +++ b/tests/lean/coe2.lean @@ -1,6 +1,6 @@ namespace hidden set_option pp.coercions false -check if tt then "a" else "b" +#check if tt then "a" else "b" /- Remark: in the standard library nat_to_int and int_to_real are has_lift instances instead of has_coe. -/ @@ -15,26 +15,26 @@ constants n m : nat constants i j : int constants x y : real -check sine x -check sine n -check sine i +#check sine x +#check sine n +#check sine i constant int_has_add : has_add int constant real_has_add : has_add real attribute [instance] int_has_add real_has_add -check x + i +#check x + i /- The following one does not work because the implicit argument ?A of add is bound to int when x is processed. -/ -check i + x -- FAIL +#check i + x -- FAIL /- The workaround is to use the explicit lift -/ -check ↑i + x +#check ↑i + x -check x + n +#check x + n -check n + x -- FAIL +#check n + x -- FAIL -check ↑n + x +#check ↑n + x end hidden diff --git a/tests/lean/coe2.lean.expected.out b/tests/lean/coe2.lean.expected.out index 345fc95ad7..078f379b76 100644 --- a/tests/lean/coe2.lean.expected.out +++ b/tests/lean/coe2.lean.expected.out @@ -3,7 +3,7 @@ sine x : real sine n : real sine i : real x + i : real -coe2.lean:30:8: error: type mismatch at application +coe2.lean:30:9: error: type mismatch at application i + x term x @@ -14,7 +14,7 @@ but is expected to have type sorry : ?M_1 i + x : real x + n : real -coe2.lean:37:8: error: type mismatch at application +coe2.lean:37:9: error: type mismatch at application n + x term x diff --git a/tests/lean/coe3.lean b/tests/lean/coe3.lean index b43a217e0d..4d858789a9 100644 --- a/tests/lean/coe3.lean +++ b/tests/lean/coe3.lean @@ -11,6 +11,6 @@ constant a : A constant f : C → C constant g : D → D -check f a +#check f a -check g a +#check g a diff --git a/tests/lean/coe4.lean b/tests/lean/coe4.lean index 3ab9b75307..cec6e6fc49 100644 --- a/tests/lean/coe4.lean +++ b/tests/lean/coe4.lean @@ -10,16 +10,16 @@ definition coe_functor_to_fn (A : Type u) : has_coe_to_fun (Functor A) := constant f : Functor nat -check f 0 1 +#check f 0 1 set_option pp.coercions false -check f 0 1 +#check f 0 1 set_option pp.coercions true -check f 0 1 +#check f 0 1 set_option pp.all true -check f 0 1 +#check f 0 1 diff --git a/tests/lean/coe5.lean b/tests/lean/coe5.lean index 2ce8804958..050b751742 100644 --- a/tests/lean/coe5.lean +++ b/tests/lean/coe5.lean @@ -7,17 +7,17 @@ meta def expr_to_app : has_coe_to_fun expr := meta constants f a b : expr -check f a +#check f a -check f a b +#check f a b -check f a b a +#check f a b a set_option pp.coercions false -check f a b a +#check f a b a set_option pp.all true set_option pp.coercions true -check f a b +#check f a b diff --git a/tests/lean/coe6.lean b/tests/lean/coe6.lean index 8f159ea898..8daf489044 100644 --- a/tests/lean/coe6.lean +++ b/tests/lean/coe6.lean @@ -9,4 +9,4 @@ definition Group_to_Type : has_coe_to_sort Group := constant g : Group.{1} set_option pp.binder_types true -check λ a b : g, Group.mul g a b +#check λ a b : g, Group.mul g a b diff --git a/tests/lean/concrete_instance.lean b/tests/lean/concrete_instance.lean index 75803f560d..46b4535d43 100644 --- a/tests/lean/concrete_instance.lean +++ b/tests/lean/concrete_instance.lean @@ -2,11 +2,11 @@ variables a b : nat set_option pp.all true -check a * b -check a + b +#check a * b +#check a + b -- instance : semigroup nat := sorry -- instance : add_semigroup nat := sorry -check a * b -check a + b +#check a * b +#check a + b diff --git a/tests/lean/const.lean b/tests/lean/const.lean index db946cd178..c86f45bf99 100644 --- a/tests/lean/const.lean +++ b/tests/lean/const.lean @@ -12,6 +12,6 @@ section variable A : Type u variable S : inhabited A variable B : @bla A S - check B - check @foo A S + #check B + #check @foo A S end diff --git a/tests/lean/ctxopt.lean b/tests/lean/ctxopt.lean index 04e4c6d7b6..fee9de0b61 100644 --- a/tests/lean/ctxopt.lean +++ b/tests/lean/ctxopt.lean @@ -3,7 +3,7 @@ section set_option pp.implicit true - check id true + #check id true end -check id true +#check id true diff --git a/tests/lean/curly_notation.lean b/tests/lean/curly_notation.lean index 408f5dba10..6144d3d7c8 100644 --- a/tests/lean/curly_notation.lean +++ b/tests/lean/curly_notation.lean @@ -1,26 +1,26 @@ -check ({1, 2, 3} : set nat) -check ({1} : set nat) -check ({} : set nat) +#check ({1, 2, 3} : set nat) +#check ({1} : set nat) +#check ({} : set nat) definition s1 : set nat := {1, 2+3, 3, 4} -print s1 +#print s1 definition s2 : set char := {#"a", #"b", #"c"} -print s2 +#print s2 definition s3 : set string := {"hello", "world"} -print s3 +#print s3 -check { a ∈ s1 | a > 1 } -check { a in s1 | a > 1 } +#check { a ∈ s1 | a > 1 } +#check { a in s1 | a > 1 } set_option pp.unicode false -check { a ∈ s1 | a > 2 } +#check { a ∈ s1 | a > 2 } definition a := 10 -check ({a, a} : set nat) -check ({a, 1, a} : set nat) -check ({a} : set nat) +#check ({a, a} : set nat) +#check ({a, 1, a} : set nat) +#check ({a} : set nat) -check { a // a > 0 } +#check { a // a > 0 } diff --git a/tests/lean/def3.lean b/tests/lean/def3.lean index d59832b285..dadd04787a 100644 --- a/tests/lean/def3.lean +++ b/tests/lean/def3.lean @@ -5,6 +5,6 @@ section definition f : A → A := λ x, x - check f + #check f end diff --git a/tests/lean/def4.lean b/tests/lean/def4.lean index 9e7e262ac8..c54926e4ca 100644 --- a/tests/lean/def4.lean +++ b/tests/lean/def4.lean @@ -5,18 +5,18 @@ section definition f : A → A := λ x, x - check f - check f (0:nat) -- error + #check f + #check f (0:nat) -- error parameter {A} definition g : A → A := λ x, x - check g - check g (0:nat) -- error + #check g + #check g (0:nat) -- error end -check f -check f _ (0:nat) -check g 0 +#check f +#check f _ (0:nat) +#check g 0 diff --git a/tests/lean/def4.lean.expected.out b/tests/lean/def4.lean.expected.out index eacf9f622d..decbde7740 100644 --- a/tests/lean/def4.lean.expected.out +++ b/tests/lean/def4.lean.expected.out @@ -1,5 +1,5 @@ f : A → A -def4.lean:9:8: error: type mismatch at application +def4.lean:9:9: error: type mismatch at application f 0 term 0 @@ -9,7 +9,7 @@ but is expected to have type A sorry : ?M_1 g : A → A -def4.lean:17:8: error: type mismatch at application +def4.lean:17:9: error: type mismatch at application g 0 term 0 diff --git a/tests/lean/def_inaccessible_issue.lean b/tests/lean/def_inaccessible_issue.lean index b29bccf0a5..1671a7a870 100644 --- a/tests/lean/def_inaccessible_issue.lean +++ b/tests/lean/def_inaccessible_issue.lean @@ -14,4 +14,4 @@ definition map2 : ∀ {n}, bv n → bv n → bv n | 0 nil nil := nil | (n+1) (cons .n b1 v1) (cons .n b2 v2) := cons n (f b1 b2) (map2 v1 v2) -check map2.equations._eqn_2 +#check map2.equations._eqn_2 diff --git a/tests/lean/def_ite_value.lean b/tests/lean/def_ite_value.lean index 6ec74e2dc9..82cb26b3e4 100644 --- a/tests/lean/def_ite_value.lean +++ b/tests/lean/def_ite_value.lean @@ -5,8 +5,8 @@ definition f : string → nat → nat | "bye" 1 := 2 | _ _ := 3 -vm_eval f "hello world" 1 -vm_eval f "hello world" 2 -vm_eval f "bye" 1 -vm_eval f "bye" 2 -vm_eval f "hello" 1 +#eval f "hello world" 1 +#eval f "hello world" 2 +#eval f "bye" 1 +#eval f "bye" 2 +#eval f "hello" 1 diff --git a/tests/lean/elab1.lean b/tests/lean/elab1.lean index 83d6b9ef52..1649dc47a6 100644 --- a/tests/lean/elab1.lean +++ b/tests/lean/elab1.lean @@ -7,19 +7,19 @@ definition boo.add := @add set_option pp.all true open foo boo -print raw subst -- subst is overloaded -print raw add -- add is overloaded +#print raw subst -- subst is overloaded +#print raw add -- add is overloaded -check @subst +#check @subst -check @@subst +#check @@subst open eq -check subst +#check subst constants a b : nat constant H1 : a = b constant H2 : a + b > 0 -check eq.subst H1 H2 +#check eq.subst H1 H2 diff --git a/tests/lean/elab1.lean.expected.out b/tests/lean/elab1.lean.expected.out index 2a3bb96f18..4ceb148d93 100644 --- a/tests/lean/elab1.lean.expected.out +++ b/tests/lean/elab1.lean.expected.out @@ -1,8 +1,8 @@ [choice boo.subst foo.subst] [choice add boo.add foo.add] -elab1.lean:13:6: error: invalid '@', function is overloaded, use fully qualified names (overloads: boo.subst, foo.subst) -elab1.lean:15:6: error: invalid '@@', function is overloaded, use fully qualified names (overloads: boo.subst, foo.subst) -elab1.lean:19:6: error: invalid overloaded application, elaborator has special support for 'eq.subst' (it is handled as an "eliminator"), but this kind of constant cannot be overloaded (solution: use fully qualified names) (overloads: eq.subst, boo.subst, foo.subst) +elab1.lean:13:7: error: invalid '@', function is overloaded, use fully qualified names (overloads: boo.subst, foo.subst) +elab1.lean:15:7: error: invalid '@@', function is overloaded, use fully qualified names (overloads: boo.subst, foo.subst) +elab1.lean:19:7: error: invalid overloaded application, elaborator has special support for 'eq.subst' (it is handled as an "eliminator"), but this kind of constant cannot be overloaded (solution: use fully qualified names) (overloads: eq.subst, boo.subst, foo.subst) sorry : ?M_1 -elab1.lean:25:6: error: invalid 'eq.subst' application, elaborator has special support for this kind of application (it is handled as an "eliminator"), but the expected type must be known +elab1.lean:25:7: error: invalid 'eq.subst' application, elaborator has special support for this kind of application (it is handled as an "eliminator"), but the expected type must be known sorry : ?M_1 diff --git a/tests/lean/elab11.lean b/tests/lean/elab11.lean index 249dfdcef1..ae334479c1 100644 --- a/tests/lean/elab11.lean +++ b/tests/lean/elab11.lean @@ -3,14 +3,14 @@ constant bla.f : nat → nat open boo bla -check f 1 +#check f 1 set_option pp.full_names true -check (f 1 : nat) +#check (f 1 : nat) -check (f 1 : bool) +#check (f 1 : bool) set_option pp.full_names false -check (f 1 : string) +#check (f 1 : string) diff --git a/tests/lean/elab11.lean.expected.out b/tests/lean/elab11.lean.expected.out index 35c8962fab..0b675b977c 100644 --- a/tests/lean/elab11.lean.expected.out +++ b/tests/lean/elab11.lean.expected.out @@ -1,12 +1,12 @@ -elab11.lean:6:6: error: ambiguous overload, possible interpretations +elab11.lean:6:7: error: ambiguous overload, possible interpretations bla.f 1 boo.f 1 Additional information: -elab11.lean:6:6: context: switched to basic overload resolution where arguments are elaborated without any information about the expected type because expected type was not available +elab11.lean:6:7: context: switched to basic overload resolution where arguments are elaborated without any information about the expected type because expected type was not available sorry : ?M_1 bla.f 1 : ℕ boo.f 1 : bool -elab11.lean:16:7: error: none of the overloads are applicable +elab11.lean:16:8: error: none of the overloads are applicable error for bla.f invalid overload, expression f 1 @@ -23,7 +23,7 @@ has type but is expected to have type string Additional information: -elab11.lean:16:7: context: switched to basic overload resolution where arguments are elaborated without any information about the expected type, because failed to elaborate all candidates using the expected type +elab11.lean:16:8: context: switched to basic overload resolution where arguments are elaborated without any information about the expected type, because failed to elaborate all candidates using the expected type string this can happen because, for example, coercions were not considered in the process none of the overloads are applicable diff --git a/tests/lean/elab12.lean b/tests/lean/elab12.lean index 0028a87e0a..39b7bd1087 100644 --- a/tests/lean/elab12.lean +++ b/tests/lean/elab12.lean @@ -1,14 +1,14 @@ -check (take a : nat, have H : 0, from rfl a, +#check (take a : nat, have H : 0, from rfl a, (H a a) : ∀ a : nat, a = a) -check (take a : nat, have H : a = a, from rfl a, +#check (take a : nat, have H : a = a, from rfl a, (H a a) : ∀ a : nat, a = a) -check (take a : nat, have H : a = a, from a + 0, +#check (take a : nat, have H : a = a, from a + 0, (H a a) : ∀ a : nat, a = a) -check (take a : nat, have H : a = a, from rfl, +#check (take a : nat, have H : a = a, from rfl, (H a) : ∀ a : nat, a = a) -check (take a : nat, have H : a = a, from rfl, +#check (take a : nat, have H : a = a, from rfl, H : ∀ a : nat, a = a) diff --git a/tests/lean/elab12.lean.expected.out b/tests/lean/elab12.lean.expected.out index f8338d3aba..4b48841c61 100644 --- a/tests/lean/elab12.lean.expected.out +++ b/tests/lean/elab12.lean.expected.out @@ -1,22 +1,22 @@ -elab12.lean:1:30: error: type expected at +elab12.lean:1:31: error: type expected at 0 -elab12.lean:1:38: error: function expected at +elab12.lean:1:39: error: function expected at rfl Additional information: -elab12.lean:1:38: context: switched to simple application elaboration procedure because failed to use expected type to elaborate it, error message +elab12.lean:1:39: context: switched to simple application elaboration procedure because failed to use expected type to elaborate it, error message too many arguments elab12.lean:2:2: error: function expected at H λ (a : ℕ), have H : sorry, from sorry, sorry : ∀ (a : ℕ), a = a -elab12.lean:4:42: error: function expected at +elab12.lean:4:43: error: function expected at rfl Additional information: -elab12.lean:4:42: context: switched to simple application elaboration procedure because failed to use expected type to elaborate it, error message +elab12.lean:4:43: context: switched to simple application elaboration procedure because failed to use expected type to elaborate it, error message too many arguments elab12.lean:5:2: error: function expected at H λ (a : ℕ), have H : a = a, from sorry, sorry : ∀ (a : ℕ), a = a -elab12.lean:7:44: error: invalid have-expression, expression +elab12.lean:7:45: error: invalid have-expression, expression a + 0 has type ℕ diff --git a/tests/lean/elab13.lean b/tests/lean/elab13.lean index c6e8e915c9..521ab6dd73 100644 --- a/tests/lean/elab13.lean +++ b/tests/lean/elab13.lean @@ -1,6 +1,6 @@ open tactic list -check +#check take c : name, ( do { diff --git a/tests/lean/elab14.lean b/tests/lean/elab14.lean index 5a0eb25e27..de1d006614 100644 --- a/tests/lean/elab14.lean +++ b/tests/lean/elab14.lean @@ -1,3 +1,3 @@ set_option pp.all true universe variables u -check λ (A B : Type u) (a : A) (b : B), a +#check λ (A B : Type u) (a : A) (b : B), a diff --git a/tests/lean/elab15.lean b/tests/lean/elab15.lean index 9cda19b72e..e1cc828aa6 100644 --- a/tests/lean/elab15.lean +++ b/tests/lean/elab15.lean @@ -1,7 +1,7 @@ open tactic set_option pp.notation false universe variables u -check +#check λ (A : Type u) (a b c d : A) (H₁ : a = b) (H₂ : c = b) (H₃ : d = c), have a = c, by do { transitivity, assumption, symmetry, assumption }, show a = d, by do { transitivity, this ← get_local "this", exact this, symmetry, assumption } diff --git a/tests/lean/elab2.lean b/tests/lean/elab2.lean index e151197272..ec19ea0550 100644 --- a/tests/lean/elab2.lean +++ b/tests/lean/elab2.lean @@ -5,11 +5,11 @@ a -- set_option trace.elaborator_detail true set_option pp.all true -check foo 0 1 +#check foo 0 1 definition bla {A B : Type*} (a₁ a₂ : A) (b : B) : A := a₁ -check bla nat.zero tt 1 +#check bla nat.zero tt 1 -check bla 0 0 tt +#check bla 0 0 tt diff --git a/tests/lean/elab2.lean.expected.out b/tests/lean/elab2.lean.expected.out index bc9e2fcd15..27964b9257 100644 --- a/tests/lean/elab2.lean.expected.out +++ b/tests/lean/elab2.lean.expected.out @@ -1,5 +1,5 @@ @foo.{0 0} nat nat nat.has_add (@zero.{0} nat nat.has_zero) (@one.{0} nat nat.has_one) : nat -elab2.lean:13:6: error: type mismatch at application +elab2.lean:13:7: error: type mismatch at application @bla.{0 ?l_1} nat ?m_2 nat.zero bool.tt term bool.tt diff --git a/tests/lean/elab3.lean b/tests/lean/elab3.lean index 7d5be49ed2..636603f4f4 100644 --- a/tests/lean/elab3.lean +++ b/tests/lean/elab3.lean @@ -3,4 +3,4 @@ open tactic set_option pp.all true -check trace_state >> trace_state +#check trace_state >> trace_state diff --git a/tests/lean/elab4.lean b/tests/lean/elab4.lean index 1110b079d9..29300b21f8 100644 --- a/tests/lean/elab4.lean +++ b/tests/lean/elab4.lean @@ -8,16 +8,16 @@ open boo foo bla set_option pp.full_names true -check f 0 1 2 +#check f 0 1 2 -check f 0 1 2 3 +#check f 0 1 2 3 -check f 0 1 +#check f 0 1 -check f tt 2 +#check f tt 2 -check f tt ff tt +#check f tt ff tt -check f tt ff +#check f tt ff -check @foo.f _ _ 0 1 +#check @foo.f _ _ 0 1 diff --git a/tests/lean/elab4.lean.expected.out b/tests/lean/elab4.lean.expected.out index 836cd4a61a..cc25d53360 100644 --- a/tests/lean/elab4.lean.expected.out +++ b/tests/lean/elab4.lean.expected.out @@ -1,5 +1,5 @@ boo.f 0 1 2 : ℕ -elab4.lean:13:6: error: none of the overloads are applicable +elab4.lean:13:7: error: none of the overloads are applicable error for bla.f failed to synthesize type class instance for ⊢ has_add bool @@ -12,20 +12,20 @@ error for boo.f function expected at boo.f 0 1 2 Additional information: -elab4.lean:13:6: context: switched to basic overload resolution where arguments are elaborated without any information about the expected type because expected type was not available +elab4.lean:13:7: context: switched to basic overload resolution where arguments are elaborated without any information about the expected type because expected type was not available sorry : ?M_1 -elab4.lean:15:6: error: ambiguous overload, possible interpretations +elab4.lean:15:7: error: ambiguous overload, possible interpretations foo.f 0 1 boo.f 0 1 Additional information: -elab4.lean:15:6: context: switched to basic overload resolution where arguments are elaborated without any information about the expected type because expected type was not available +elab4.lean:15:7: context: switched to basic overload resolution where arguments are elaborated without any information about the expected type because expected type was not available sorry : ?M_1 foo.f bool.tt 2 : bool bla.f bool.tt bool.ff bool.tt : bool → bool -elab4.lean:21:6: error: ambiguous overload, possible interpretations +elab4.lean:21:7: error: ambiguous overload, possible interpretations bla.f bool.tt bool.ff foo.f bool.tt bool.ff Additional information: -elab4.lean:21:6: context: switched to basic overload resolution where arguments are elaborated without any information about the expected type because expected type was not available +elab4.lean:21:7: context: switched to basic overload resolution where arguments are elaborated without any information about the expected type because expected type was not available sorry : ?M_1 foo.f 0 1 : ℕ diff --git a/tests/lean/elab4b.lean b/tests/lean/elab4b.lean index 5bfb80f4a5..86135581c1 100644 --- a/tests/lean/elab4b.lean +++ b/tests/lean/elab4b.lean @@ -6,8 +6,8 @@ definition bla.f (a b c d : bool) := a open boo foo bla -check f 0 1 2 3 +#check f 0 1 2 3 -check f 0 1 +#check f 0 1 -check f tt ff +#check f tt ff diff --git a/tests/lean/elab4b.lean.expected.out b/tests/lean/elab4b.lean.expected.out index f5de44bf90..cdfe0d8a03 100644 --- a/tests/lean/elab4b.lean.expected.out +++ b/tests/lean/elab4b.lean.expected.out @@ -1,4 +1,4 @@ -elab4b.lean:9:6: error: none of the overloads are applicable +elab4b.lean:9:7: error: none of the overloads are applicable error for bla.f failed to synthesize type class instance for ⊢ has_add bool @@ -11,17 +11,17 @@ error for boo.f function expected at f 0 1 2 Additional information: -elab4b.lean:9:6: context: switched to basic overload resolution where arguments are elaborated without any information about the expected type because expected type was not available +elab4b.lean:9:7: context: switched to basic overload resolution where arguments are elaborated without any information about the expected type because expected type was not available sorry : ?M_1 -elab4b.lean:11:6: error: ambiguous overload, possible interpretations +elab4b.lean:11:7: error: ambiguous overload, possible interpretations foo.f 0 1 boo.f 0 1 Additional information: -elab4b.lean:11:6: context: switched to basic overload resolution where arguments are elaborated without any information about the expected type because expected type was not available +elab4b.lean:11:7: context: switched to basic overload resolution where arguments are elaborated without any information about the expected type because expected type was not available sorry : ?M_1 -elab4b.lean:13:6: error: ambiguous overload, possible interpretations +elab4b.lean:13:7: error: ambiguous overload, possible interpretations bla.f bool.tt bool.ff foo.f bool.tt bool.ff Additional information: -elab4b.lean:13:6: context: switched to basic overload resolution where arguments are elaborated without any information about the expected type because expected type was not available +elab4b.lean:13:7: context: switched to basic overload resolution where arguments are elaborated without any information about the expected type because expected type was not available sorry : ?M_1 diff --git a/tests/lean/elab5.lean b/tests/lean/elab5.lean index 85d559a996..6781c764fb 100644 --- a/tests/lean/elab5.lean +++ b/tests/lean/elab5.lean @@ -1,3 +1,3 @@ constant s : sum nat bool -check @eq.refl (sum nat bool) s +#check @eq.refl (sum nat bool) s diff --git a/tests/lean/elab6.lean b/tests/lean/elab6.lean index 84caa3b3df..74e361575b 100644 --- a/tests/lean/elab6.lean +++ b/tests/lean/elab6.lean @@ -4,14 +4,14 @@ set_option pp.all true constant F : ∀ {A : Type*} ⦃a : A⦄ {b : A} (c : A) ⦃e : A⦄, A → A → A -check H -check F -check F tt -check F tt tt -check F tt tt tt +#check H +#check F +#check F tt +#check F tt tt +#check F tt tt tt -check H -check F -check F tt -check F tt tt -check F tt tt tt +#check H +#check F +#check F tt +#check F tt tt +#check F tt tt tt diff --git a/tests/lean/elab7.lean b/tests/lean/elab7.lean index edb6bdee49..1f537ada87 100644 --- a/tests/lean/elab7.lean +++ b/tests/lean/elab7.lean @@ -1,10 +1,10 @@ set_option pp.all true set_option pp.purify_metavars false -check λ x : nat, x + 1 +#check λ x : nat, x + 1 -check λ x y : nat, x + y +#check λ x y : nat, x + y -check λ x y, x + y + 1 +#check λ x y, x + y + 1 -check λ x, (x + 1) :: [] +#check λ x, (x + 1) :: [] diff --git a/tests/lean/elab8.lean b/tests/lean/elab8.lean index 8e4cfd3921..bd447c76a5 100644 --- a/tests/lean/elab8.lean +++ b/tests/lean/elab8.lean @@ -3,8 +3,8 @@ set_option pp.implicit true set_option pp.numerals false set_option pp.binder_types true -check λ (A : Type*) [has_add A] [has_one A] [has_lt A] (a : A), a + 1 +#check λ (A : Type*) [has_add A] [has_one A] [has_lt A] (a : A), a + 1 -check λ (A : Type*) [has_add A] [has_one A] [has_lt A] (a : A) (H : a > 1), a + 1 +#check λ (A : Type*) [has_add A] [has_one A] [has_lt A] (a : A) (H : a > 1), a + 1 -check λ (A : Type*) [has_add A] [has_one A] [has_lt A] (a : A) (H₁ : a > 1) (H₂ : a < 5), a + 1 +#check λ (A : Type*) [has_add A] [has_one A] [has_lt A] (a : A) (H₁ : a > 1) (H₂ : a < 5), a + 1 diff --git a/tests/lean/elab9.lean b/tests/lean/elab9.lean index 37a6dcb486..194f02e1e4 100644 --- a/tests/lean/elab9.lean +++ b/tests/lean/elab9.lean @@ -3,6 +3,6 @@ set_option pp.implicit true set_option pp.numerals false set_option pp.binder_types true -check λ (A : Type*) [has_add A] [has_zero A] (a : A) (H : a + 0 = a) [has_add A] (H : a = 0 + 0), a + a +#check λ (A : Type*) [has_add A] [has_zero A] (a : A) (H : a + 0 = a) [has_add A] (H : a = 0 + 0), a + a -check λ (a b : nat) (H : a > b) [has_lt nat], a < b +#check λ (a b : nat) (H : a > b) [has_lt nat], a < b diff --git a/tests/lean/elab_error_recovery.lean b/tests/lean/elab_error_recovery.lean index 73035b3358..6af7671eb0 100644 --- a/tests/lean/elab_error_recovery.lean +++ b/tests/lean/elab_error_recovery.lean @@ -11,11 +11,11 @@ def half_baked : ℕ → ℕ -- nested elaboration errors | _ := begin exact [] end -print half_baked._main +#print half_baked._main -eval half_baked 3 -eval half_baked 5 -vm_eval half_baked 3 +#reduce half_baked 3 +#reduce half_baked 5 +#eval half_baked 3 -- type errors in binders -check ∀ x : nat.zero, x = x +#check ∀ x : nat.zero, x = x diff --git a/tests/lean/elab_error_recovery.lean.expected.out b/tests/lean/elab_error_recovery.lean.expected.out index 9b5539d3e2..812ba68623 100644 --- a/tests/lean/elab_error_recovery.lean.expected.out +++ b/tests/lean/elab_error_recovery.lean.expected.out @@ -43,6 +43,6 @@ def half_baked._main : ℕ → ℕ := 2 nat.succ (nat.succ (nat.succ (nat.succ sorry))) 2 -elab_error_recovery.lean:21:12: error: type expected at +elab_error_recovery.lean:21:13: error: type expected at 0 ∀ (x : sorry), x = x : Prop diff --git a/tests/lean/elab_meta2.lean b/tests/lean/elab_meta2.lean index a8484d3cdd..889dbbe142 100644 --- a/tests/lean/elab_meta2.lean +++ b/tests/lean/elab_meta2.lean @@ -1,29 +1,29 @@ -print "parametric meta definition" +#print "parametric meta definition" meta definition f {A : Type} : nat → A → A → A | n a b := if n / 2 = 0 then a else f (n / 2) b a -vm_eval +#eval if f 10 1 2 = 2 then "OK" else "FAILED" namespace foo -print "parametric meta definition inside namespace" +#print "parametric meta definition inside namespace" meta definition bla {A : Type} : nat → A → A → A | n a b := if n / 2 = 0 then a else bla (n / 2) b a -vm_eval +#eval if foo.bla 10 1 2 = 2 then "OK" else "FAILED" end foo namespace foo section -print "meta definition inside parametric scope" +#print "meta definition inside parametric scope" parameter {A : Type} meta definition bah : nat → A → A → A | n a b := if n / 2 = 0 then a else bah (n / 2) b a end -vm_eval if foo.bah 10 1 2 = 2 then "OK" else "FAILED" +#eval if foo.bah 10 1 2 = 2 then "OK" else "FAILED" end foo -print "private meta definition" +#print "private meta definition" private meta definition hprv {A : Type} : nat → A → A → A | n a b := if n / 2 = 0 then a else hprv (n / 2) b a -vm_eval +#eval if hprv 10 1 2 = 2 then "OK" else "FAILED" diff --git a/tests/lean/error_full_names.lean b/tests/lean/error_full_names.lean index bdf7930167..8ea3f51965 100644 --- a/tests/lean/error_full_names.lean +++ b/tests/lean/error_full_names.lean @@ -1,9 +1,9 @@ namespace foo open nat inductive nat : Type | zero, foosucc : nat → nat -check 0 + nat.zero --error +#check 0 + nat.zero --error end foo namespace foo -check nat.succ nat.zero --error +#check nat.succ nat.zero --error end foo diff --git a/tests/lean/error_full_names.lean.expected.out b/tests/lean/error_full_names.lean.expected.out index e07b96f4ee..6015466e5b 100644 --- a/tests/lean/error_full_names.lean.expected.out +++ b/tests/lean/error_full_names.lean.expected.out @@ -1,9 +1,9 @@ -error_full_names.lean:4:6: error: failed to synthesize type class instance for +error_full_names.lean:4:7: error: failed to synthesize type class instance for ⊢ has_zero nat -error_full_names.lean:4:8: error: failed to synthesize type class instance for +error_full_names.lean:4:9: error: failed to synthesize type class instance for ⊢ has_add nat 0 + nat.zero : nat -error_full_names.lean:8:6: error: type mismatch at application +error_full_names.lean:8:7: error: type mismatch at application nat.succ nat.zero term nat.zero diff --git a/tests/lean/error_pos.lean b/tests/lean/error_pos.lean index 9b01dda21a..ef4706d2e3 100644 --- a/tests/lean/error_pos.lean +++ b/tests/lean/error_pos.lean @@ -6,11 +6,11 @@ begin intros, trivial end -check λ (A : Type) (B : A → Type) (b : B), true +#check λ (A : Type) (B : A → Type) (b : B), true -check λ (A : Type) (B : A → Type), B → true +#check λ (A : Type) (B : A → Type), B → true -check λ (A : Type) (B : A → Type) b, (b : B) +#check λ (A : Type) (B : A → Type) b, (b : B) example {A : Type} {B : Type} {a₁ a₂ : B} {b₁ b₂ : A → B} : a₁ = a₂ → (∀ x, b₁ x = b₂ x) → (let x : A := a₁ in b₁ x) = (let x : A := a₂ in b₂ x) := sorry diff --git a/tests/lean/error_pos.lean.expected.out b/tests/lean/error_pos.lean.expected.out index 65614b9b53..4c3f92fcbe 100644 --- a/tests/lean/error_pos.lean.expected.out +++ b/tests/lean/error_pos.lean.expected.out @@ -3,13 +3,13 @@ error_pos.lean:1:39: error: type expected at error_pos.lean:1:8: warning: declaration '_example' uses sorry error_pos.lean:4:43: error: type expected at B -error_pos.lean:9:39: error: type expected at +error_pos.lean:9:40: error: type expected at B λ (A : Type) (B : A → Type) (b : sorry), true : Π (A : Type), (A → Type) → sorry → Prop -error_pos.lean:11:35: error: type expected at +error_pos.lean:11:36: error: type expected at B λ (A : Type) (B : A → Type), sorry → true : Π (A : Type), (A → Type) → Prop -error_pos.lean:13:42: error: type expected at +error_pos.lean:13:43: error: type expected at B λ (A : Type) (B : A → Type) (b : sorry), b : Π (A : Type), (A → Type) → sorry → sorry error_pos.lean:15:105: error: invalid let-expression, expression diff --git a/tests/lean/eta_bug.lean b/tests/lean/eta_bug.lean index d1078f8757..33a1e6124e 100644 --- a/tests/lean/eta_bug.lean +++ b/tests/lean/eta_bug.lean @@ -1,4 +1,4 @@ -- -eval λ (A : Type*) (x y : A) (H₁ : x = y) (H₂ : y = x), eq.trans H₁ H₂ +#reduce λ (A : Type*) (x y : A) (H₁ : x = y) (H₂ : y = x), eq.trans H₁ H₂ -- Should not reduce to -- λ (A : Type*) (x y : A), eq.trans diff --git a/tests/lean/eval_expr_error.lean b/tests/lean/eval_expr_error.lean index ceb111fa31..85e30dc401 100644 --- a/tests/lean/eval_expr_error.lean +++ b/tests/lean/eval_expr_error.lean @@ -5,13 +5,13 @@ do a ← to_expr `(0), v ← eval_expr A a, return () -run_command do +run_cmd do a ← to_expr `(nat.add), v ← eval_expr nat a, trace v, return () -run_command do +run_cmd do a ← to_expr `(λ x : nat, x + 1), v ← (eval_expr nat a <|> trace "tactic failed" >> return 1), trace v, diff --git a/tests/lean/expr_quote.lean b/tests/lean/expr_quote.lean index 2592276138..0fb1ec9b0c 100644 --- a/tests/lean/expr_quote.lean +++ b/tests/lean/expr_quote.lean @@ -3,4 +3,4 @@ meta def f (α a : expr) := ```(@id %%α %%a) meta def f (α a : expr) := ```(@id (%%α : Type 2) %%a) set_option pp.universes true -print f +#print f diff --git a/tests/lean/extra/print_tests.lean b/tests/lean/extra/print_tests.lean index 26dc285871..6af65c8c25 100644 --- a/tests/lean/extra/print_tests.lean +++ b/tests/lean/extra/print_tests.lean @@ -1,7 +1,7 @@ -print notation +#print notation -print notation ∧ ∨ +#print notation ∧ ∨ -print notation if +#print notation if -print notation % +#print notation % diff --git a/tests/lean/field_access.lean b/tests/lean/field_access.lean index f5f4767037..ca1baaac66 100644 --- a/tests/lean/field_access.lean +++ b/tests/lean/field_access.lean @@ -1,10 +1,10 @@ -check list.map +#check list.map variable l : list nat -check l~>1 -- Error l is not a structure +#check l~>1 -- Error l is not a structure -check (1, 2)~>5 -- Error insufficient fields +#check (1, 2)~>5 -- Error insufficient fields example (l : list nat) : list nat := l~>forr (λ x, x + 1) -- Error there is no list.forr diff --git a/tests/lean/field_access.lean.expected.out b/tests/lean/field_access.lean.expected.out index 68e5968a5e..97f366d4a7 100644 --- a/tests/lean/field_access.lean.expected.out +++ b/tests/lean/field_access.lean.expected.out @@ -1,10 +1,10 @@ list.map : (?M_1 → ?M_2) → list ?M_1 → list ?M_2 -field_access.lean:5:7: error: invalid projection, structure expected +field_access.lean:5:8: error: invalid projection, structure expected l has type list ℕ sorry : ?M_1 -field_access.lean:7:12: error: invalid projection, structure has only 2 field(s) +field_access.lean:7:13: error: invalid projection, structure has only 2 field(s) (1, 2) which has type ?m_1 × ?m_2 diff --git a/tests/lean/fold.lean b/tests/lean/fold.lean index efa15d31b8..027a70c721 100644 --- a/tests/lean/fold.lean +++ b/tests/lean/fold.lean @@ -5,31 +5,31 @@ variables a b c : num section local notation `(` t:(foldr `, ` (e r, prod.mk e r)) `)` := t - check (a, false, b, true, c) + #check (a, false, b, true, c) set_option pp.notation false - check (a, false, b, true, c) + #check (a, false, b, true, c) end section local notation `(` t:(foldr `, ` (e r, prod.mk r e)) `)` := t set_option pp.notation true - check (a, false, b, true, c) + #check (a, false, b, true, c) set_option pp.notation false - check (a, false, b, true, c) + #check (a, false, b, true, c) end section local notation `(` t:(foldl `, ` (e r, prod.mk r e)) `)` := t set_option pp.notation true - check (a, false, b, true, c) + #check (a, false, b, true, c) set_option pp.notation false - check (a, false, b, true, c) + #check (a, false, b, true, c) end section local notation `(` t:(foldl `, ` (e r, prod.mk e r)) `)` := t set_option pp.notation true - check (a, false, b, true, c) + #check (a, false, b, true, c) set_option pp.notation false - check (a, false, b, true, c) + #check (a, false, b, true, c) end diff --git a/tests/lean/ftree.lean b/tests/lean/ftree.lean index e1631ea0ce..ea6ab3158c 100644 --- a/tests/lean/ftree.lean +++ b/tests/lean/ftree.lean @@ -16,7 +16,7 @@ inductive ftree (A : Type) (B : Type) : Type | node : (A → B → ftree) → (B → ftree) → ftree set_option pp.universes true -check ftree +#check ftree end implicit @@ -27,5 +27,5 @@ inductive ftree (A : Type) (B : Type) : Type | leafb : B → ftree | node : (List A → ftree) → (B → ftree) → ftree set_option pp.universes true -check ftree +#check ftree end implicit2 diff --git a/tests/lean/hex_char.lean b/tests/lean/hex_char.lean index 215f85e833..1fff899be0 100644 --- a/tests/lean/hex_char.lean +++ b/tests/lean/hex_char.lean @@ -1,3 +1,3 @@ -vm_eval #"\x41" -vm_eval #"\x42" -vm_eval #"\x43" +#eval #"\x41" +#eval #"\x42" +#eval #"\x43" diff --git a/tests/lean/hex_numeral.lean b/tests/lean/hex_numeral.lean index 53b7249c53..8a07c476b5 100644 --- a/tests/lean/hex_numeral.lean +++ b/tests/lean/hex_numeral.lean @@ -1,5 +1,5 @@ -vm_eval (0xff : nat) -vm_eval (0xffff : nat) -vm_eval (0xaa : nat) -vm_eval (0x10 : nat) -vm_eval (0x10000 : nat) +#eval (0xff : nat) +#eval (0xffff : nat) +#eval (0xaa : nat) +#eval (0x10 : nat) +#eval (0x10000 : nat) diff --git a/tests/lean/hinst_lemmas1.lean b/tests/lean/hinst_lemmas1.lean index e5c637ddb0..5752516707 100644 --- a/tests/lean/hinst_lemmas1.lean +++ b/tests/lean/hinst_lemmas1.lean @@ -3,7 +3,7 @@ axiom foo2 : ∀ (a b c : nat), b > a → b < c → a < c axiom foo3 : ∀ (a b c : nat), b > a → b < c + c → a < c + c -run_command +run_cmd do hs ← return $ hinst_lemmas.mk, h₁ ← hinst_lemma.mk_from_decl `foo1, diff --git a/tests/lean/hinst_lemmas2.lean b/tests/lean/hinst_lemmas2.lean index 4b57ccf0ee..4a081fdf32 100644 --- a/tests/lean/hinst_lemmas2.lean +++ b/tests/lean/hinst_lemmas2.lean @@ -1,4 +1,4 @@ -run_command mk_hinst_lemma_attr_set `attr_main [`attr1, `attr2] [`sattr1, `sattr2] +run_cmd mk_hinst_lemma_attr_set `attr_main [`attr1, `attr2] [`sattr1, `sattr2] constant f : nat → nat constant g : nat → nat → nat @@ -20,4 +20,4 @@ attribute [attr2] gax4 attribute [attr_main] gax5 attribute [sattr1] gax6 -run_command get_hinst_lemmas_for_attr `attr_main >>= hinst_lemmas.pp >>= tactic.trace +run_cmd get_hinst_lemmas_for_attr `attr_main >>= hinst_lemmas.pp >>= tactic.trace diff --git a/tests/lean/import_invalid_tk.lean b/tests/lean/import_invalid_tk.lean index 5ff4c774c4..eadbdb4427 100644 --- a/tests/lean/import_invalid_tk.lean +++ b/tests/lean/import_invalid_tk.lean @@ -1,3 +1,3 @@ import data.bitvec 0b311 -print bitvec +#print bitvec diff --git a/tests/lean/import_middle.lean b/tests/lean/import_middle.lean index 2e04148c1a..3e10d383a9 100644 --- a/tests/lean/import_middle.lean +++ b/tests/lean/import_middle.lean @@ -1,5 +1,5 @@ import data.set -print "hello" +#print "hello" import data.tuple diff --git a/tests/lean/induction_tac1.lean b/tests/lean/induction_tac1.lean index f09f1fb666..f4f5a5ff2c 100644 --- a/tests/lean/induction_tac1.lean +++ b/tests/lean/induction_tac1.lean @@ -8,7 +8,7 @@ by do constructor_idx 2, assumption, constructor_idx 1, assumption -print "-----" +#print "-----" open nat example (n : ℕ) : n = 0 ∨ n = succ (pred n) := @@ -20,7 +20,7 @@ by do constructor_idx 2, reflexivity, return () -print "-----" +#print "-----" example (n : ℕ) (H : n ≠ 0) : n > 0 → n = succ (pred n) := by do diff --git a/tests/lean/inductive_resultant_level_inference.lean b/tests/lean/inductive_resultant_level_inference.lean index 45951ca0ae..23d8639079 100644 --- a/tests/lean/inductive_resultant_level_inference.lean +++ b/tests/lean/inductive_resultant_level_inference.lean @@ -3,18 +3,18 @@ universe variables u v w namespace X1 -print "\n1. ?U does not unify with anything" +#print "\n1. ?U does not unify with anything" inductive foo (A : Type u) (B : Type (v+1)) | mk : A → B → foo -check @foo.{u v} -- : Type (max u (v+1)) +#check @foo.{u v} -- : Type (max u (v+1)) end X1 namespace X2 -print "\n2. ?U unifies with a constant, no others above: done" +#print "\n2. ?U unifies with a constant, no others above: done" inductive bar (A : Sort 2) : Sort 2 | mk : A → bar @@ -22,12 +22,12 @@ inductive bar (A : Sort 2) : Sort 2 inductive foo | mk : Type → bar foo → foo -check @foo -- : Type 1 +#check @foo -- : Type 1 end X2 namespace X3 -print "\n3. ?U unifies with a constant, and one above: error" +#print "\n3. ?U unifies with a constant, and one above: error" inductive bar (A : Sort 2) : Sort 2 | mk : A → bar @@ -38,7 +38,7 @@ inductive foo (A : Sort u) end X3 namespace X4 -print "\n4. ?U unifies with a meta, but nesting recursor goes to Prop: error" +#print "\n4. ?U unifies with a meta, but nesting recursor goes to Prop: error" inductive bar (A : Sort u) : Sort u | mk : A → bar @@ -49,7 +49,7 @@ inductive foo end X4 namespace X5 -print "\n5. ?U unifies with a meta: old approach, set level-param" +#print "\n5. ?U unifies with a meta: old approach, set level-param" inductive bar (A : Sort u) : Sort (max u 1) | mk : A → bar @@ -57,12 +57,12 @@ inductive bar (A : Sort u) : Sort (max u 1) inductive foo (A : Sort u) | mk : A → bar foo → foo -check @foo.{u} -- Sort u → Sort (max u 1) +#check @foo.{u} -- Sort u → Sort (max u 1) end X5 namespace X6 -print "\n6. ?U unifies with a shifted meta, no others above: set level-param to be inverse of meta" +#print "\n6. ?U unifies with a shifted meta, no others above: set level-param to be inverse of meta" inductive bar (A : Sort (u + 3)) : Sort (u + 3) | mk : A → bar @@ -70,12 +70,12 @@ inductive bar (A : Sort (u + 3)) : Sort (u + 3) inductive foo (A : Sort u) | mk : A → bar foo → foo -check @foo.{u} -- Sort u → Sort (u+3) +#check @foo.{u} -- Sort u → Sort (u+3) end X6 namespace X7 -print "\n7. ?U unifies with a max: error" +#print "\n7. ?U unifies with a max: error" inductive bar (A : Sort (max u v)) : Sort (max u v 7) | mk : A → bar @@ -85,7 +85,7 @@ inductive foo (A : Sort v) end X7 namespace X8 -print "\n8. wrapping inductive returns element in different universe: error" +#print "\n8. wrapping inductive returns element in different universe: error" inductive bar (A : Sort u) : Sort (u + 1) | mk : A → bar @@ -96,7 +96,7 @@ end X8 namespace X9 -print "\n9. nesting with no other level params" +#print "\n9. nesting with no other level params" inductive bar (A : Sort u) : Sort (max u 1) | mk : A → bar @@ -104,12 +104,12 @@ inductive bar (A : Sort u) : Sort (max u 1) inductive foo | mk : bar foo → foo -check @foo +#check @foo end X9 namespace X10 -print "\n10. original 1343" +#print "\n10. original 1343" inductive foo (α : Sort (u+1)) : Sort (u+1) | mk : α → foo @@ -117,12 +117,12 @@ inductive foo (α : Sort (u+1)) : Sort (u+1) inductive bug | mk : foo bug → bug -check @bug +#check @bug end X10 namespace X11 -print "\n11. unifies with constant, result sort different: error" +#print "\n11. unifies with constant, result sort different: error" inductive foo (α : Sort 2) : Sort 1 | mk : foo @@ -133,7 +133,7 @@ inductive bug end X11 namespace X12 -print "\n12. multiple nestings" +#print "\n12. multiple nestings" inductive foo₁ (α : Sort u) : Sort (max u 1) | mk : foo₁ @@ -148,12 +148,12 @@ inductive bug | mk₁ : foo₁ bug → foo₂ bug → foo₃ bug → foo₃ (foo₂ (foo₁ bug)) → foo₁ (foo₂ (foo₃ bug)) → bug | mk₂ : foo₁ bug → foo₂ bug → foo₃ bug → foo₃ (foo₂ (foo₁ bug)) → foo₁ (foo₂ (foo₃ bug)) → bug -check @bug +#check @bug end X12 namespace X13 -print "\n13. ?U indirectly assigned to a constant" +#print "\n13. ?U indirectly assigned to a constant" inductive foo (α β : Sort u) : Sort (max u 1) | mk : foo @@ -161,12 +161,12 @@ inductive foo (α β : Sort u) : Sort (max u 1) inductive bug | mk₁ : foo bug (Type 3) → bug -check @bug +#check @bug end X13 namespace X14 -print "\n14. No resultant level and lps are used in intro rule: error" +#print "\n14. No resultant level and lps are used in intro rule: error" inductive foo (α : Type u) : Type u | mk : foo diff --git a/tests/lean/inline_issue.lean b/tests/lean/inline_issue.lean index 6e8b4916cb..c7df4bff47 100644 --- a/tests/lean/inline_issue.lean +++ b/tests/lean/inline_issue.lean @@ -8,7 +8,7 @@ trace_call_stack meta def g (n : nat) : tactic unit := trace "world" >> f n -run_command (do +run_cmd (do x ← return 5, x ← return 5, x ← return 5, diff --git a/tests/lean/inst.lean b/tests/lean/inst.lean index d441e569ea..1de8832268 100644 --- a/tests/lean/inst.lean +++ b/tests/lean/inst.lean @@ -23,4 +23,4 @@ C.mk (prod.mk (val Ha) (val Hb)) noncomputable definition test : C (prod Prop Prop) := by tactic.apply_instance -eval test +#reduce test diff --git a/tests/lean/inst_error.lean b/tests/lean/inst_error.lean index efb8c011ec..5cdbb7209f 100644 --- a/tests/lean/inst_error.lean +++ b/tests/lean/inst_error.lean @@ -1 +1 @@ -check λ (A : Type) (a : A) (b c : _), if a = b ∧ a = c then tt else ff +#check λ (A : Type) (a : A) (b c : _), if a = b ∧ a = c then tt else ff diff --git a/tests/lean/inst_error.lean.expected.out b/tests/lean/inst_error.lean.expected.out index 5e20c5ca89..580577defb 100644 --- a/tests/lean/inst_error.lean.expected.out +++ b/tests/lean/inst_error.lean.expected.out @@ -1,4 +1,4 @@ -inst_error.lean:1:38: error: failed to synthesize type class instance for +inst_error.lean:1:39: error: failed to synthesize type class instance for A : Type, a b c : A ⊢ decidable (a = b ∧ a = c) diff --git a/tests/lean/instance_cache_bug1.lean b/tests/lean/instance_cache_bug1.lean index 3c7df9b31c..bb7990da16 100644 --- a/tests/lean/instance_cache_bug1.lean +++ b/tests/lean/instance_cache_bug1.lean @@ -2,8 +2,8 @@ constant A : Type constant a : A constant A_has_add : has_add A -check a + a -- ERROR +#check a + a -- ERROR attribute [instance] A_has_add -check a + a +#check a + a diff --git a/tests/lean/instance_cache_bug1.lean.expected.out b/tests/lean/instance_cache_bug1.lean.expected.out index 342edee062..4ee1207edc 100644 --- a/tests/lean/instance_cache_bug1.lean.expected.out +++ b/tests/lean/instance_cache_bug1.lean.expected.out @@ -1,4 +1,4 @@ -instance_cache_bug1.lean:5:8: error: failed to synthesize type class instance for +instance_cache_bug1.lean:5:9: error: failed to synthesize type class instance for ⊢ has_add A a + a : A a + a : A diff --git a/tests/lean/int_eval.lean b/tests/lean/int_eval.lean index f88c869b0b..971ac6cbab 100644 --- a/tests/lean/int_eval.lean +++ b/tests/lean/int_eval.lean @@ -1,24 +1,24 @@ -vm_eval (1073741823:int) -vm_eval (1073741824:int) -vm_eval ((1073741824:int) + (1:int) - (3:int)) -vm_eval - (2:int) -vm_eval - (1000:int) -vm_eval 10 - (1000:int) -vm_eval (1073741824:int) * 10 -vm_eval (100000:int) * (-3:int) -vm_eval -(1073741823:int) -vm_eval ((1073741824:int) + (1:int) - (1:int)) -vm_eval int.of_nat 1000 -vm_eval int.of_nat 1073741823 +#eval (1073741823:int) +#eval (1073741824:int) +#eval ((1073741824:int) + (1:int) - (3:int)) +#eval - (2:int) +#eval - (1000:int) +#eval 10 - (1000:int) +#eval (1073741824:int) * 10 +#eval (100000:int) * (-3:int) +#eval -(1073741823:int) +#eval ((1073741824:int) + (1:int) - (1:int)) +#eval int.of_nat 1000 +#eval int.of_nat 1073741823 def Abs : int → nat | (int.of_nat n) := n | (int.neg_succ_of_nat n) := n + 1 -vm_eval 10000 -vm_eval Abs (- 10000) -vm_eval Abs (-1073741823) -vm_eval Abs (-1073741824) -vm_eval Abs (-1073741825) +#eval 10000 +#eval Abs (- 10000) +#eval Abs (-1073741823) +#eval Abs (-1073741824) +#eval Abs (-1073741825) -vm_eval -(1073741823:int) * 1000000000 +#eval -(1073741823:int) * 1000000000 diff --git a/tests/lean/interactive/info.lean b/tests/lean/interactive/info.lean index 265e146a97..552c429372 100644 --- a/tests/lean/interactive/info.lean +++ b/tests/lean/interactive/info.lean @@ -15,5 +15,5 @@ example := [tt] example := [tt]++[] --^ "command": "info" -print id +#print id --^ "command": "info" diff --git a/tests/lean/interactive/rb_map_ts.lean b/tests/lean/interactive/rb_map_ts.lean index 6bbb46a5c7..c012256e68 100644 --- a/tests/lean/interactive/rb_map_ts.lean +++ b/tests/lean/interactive/rb_map_ts.lean @@ -68,7 +68,7 @@ begin [mytac] assumption end -print ex₁ +#print ex₁ lemma ex₂ (p q : Prop) : p → q → p ∧ q := begin [mytac] @@ -82,4 +82,4 @@ begin [mytac] assumption end -print ex₂ +#print ex₂ diff --git a/tests/lean/io_bug1.lean b/tests/lean/io_bug1.lean index 4c33ed8f68..8c2340dce9 100644 --- a/tests/lean/io_bug1.lean +++ b/tests/lean/io_bug1.lean @@ -3,20 +3,20 @@ open io def bar : io unit := do put_str "one", put_str "two", put_str "three" -vm_eval bar +#eval bar -print "---------" +#print "---------" def foo : ℕ → io unit | 0 := put_str "at zero\n" | (n+1) := do put_str "in\n", foo n, put_str "out\n" -vm_eval foo 3 +#eval foo 3 -print "---------" +#print "---------" def foo2 : ℕ → io unit | 0 := put_str "at zero\n" | (n+1) := do put_str "in\n", foo2 n, put_str "out\n", put_str "out2\n" -vm_eval foo2 3 +#eval foo2 3 diff --git a/tests/lean/io_bug2.lean b/tests/lean/io_bug2.lean index 517a43b962..5c16f42239 100644 --- a/tests/lean/io_bug2.lean +++ b/tests/lean/io_bug2.lean @@ -6,4 +6,4 @@ def main : io unit := do (x, y) ← return ((1 : nat), (2 : ℕ)), put_ln "t2" -vm_eval main +#eval main diff --git a/tests/lean/key_eqv1.lean b/tests/lean/key_eqv1.lean index 141c05217d..f46d0607d3 100644 --- a/tests/lean/key_eqv1.lean +++ b/tests/lean/key_eqv1.lean @@ -1,4 +1,4 @@ add_key_equivalence add nat.add add_key_equivalence nat.add nat.succ add_key_equivalence mul nat.mul -print key_equivalences +#print key_equivalences diff --git a/tests/lean/let1.lean b/tests/lean/let1.lean index 0631cc8d08..cccbb7b45d 100644 --- a/tests/lean/let1.lean +++ b/tests/lean/let1.lean @@ -1,5 +1,5 @@ prelude -- Correct version -check let bool := Sort 0, +#check let bool := Sort 0, and (p q : bool) := ∀ c : bool, (p → q → c) → c, infixl `∧`:25 := and, and_intro (p q : bool) (H1 : p) (H2 : q) : p ∧ q @@ -10,9 +10,9 @@ check let bool := Sort 0, := H q (λ (H1 : p) (H2 : q), H2) in and_intro --- TODO(Leo): fix expected output as soon as elaborator starts checking let-expression type again +-- TODO(Leo): fix expected output as soon as elaborator starts #checking let-expression type again -check let bool := Sort 0, +#check let bool := Sort 0, and (p q : bool) := ∀ c : bool, (p → q → c) → c, infixl `∧`:25 := and, and_intro (p q : bool) (H1 : p) (H2 : q) : q ∧ p diff --git a/tests/lean/let3.lean b/tests/lean/let3.lean index 3a7890dbca..e9b61f3259 100644 --- a/tests/lean/let3.lean +++ b/tests/lean/let3.lean @@ -2,12 +2,12 @@ constant f : num → num → num → num -check +#check let a : num := 10 in f a 10 /- -check +#check let a := 10, b := 10 in f a b 10 diff --git a/tests/lean/let4.lean b/tests/lean/let4.lean index 893dc870df..22359ccef6 100644 --- a/tests/lean/let4.lean +++ b/tests/lean/let4.lean @@ -2,13 +2,13 @@ constant f : num → num → num → num -check +#check let a : num := 10, b : num := 10, c : num := 10 in f a b (f a 10 c) -check +#check let a : num := 10, b : num := let c : num := 10 in f a c (f a a (f 10 a c)), d : num := 10, diff --git a/tests/lean/let_elim_issue.lean b/tests/lean/let_elim_issue.lean index 003af8a151..6e002b5965 100644 --- a/tests/lean/let_elim_issue.lean +++ b/tests/lean/let_elim_issue.lean @@ -5,4 +5,4 @@ def tst : io unit := >> put_str "world\n" >> put_str "from Lean\n" -vm_eval tst +#eval tst diff --git a/tests/lean/list_monad1.lean b/tests/lean/list_monad1.lean index 47b708eb9b..96d961dccb 100644 --- a/tests/lean/list_monad1.lean +++ b/tests/lean/list_monad1.lean @@ -1,4 +1,4 @@ -vm_eval +#eval (do { a : nat ← [1, 2, 3, 4], b : nat ← [4, 5, 6], diff --git a/tests/lean/local_notation_bug2.lean b/tests/lean/local_notation_bug2.lean index 747dd72ad8..e356619108 100644 --- a/tests/lean/local_notation_bug2.lean +++ b/tests/lean/local_notation_bug2.lean @@ -4,4 +4,4 @@ parameters (b : ℕ) definition add_b (n : ℕ) := n + b local postfix `%%`:max := add_b end -eval 5%% -- Error, unexpected token +#reduce 5%% -- Error, unexpected token diff --git a/tests/lean/local_notation_bug2.lean.expected.out b/tests/lean/local_notation_bug2.lean.expected.out index 9f391fd1b3..5a41912d80 100644 --- a/tests/lean/local_notation_bug2.lean.expected.out +++ b/tests/lean/local_notation_bug2.lean.expected.out @@ -1 +1 @@ -local_notation_bug2.lean:7:6: error: invalid antiquotation, occurs outside of quoted expressions +local_notation_bug2.lean:7:9: error: invalid antiquotation, occurs outside of quoted expressions diff --git a/tests/lean/local_ref_bugs.lean b/tests/lean/local_ref_bugs.lean index fcd7a67147..73e2241650 100644 --- a/tests/lean/local_ref_bugs.lean +++ b/tests/lean/local_ref_bugs.lean @@ -3,10 +3,10 @@ set_option pp.all true section parameter α : Type inductive foo : Type | a : α → foo | b -check (foo.b : foo) +#check (foo.b : foo) open foo -check (foo.b : foo) -check (b : foo) +#check (foo.b : foo) +#check (b : foo) open tactic include α @@ -28,10 +28,10 @@ namespace bla section parameter α : Type inductive foo : Type | a : α → foo | b -check (foo.b : foo) +#check (foo.b : foo) open foo -check (foo.b : foo) -check (b : foo) +#check (foo.b : foo) +#check (b : foo) end end bla @@ -39,9 +39,9 @@ namespace boo section parameter α : Type inductive foo : Type | a : α → foo | b -check (foo.b : foo) +#check (foo.b : foo) open foo (b) -check (foo.b : foo) -check (b : foo) +#check (foo.b : foo) +#check (b : foo) end end boo diff --git a/tests/lean/meta_equation_pos.lean b/tests/lean/meta_equation_pos.lean index 9b1d7f2dd7..97c4937e19 100644 --- a/tests/lean/meta_equation_pos.lean +++ b/tests/lean/meta_equation_pos.lean @@ -1,4 +1,4 @@ meta def f (x : nat) : nat := tt -- type error should be reported here -check nat +#check nat diff --git a/tests/lean/minimize_errors.lean b/tests/lean/minimize_errors.lean index d32b313c2b..9d8674e514 100644 --- a/tests/lean/minimize_errors.lean +++ b/tests/lean/minimize_errors.lean @@ -1,16 +1,16 @@ def f : nat → nat → nat := λ a, a -check f +#check f def g : nat → nat → nat := f -check g +#check g -print g +#print g def h : nat → nat → nat | x y := g x y + f y x -print h +#print h diff --git a/tests/lean/mismatch.lean b/tests/lean/mismatch.lean index 9c18bf3502..0bd9d1e6ae 100644 --- a/tests/lean/mismatch.lean +++ b/tests/lean/mismatch.lean @@ -1,4 +1,4 @@ -- definition id {A : Type} {a : A} := a definition o : num := 1 -check @id nat o +#check @id nat o diff --git a/tests/lean/mismatch.lean.expected.out b/tests/lean/mismatch.lean.expected.out index 7e4bc68958..349706a249 100644 --- a/tests/lean/mismatch.lean.expected.out +++ b/tests/lean/mismatch.lean.expected.out @@ -1,4 +1,4 @@ -mismatch.lean:4:7: error: type mismatch at application +mismatch.lean:4:8: error: type mismatch at application id o term o diff --git a/tests/lean/missing_import.lean b/tests/lean/missing_import.lean index 86bdaa8163..7c0241359f 100644 --- a/tests/lean/missing_import.lean +++ b/tests/lean/missing_import.lean @@ -1,3 +1,3 @@ import does.not.exist data.bitvec -print bitvec +#print bitvec diff --git a/tests/lean/namespace_bug.lean b/tests/lean/namespace_bug.lean index 0ddb03c0fc..2209c4f480 100644 --- a/tests/lean/namespace_bug.lean +++ b/tests/lean/namespace_bug.lean @@ -1,5 +1,5 @@ namespace playground namespace nat -check 2+3 +#check 2+3 end nat end playground diff --git a/tests/lean/nary_overload.lean b/tests/lean/nary_overload.lean index 019f080007..01e0f0766f 100644 --- a/tests/lean/nary_overload.lean +++ b/tests/lean/nary_overload.lean @@ -13,9 +13,9 @@ notation `[` l:(foldr `, ` (h t, lst.cons h t) lst.nil `]`) := l constant A : Type variables a b c : A -check [a, b, c] -check ([a, b, c] : vec A) -check ([a, b, c] : lst A) +#check [a, b, c] +#check ([a, b, c] : vec A) +#check ([a, b, c] : lst A) set_option pp.all true -check ([a, b, c] : vec A) -check ([a, b, c] : lst A) +#check ([a, b, c] : vec A) +#check ([a, b, c] : lst A) diff --git a/tests/lean/nary_overload.lean.expected.out b/tests/lean/nary_overload.lean.expected.out index f8b3cd6dc2..fbb57b9dca 100644 --- a/tests/lean/nary_overload.lean.expected.out +++ b/tests/lean/nary_overload.lean.expected.out @@ -1,8 +1,8 @@ -nary_overload.lean:16:6: error: ambiguous overload, possible interpretations +nary_overload.lean:16:7: error: ambiguous overload, possible interpretations [a, b, c] [a, b, c] Additional information: -nary_overload.lean:16:6: context: switched to basic overload resolution where arguments are elaborated without any information about the expected type because expected type was not available +nary_overload.lean:16:7: context: switched to basic overload resolution where arguments are elaborated without any information about the expected type because expected type was not available sorry : ?M_1 [a, b, c] : vec A [a, b, c] : lst A diff --git a/tests/lean/nat_add_assoc_no_axioms.lean b/tests/lean/nat_add_assoc_no_axioms.lean index 51d9b97b98..1ea67e4f1b 100644 --- a/tests/lean/nat_add_assoc_no_axioms.lean +++ b/tests/lean/nat_add_assoc_no_axioms.lean @@ -1 +1 @@ -print axioms nat.add_assoc +#print axioms nat.add_assoc diff --git a/tests/lean/nat_pp.lean b/tests/lean/nat_pp.lean index 1f2e4f91b9..f7180002fa 100644 --- a/tests/lean/nat_pp.lean +++ b/tests/lean/nat_pp.lean @@ -1,4 +1,4 @@ -eval nat.add (nat.of_num 3) (nat.of_num 6) +#reduce nat.add (nat.of_num 3) (nat.of_num 6) open nat -eval nat.add (nat.of_num 3) (nat.of_num 6) -eval (3:nat) + 6 +#reduce nat.add (nat.of_num 3) (nat.of_num 6) +#reduce (3:nat) + 6 diff --git a/tests/lean/no_confusion_type.lean b/tests/lean/no_confusion_type.lean index 8ebeae044d..0591018f00 100644 --- a/tests/lean/no_confusion_type.lean +++ b/tests/lean/no_confusion_type.lean @@ -5,8 +5,8 @@ inductive vector (A : Type) : nat → Type | vnil : vector nat.zero | vcons : Π {n : nat}, A → vector n → vector (succ n) -check vector.no_confusion_type +#check vector.no_confusion_type constants a1 a2 : num constants v1 v2 : vector num 2 constant P : Type -eval vector.no_confusion_type P (vector.vcons a1 v1) (vector.vcons a2 v2) +#reduce vector.no_confusion_type P (vector.vcons a1 v1) (vector.vcons a2 v2) diff --git a/tests/lean/noncomputable_bytecode_issue.lean b/tests/lean/noncomputable_bytecode_issue.lean index bbaf6bb5aa..3f3dee54f1 100644 --- a/tests/lean/noncomputable_bytecode_issue.lean +++ b/tests/lean/noncomputable_bytecode_issue.lean @@ -5,4 +5,4 @@ return $ quote a open tactic -run_command ex >>= to_expr >> return () +run_cmd ex >>= to_expr >> return () diff --git a/tests/lean/notation.lean b/tests/lean/notation.lean index 97e3b56d5b..17d6e0a87d 100644 --- a/tests/lean/notation.lean +++ b/tests/lean/notation.lean @@ -1,18 +1,18 @@ -- open num constant b : num -check b + b + b -check true ∧ false ∧ true -check (true ∧ false) ∧ true -check (2:num) + (2 + 2) -check (2 + 2) + (2:num) -check (1:num) = (2 + 3)*2 -check (2:num) + 3 * 2 = 3 * 2 + 2 -check (true ∨ false) = (true ∨ false) ∧ true -check true ∧ (false ∨ true) +#check b + b + b +#check true ∧ false ∧ true +#check (true ∧ false) ∧ true +#check (2:num) + (2 + 2) +#check (2 + 2) + (2:num) +#check (1:num) = (2 + 3)*2 +#check (2:num) + 3 * 2 = 3 * 2 + 2 +#check (true ∨ false) = (true ∨ false) ∧ true +#check true ∧ (false ∨ true) constant A : Type constant a : A notation 1 := a -check a +#check a open nat -check ℕ → ℕ +#check ℕ → ℕ diff --git a/tests/lean/notation2.lean b/tests/lean/notation2.lean index ba057e6d8f..fe9ac423d8 100644 --- a/tests/lean/notation2.lean +++ b/tests/lean/notation2.lean @@ -1,5 +1,5 @@ -- inductive List (T : Type) : Type | nil {} : List | cons : T → List → List open List notation h :: t := cons h t notation `[` l:(foldr `,` (h t, cons h t) nil) `]` := l infixr `::` := cons -check (1:num) :: 2 :: nil -check (1:num) :: 2 :: 3 :: 4 :: 5 :: nil +#check (1:num) :: 2 :: nil +#check (1:num) :: 2 :: 3 :: 4 :: 5 :: nil diff --git a/tests/lean/notation3.lean b/tests/lean/notation3.lean index 2afb411fc4..ec50bc1525 100644 --- a/tests/lean/notation3.lean +++ b/tests/lean/notation3.lean @@ -2,7 +2,7 @@ inductive List (T : Type) : Type | nil {} : List | cons : T → List → List open List notation h :: t := cons h t notation `[` l:(foldr `, ` (h t, cons h t) nil) `]` := l open prod num constants a b : num -check [a, b, b] -check (a, true, a = b, b) -check (a, b) -check [(1:num), 2+2, 3] +#check [a, b, b] +#check (a, true, a = b, b) +#check (a, b) +#check [(1:num), 2+2, 3] diff --git a/tests/lean/notation4.lean b/tests/lean/notation4.lean index 8362f6a440..20c34ffc1f 100644 --- a/tests/lean/notation4.lean +++ b/tests/lean/notation4.lean @@ -1,7 +1,7 @@ -- open sigma inductive List (T : Type) : Type | nil {} : List | cons : T → List → List open List notation h :: t := cons h t notation `[` l:(foldr `,` (h t, cons h t) nil) `]` := l -check ∃ (A : Type) (x y : A), x = y -check ∃ (x : num), x = 0 -check Σ' (x : num), x = 10 -check Σ (A : Type), List A +#check ∃ (A : Type) (x y : A), x = y +#check ∃ (x : num), x = 0 +#check Σ' (x : num), x = 10 +#check Σ (A : Type), List A diff --git a/tests/lean/notation6.lean b/tests/lean/notation6.lean index 07b91d5743..e28228d866 100644 --- a/tests/lean/notation6.lean +++ b/tests/lean/notation6.lean @@ -1,9 +1,9 @@ -- open num notation `o` := (10:num) -check 11 +#check 11 constant f : num → num -check o + 1 -check f o + o + o -eval 9 + (1:num) -eval o+4 +#check o + 1 +#check f o + o + o +#reduce 9 + (1:num) +#reduce o+4 diff --git a/tests/lean/notation7.lean b/tests/lean/notation7.lean index 309bbde50c..95492fc603 100644 --- a/tests/lean/notation7.lean +++ b/tests/lean/notation7.lean @@ -6,8 +6,8 @@ constant g : num → num → num notation A `:+1`:100000 := f A -check g 0:+1:+1 (1:+1 + 2:+1):+1 +#check g 0:+1:+1 (1:+1 + 2:+1):+1 set_option pp.notation false -check g 0:+1:+1 (1:+1 + 2:+1):+1 +#check g 0:+1:+1 (1:+1 + 2:+1):+1 diff --git a/tests/lean/notation8.lean b/tests/lean/notation8.lean index 04a7152b62..35fece8715 100644 --- a/tests/lean/notation8.lean +++ b/tests/lean/notation8.lean @@ -1,5 +1,5 @@ constant f : nat → nat → nat constant g : nat → nat -check f (1 + g 1) $ g 2 + 2 -check f (g 1) $ f (1 + 1) $ g 2 +#check f (1 + g 1) $ g 2 + 2 +#check f (g 1) $ f (1 + 1) $ g 2 diff --git a/tests/lean/notation_error_pos.lean b/tests/lean/notation_error_pos.lean index 446d0c8852..9a1394b746 100644 --- a/tests/lean/notation_error_pos.lean +++ b/tests/lean/notation_error_pos.lean @@ -3,10 +3,10 @@ notation `bla` a := a + 1 notation `boo` a := 1 + a notation `cmd` a := λ x, x + a -check foo +#check foo -check bla "a" +#check bla "a" -check boo "a" +#check boo "a" -check cmd "b" +#check cmd "b" diff --git a/tests/lean/notation_error_pos.lean.expected.out b/tests/lean/notation_error_pos.lean.expected.out index 7df50b976d..899a1e590f 100644 --- a/tests/lean/notation_error_pos.lean.expected.out +++ b/tests/lean/notation_error_pos.lean.expected.out @@ -1,19 +1,19 @@ -notation_error_pos.lean:6:6: error: failed to synthesize type class instance for +notation_error_pos.lean:6:7: error: failed to synthesize type class instance for ⊢ has_one string -notation_error_pos.lean:6:6: error: failed to synthesize type class instance for +notation_error_pos.lean:6:7: error: failed to synthesize type class instance for ⊢ has_add string "a" + 1 : string -notation_error_pos.lean:8:6: error: failed to synthesize type class instance for +notation_error_pos.lean:8:7: error: failed to synthesize type class instance for ⊢ has_one string -notation_error_pos.lean:8:6: error: failed to synthesize type class instance for +notation_error_pos.lean:8:7: error: failed to synthesize type class instance for ⊢ has_add string "a" + 1 : string -notation_error_pos.lean:10:6: error: failed to synthesize type class instance for +notation_error_pos.lean:10:7: error: failed to synthesize type class instance for ⊢ has_one string -notation_error_pos.lean:10:6: error: failed to synthesize type class instance for +notation_error_pos.lean:10:7: error: failed to synthesize type class instance for ⊢ has_add string 1 + "a" : string -notation_error_pos.lean:12:6: error: failed to synthesize type class instance for +notation_error_pos.lean:12:7: error: failed to synthesize type class instance for x : string ⊢ has_add string λ (x : string), x + "b" : string → string diff --git a/tests/lean/num.lean b/tests/lean/num.lean index f3b8460075..33c2dddf0d 100644 --- a/tests/lean/num.lean +++ b/tests/lean/num.lean @@ -1,15 +1,15 @@ -- -check 10 -check 20 -check 3 -check 1 -check 0 -check 12 -check 13 -check 12138 -check 1221 -check 11 -check 5 -check 21 +#check 10 +#check 20 +#check 3 +#check 1 +#check 0 +#check 12 +#check 13 +#check 12138 +#check 1221 +#check 11 +#check 5 +#check 21 diff --git a/tests/lean/num2.lean b/tests/lean/num2.lean index c8cda7a059..4b4dcf4bfd 100644 --- a/tests/lean/num2.lean +++ b/tests/lean/num2.lean @@ -11,8 +11,8 @@ constant b : N notation 0 := z notation 1 := o -check 1 -check 0 +#check 1 +#check 0 constant G : Type constant gz : G @@ -20,6 +20,6 @@ constant a : G notation 0 := gz -check a = 0 -check (0:G) = a -check b = 0 +#check a = 0 +#check (0:G) = a +#check b = 0 diff --git a/tests/lean/num2.lean.expected.out b/tests/lean/num2.lean.expected.out index 14af4ed0ec..5b904ef1bb 100644 --- a/tests/lean/num2.lean.expected.out +++ b/tests/lean/num2.lean.expected.out @@ -1,9 +1,9 @@ o : N z : N eq a gz : Prop -num2.lean:24:7: error: failed to synthesize type class instance for +num2.lean:24:8: error: failed to synthesize type class instance for ⊢ has_zero G -num2.lean:24:7: error: invalid type ascription, expression has type +num2.lean:24:8: error: invalid type ascription, expression has type N but is expected to have type G diff --git a/tests/lean/num3.lean b/tests/lean/num3.lean index 38812beb18..d529cb3d0b 100644 --- a/tests/lean/num3.lean +++ b/tests/lean/num3.lean @@ -10,6 +10,6 @@ constant a : N notation 0 := z notation 1 := o -check a = 0 -check 2 = (1:num) -check (2:num) = 1 +#check a = 0 +#check 2 = (1:num) +#check (2:num) = 1 diff --git a/tests/lean/num3.lean.expected.out b/tests/lean/num3.lean.expected.out index 449f5932cc..123d76c69c 100644 --- a/tests/lean/num3.lean.expected.out +++ b/tests/lean/num3.lean.expected.out @@ -1,5 +1,5 @@ @eq N a z : Prop -num3.lean:14:11: error: invalid type ascription, expression has type +num3.lean:14:12: error: invalid type ascription, expression has type N but is expected to have type num diff --git a/tests/lean/num4.lean b/tests/lean/num4.lean index f10cf0fc77..3fa73701cc 100644 --- a/tests/lean/num4.lean +++ b/tests/lean/num4.lean @@ -10,11 +10,11 @@ namespace foo notation 0 := z notation 1 := o - check a = 0 + #check a = 0 end foo -check (2:nat) = 1 -check foo.a = 1 +#check (2:nat) = 1 +#check foo.a = 1 open foo -check a = 1 +#check a = 1 diff --git a/tests/lean/num5.lean b/tests/lean/num5.lean index ee1d7226c2..a51e35a3d0 100644 --- a/tests/lean/num5.lean +++ b/tests/lean/num5.lean @@ -1,7 +1,7 @@ -- open num -eval 3+(2:num) -eval 3+2*(5:num) -eval 5*(5:num) -eval (eq.rec (eq.refl (2:num)) (eq.refl (2:num)) : 2 = (2:num)) +#reduce 3+(2:num) +#reduce 3+2*(5:num) +#reduce 5*(5:num) +#reduce (eq.rec (eq.refl (2:num)) (eq.refl (2:num)) : 2 = (2:num)) diff --git a/tests/lean/offset_is_def_eq_trick.lean b/tests/lean/offset_is_def_eq_trick.lean index 14e1732b0f..2be963cf29 100644 --- a/tests/lean/offset_is_def_eq_trick.lean +++ b/tests/lean/offset_is_def_eq_trick.lean @@ -8,4 +8,4 @@ inductive Vec (α : Type u) : nat → Type u def head {α} : Π {n}, Vec α (n+1) → α | n (Vec.cons h t) := h -check @head.equations._eqn_1 +#check @head.equations._eqn_1 diff --git a/tests/lean/omit.lean b/tests/lean/omit.lean index 913a64ffd2..3e2e25393c 100644 --- a/tests/lean/omit.lean +++ b/tests/lean/omit.lean @@ -18,5 +18,5 @@ prelude section | mk : tst end -check foo -check tst +#check foo +#check tst diff --git a/tests/lean/open_namespaces.lean b/tests/lean/open_namespaces.lean index aebd818513..b62b2f6fb4 100644 --- a/tests/lean/open_namespaces.lean +++ b/tests/lean/open_namespaces.lean @@ -1,5 +1,5 @@ open nat namespace foo open int -run_command tactic.open_namespaces >>= tactic.trace +run_cmd tactic.open_namespaces >>= tactic.trace end foo diff --git a/tests/lean/over_notation.lean b/tests/lean/over_notation.lean index 9bba96e9d7..1294e2b569 100644 --- a/tests/lean/over_notation.lean +++ b/tests/lean/over_notation.lean @@ -6,12 +6,12 @@ infix ` & `:60 := g set_option pp.notation false -check 0 & 1 -check "a" & "b" -check tt & ff +#check 0 & 1 +#check "a" & "b" +#check tt & ff notation `[[`:max l:(foldr `, ` (h t, f h t) 0 `]]`:0) := l notation `[[`:max l:(foldr `, ` (h t, g h t) "" `]]`:0) := l -check [[ (1:nat), 2, 3 ]] -check [[ "a", "b", "c" ]] +#check [[ (1:nat), 2, 3 ]] +#check [[ "a", "b", "c" ]] diff --git a/tests/lean/over_notation.lean.expected.out b/tests/lean/over_notation.lean.expected.out index 4b36046c1b..3740678f46 100644 --- a/tests/lean/over_notation.lean.expected.out +++ b/tests/lean/over_notation.lean.expected.out @@ -1,6 +1,6 @@ f 0 1 : nat g "a" "b" : string -over_notation.lean:11:9: error: none of the overloads are applicable +over_notation.lean:11:10: error: none of the overloads are applicable error for g type mismatch at application g tt @@ -21,7 +21,7 @@ has type but is expected to have type nat Additional information: -over_notation.lean:11:9: context: switched to basic overload resolution where arguments are elaborated without any information about the expected type because expected type was not available +over_notation.lean:11:10: context: switched to basic overload resolution where arguments are elaborated without any information about the expected type because expected type was not available sorry : ?M_1 f 1 (f 2 (f 3 0)) : nat g "a" (g "b" (g "c" "")) : string diff --git a/tests/lean/param_binder_update.lean b/tests/lean/param_binder_update.lean index bc58d874d8..7f7ebec4ab 100644 --- a/tests/lean/param_binder_update.lean +++ b/tests/lean/param_binder_update.lean @@ -10,8 +10,8 @@ section definition id₂ (a : A) := a end -check @id -check @id₂ +#check @id +#check @id₂ section parameters {A : Type*} {B : Type*} @@ -30,16 +30,16 @@ section definition foo4 (a : A) (b : B) := a - check @foo1 - check @foo2 - check @foo3 - check @foo4 + #check @foo1 + #check @foo2 + #check @foo3 + #check @foo4 end -check @foo1 -check @foo2 -check @foo3 -check @foo4 +#check @foo1 +#check @foo2 +#check @foo3 +#check @foo4 section variables {A : Type*} {B : Type*} @@ -58,10 +58,10 @@ section definition boo4 (a : A) (b : B) := a - check @boo1 - check @boo2 - check @boo3 - check @boo4 + #check @boo1 + #check @boo2 + #check @boo3 + #check @boo4 end section diff --git a/tests/lean/param_binder_update2.lean b/tests/lean/param_binder_update2.lean index 2ed26cc919..cb415a5623 100644 --- a/tests/lean/param_binder_update2.lean +++ b/tests/lean/param_binder_update2.lean @@ -17,7 +17,7 @@ section end -check @foo1 -check @foo2 -check @foo3 -check @foo4 +#check @foo1 +#check @foo2 +#check @foo3 +#check @foo4 diff --git a/tests/lean/parsing_only.lean b/tests/lean/parsing_only.lean index c5b1392ac0..574a04aaf8 100644 --- a/tests/lean/parsing_only.lean +++ b/tests/lean/parsing_only.lean @@ -4,6 +4,6 @@ constant f : num → num constant g : num → num notation a `+++` := f a notation [parsing_only] a `***` := g a -check 10 +++ -check 10 *** -check Type.{8} -- Type₊ should not be used +#check 10 +++ +#check 10 *** +#check Type.{8} -- Type₊ should not be used diff --git a/tests/lean/pp.lean b/tests/lean/pp.lean index 957952858e..6090f21b6f 100644 --- a/tests/lean/pp.lean +++ b/tests/lean/pp.lean @@ -1,7 +1,7 @@ -prelude set_option pp.beta false check λ {A : Type} (B : Type) (a : A) (b : B), a -check λ {A : Type} {B : Type} (a : A) (b : B), a -check λ (A : Type) {B : Type} (a : A) (b : B), a -check λ (A : Type) (B : Type) (a : A) (b : B), a -check λ [A : Type] (B : Type) (a : A) (b : B), a -check λ {{A : Type}} {B : Type} (a : A) (b : B), a -check λ {{A : Type}} {{B : Type}} (a : A) (b : B), a +prelude set_option pp.beta false #check λ {A : Type} (B : Type) (a : A) (b : B), a +#check λ {A : Type} {B : Type} (a : A) (b : B), a +#check λ (A : Type) {B : Type} (a : A) (b : B), a +#check λ (A : Type) (B : Type) (a : A) (b : B), a +#check λ [A : Type] (B : Type) (a : A) (b : B), a +#check λ {{A : Type}} {B : Type} (a : A) (b : B), a +#check λ {{A : Type}} {{B : Type}} (a : A) (b : B), a diff --git a/tests/lean/pp_all.lean b/tests/lean/pp_all.lean index 1848a1c324..a5802b291f 100644 --- a/tests/lean/pp_all.lean +++ b/tests/lean/pp_all.lean @@ -5,6 +5,6 @@ variables {a : nat} definition b : num := 2 -check (λ x, x) a + of_num b = 10 +#check (λ x, x) a + of_num b = 10 set_option pp.all true -check (λ x, x) a + of_num b = 10 +#check (λ x, x) a + of_num b = 10 diff --git a/tests/lean/pp_all2.lean b/tests/lean/pp_all2.lean index 9f991d039d..ecf0ae3f5a 100644 --- a/tests/lean/pp_all2.lean +++ b/tests/lean/pp_all2.lean @@ -4,4 +4,4 @@ set_option pp.all true set_option pp.numerals true set_option pp.universes false -check (10 : nat) + (3 : nat) +#check (10 : nat) + (3 : nat) diff --git a/tests/lean/pp_beta.lean b/tests/lean/pp_beta.lean index a53fed304d..5103fdaae9 100644 --- a/tests/lean/pp_beta.lean +++ b/tests/lean/pp_beta.lean @@ -1,7 +1,7 @@ open nat -check (λ x : nat, x) 1 +#check (λ x : nat, x) 1 set_option pp.beta true -check (λ x : nat, x) 1 +#check (λ x : nat, x) 1 diff --git a/tests/lean/pp_binder_types.lean b/tests/lean/pp_binder_types.lean index e2c158acc0..de30333318 100644 --- a/tests/lean/pp_binder_types.lean +++ b/tests/lean/pp_binder_types.lean @@ -1,7 +1,7 @@ open nat definition f (n : nat) (H : n = n) := λm, id (n + m) -print f +#print f set_option pp.binder_types true -print f +#print f diff --git a/tests/lean/pp_bug.lean b/tests/lean/pp_bug.lean index 2035686477..552d59e174 100644 --- a/tests/lean/pp_bug.lean +++ b/tests/lean/pp_bug.lean @@ -1,11 +1,11 @@ variables p q : Prop -check ¬(p → q) -check ¬p → q -check (¬p) → q -check ¬(p → q) -check p ↔ q -check ¬(p ↔ q) -check ¬p ↔ q -check (¬p) ↔ q -check (p → q) ↔ q -check p → (q ↔ q) +#check ¬(p → q) +#check ¬p → q +#check (¬p) → q +#check ¬(p → q) +#check p ↔ q +#check ¬(p ↔ q) +#check ¬p ↔ q +#check (¬p) ↔ q +#check (p → q) ↔ q +#check p → (q ↔ q) diff --git a/tests/lean/pp_char_bug.lean b/tests/lean/pp_char_bug.lean index c3cddd6935..ba1b002f3f 100644 --- a/tests/lean/pp_char_bug.lean +++ b/tests/lean/pp_char_bug.lean @@ -1,20 +1,20 @@ -check (fin.mk 2 dec_trivial : fin 5) -check (fin.mk 1 dec_trivial : fin 3) -check #"a" -check to_string #"a" -vm_eval to_string #"a" -vm_eval #"a" +#check (fin.mk 2 dec_trivial : fin 5) +#check (fin.mk 1 dec_trivial : fin 3) +#check #"a" +#check to_string #"a" +#eval to_string #"a" +#eval #"a" -vm_eval char.of_nat 1 -vm_eval char.of_nat 1 -vm_eval char.of_nat 20 +#eval char.of_nat 1 +#eval char.of_nat 1 +#eval char.of_nat 20 -check char.of_nat 1 -check char.of_nat 20 -check char.of_nat 15 -check char.of_nat 16 -vm_eval char.of_nat 15 -vm_eval char.of_nat 16 +#check char.of_nat 1 +#check char.of_nat 20 +#check char.of_nat 15 +#check char.of_nat 16 +#eval char.of_nat 15 +#eval char.of_nat 16 example : char.of_nat 1 = #"\x01" := rfl diff --git a/tests/lean/pp_no_proofs.lean b/tests/lean/pp_no_proofs.lean index 8eb0fefa70..8899794a56 100644 --- a/tests/lean/pp_no_proofs.lean +++ b/tests/lean/pp_no_proofs.lean @@ -7,10 +7,10 @@ constants (P : ∀ {t:true}, ℕ → Prop) (P0 : @P trivial 0) noncomputable definition messy := f (Ps (Ps (Ps (Ps (Ps (Ps P0)))))) -eval messy +#reduce messy set_option pp.proofs false -eval messy +#reduce messy set_option pp.implicit true -eval messy +#reduce messy set_option pp.proofs true -eval messy +#reduce messy diff --git a/tests/lean/pp_param_bug.lean b/tests/lean/pp_param_bug.lean index f6ee56bf31..4e93e9bfad 100644 --- a/tests/lean/pp_param_bug.lean +++ b/tests/lean/pp_param_bug.lean @@ -3,5 +3,5 @@ section definition foo3 (a : A) (b : B) := a - check foo3 + #check foo3 end diff --git a/tests/lean/pp_struct.lean b/tests/lean/pp_struct.lean index c6ddd0d5c7..14ea0caae3 100644 --- a/tests/lean/pp_struct.lean +++ b/tests/lean/pp_struct.lean @@ -1,31 +1,31 @@ structure foo := (x : nat) (y : nat) (z : bool) -check let s := {foo . x := let v1 := 10 + 10 + 20 + 30 + 40 + 10 + 20 + 30 + 40 + 50 + 10 + 10, v2 := 10 + 10 + 10 + 10 + 10 + 10 + 10 + 10 + 10 + 10 + 20, v3 := 10 + 10 + 10 + 10 + 10 + 10 + 10 + 10 + 10 + 10 + 20, v4 := 10 + 10 + 10 + 10 + 10 + 10 + 10 + 10 + 10 + 10 + 20 in v1 + v2 + v3 + v4, y := 20, z := tt} in s^.x + s^.y +#check let s := {foo . x := let v1 := 10 + 10 + 20 + 30 + 40 + 10 + 20 + 30 + 40 + 50 + 10 + 10, v2 := 10 + 10 + 10 + 10 + 10 + 10 + 10 + 10 + 10 + 10 + 20, v3 := 10 + 10 + 10 + 10 + 10 + 10 + 10 + 10 + 10 + 10 + 20, v4 := 10 + 10 + 10 + 10 + 10 + 10 + 10 + 10 + 10 + 10 + 20 in v1 + v2 + v3 + v4, y := 20, z := tt} in s^.x + s^.y set_option pp.structure_instances_qualifier true -check let s := {foo . x := let v1 := 10 + 10 + 20 + 30 + 40 + 10 + 20 + 30 + 40 + 50 + 10 + 10, v2 := 10 + 10 + 10 + 10 + 10 + 10 + 10 + 10 + 10 + 10 + 20, v3 := 10 + 10 + 10 + 10 + 10 + 10 + 10 + 10 + 10 + 10 + 20, v4 := 10 + 10 + 10 + 10 + 10 + 10 + 10 + 10 + 10 + 10 + 20 in v1 + v2 + v3 + v4, y := 20, z := tt} in s^.x + s^.y +#check let s := {foo . x := let v1 := 10 + 10 + 20 + 30 + 40 + 10 + 20 + 30 + 40 + 50 + 10 + 10, v2 := 10 + 10 + 10 + 10 + 10 + 10 + 10 + 10 + 10 + 10 + 20, v3 := 10 + 10 + 10 + 10 + 10 + 10 + 10 + 10 + 10 + 10 + 20, v4 := 10 + 10 + 10 + 10 + 10 + 10 + 10 + 10 + 10 + 10 + 20 in v1 + v2 + v3 + v4, y := 20, z := tt} in s^.x + s^.y set_option pp.structure_instances false -check {foo . x := 10, y := 20, z := ff} +#check {foo . x := 10, y := 20, z := ff} set_option pp.structure_instances true -check {foo . x := 10, y := 20, z := ff} +#check {foo . x := 10, y := 20, z := ff} set_option pp.structure_instances_qualifier false -check {foo . x := 10, y := 20, z := ff} +#check {foo . x := 10, y := 20, z := ff} -check {foo . x := 10, y := 20, z := ff}^.x +#check {foo . x := 10, y := 20, z := ff}^.x -check (1, 2).1 +#check (1, 2).1 constant boo : nat → nat → nat × nat -check (boo 1 1)^.fst +#check (boo 1 1)^.fst structure F := (fn : nat → nat → nat) @@ -33,4 +33,4 @@ structure F := constant h : nat → F -check (h 0)^.fn 10 20 +#check (h 0)^.fn 10 20 diff --git a/tests/lean/pp_zero_bug.lean b/tests/lean/pp_zero_bug.lean index fe3889b46f..66ecd1b97e 100644 --- a/tests/lean/pp_zero_bug.lean +++ b/tests/lean/pp_zero_bug.lean @@ -1,2 +1,2 @@ -check @zero -check @zero nat +#check @zero +#check @zero nat diff --git a/tests/lean/ppbug.lean b/tests/lean/ppbug.lean index c768e8dffd..2d05286aff 100644 --- a/tests/lean/ppbug.lean +++ b/tests/lean/ppbug.lean @@ -1 +1 @@ -check list.rec_on +#check list.rec_on diff --git a/tests/lean/print_ax1.lean b/tests/lean/print_ax1.lean index ed0c9f99cd..afcff2fe6a 100644 --- a/tests/lean/print_ax1.lean +++ b/tests/lean/print_ax1.lean @@ -1,2 +1,2 @@ open subtype -print axioms +#print axioms diff --git a/tests/lean/print_ax2.lean.expected.out b/tests/lean/print_ax2.lean.expected.out index aa283b6d5d..85a3793d7f 100644 --- a/tests/lean/print_ax2.lean.expected.out +++ b/tests/lean/print_ax2.lean.expected.out @@ -1,3 +1,2 @@ -quot.sound : ∀ {α : Sort u} {r : α → α → Prop} {a b : α}, r a b → quot.mk r a = quot.mk r b -classical.choice : Π {α : Sort u}, nonempty α → α -propext : ∀ {a b : Prop}, (a ↔ b) → a = b +print_ax2.lean:1:13: error: invalid namespace name 'print' +print_ax2.lean:1:25: error: invalid variables/constants/axioms declaration, ':' expected diff --git a/tests/lean/print_ax3.lean b/tests/lean/print_ax3.lean index 1c36701678..5558ed190b 100644 --- a/tests/lean/print_ax3.lean +++ b/tests/lean/print_ax3.lean @@ -13,10 +13,10 @@ eq.trans foo2 foo1 lemma foo5 : true = false := propext sorry -print axioms foo4 -print "------" -print axioms -print "------" -print foo3 -print "------" -print axioms foo5 +#print axioms foo4 +#print "------" +#print axioms +#print "------" +#print foo3 +#print "------" +#print axioms foo5 diff --git a/tests/lean/print_meta.lean b/tests/lean/print_meta.lean index 92473074ad..9fda7678f5 100644 --- a/tests/lean/print_meta.lean +++ b/tests/lean/print_meta.lean @@ -1 +1 @@ -print tactic.intro +#print tactic.intro diff --git a/tests/lean/print_reducible.lean b/tests/lean/print_reducible.lean index 06f1defc3c..f8fcad7c99 100644 --- a/tests/lean/print_reducible.lean +++ b/tests/lean/print_reducible.lean @@ -14,6 +14,6 @@ attribute [reducible] definition pr {A B : Type} (a : A) (b : B) := a definition pr2 {A B : Type} (a : A) (b : B) := a -print [reducible] -print "-----------" -print [irreducible] +#print [reducible] +#print "-----------" +#print [irreducible] diff --git a/tests/lean/private_structure.lean b/tests/lean/private_structure.lean index 8dad57fe8c..59a588ff51 100644 --- a/tests/lean/private_structure.lean +++ b/tests/lean/private_structure.lean @@ -4,15 +4,15 @@ private structure point := definition bla := point definition mk : bla := point.mk 10 10 -check bla -check point -check point.mk -check point.rec -check point.rec_on -check point.cases_on -check point.induction_on -check point.x -check point.y +#check bla +#check point +#check point.mk +#check point.rec +#check point.rec_on +#check point.cases_on +#check point.induction_on +#check point.x +#check point.y end foo @@ -20,19 +20,19 @@ open foo -- point is not visible anymore -check bla -check point -check point.mk -check point.rec -check point.rec_on -check point.cases_on -check point.induction_on -check point.no_confusion -check point.x -check point.y +#check bla +#check point +#check point.mk +#check point.rec +#check point.rec_on +#check point.cases_on +#check point.induction_on +#check point.no_confusion +#check point.x +#check point.y set_option pp.all true -print bla +#print bla -check (⟨1, 2⟩ : bla) -check mk +#check (⟨1, 2⟩ : bla) +#check mk diff --git a/tests/lean/private_structure.lean.expected.out b/tests/lean/private_structure.lean.expected.out index db51121f10..f6119ca8fa 100644 --- a/tests/lean/private_structure.lean.expected.out +++ b/tests/lean/private_structure.lean.expected.out @@ -8,17 +8,17 @@ point.induction_on : ∀ (n : point), (∀ (x y : ℕ), ?M_1 {x := x, y := y}) point.x : point → ℕ point.y : point → ℕ bla : Type -private_structure.lean:24:6: error: unknown identifier 'point' -private_structure.lean:25:6: error: unknown identifier 'point.mk' -private_structure.lean:26:6: error: unknown identifier 'point.rec' -private_structure.lean:27:6: error: unknown identifier 'point.rec_on' -private_structure.lean:28:6: error: unknown identifier 'point.cases_on' -private_structure.lean:29:6: error: unknown identifier 'point.induction_on' -private_structure.lean:30:6: error: unknown identifier 'point.no_confusion' -private_structure.lean:31:6: error: unknown identifier 'point.x' -private_structure.lean:32:6: error: unknown identifier 'point.y' +private_structure.lean:24:7: error: unknown identifier 'point' +private_structure.lean:25:7: error: unknown identifier 'point.mk' +private_structure.lean:26:7: error: unknown identifier 'point.rec' +private_structure.lean:27:7: error: unknown identifier 'point.rec_on' +private_structure.lean:28:7: error: unknown identifier 'point.cases_on' +private_structure.lean:29:7: error: unknown identifier 'point.induction_on' +private_structure.lean:30:7: error: unknown identifier 'point.no_confusion' +private_structure.lean:31:7: error: unknown identifier 'point.x' +private_structure.lean:32:7: error: unknown identifier 'point.y' def foo.bla : Type := point -private_structure.lean:37:7: error: invalid constructor ⟨...⟩, type is a private inductive datatype +private_structure.lean:37:8: error: invalid constructor ⟨...⟩, type is a private inductive datatype sorry : foo.bla foo.mk : foo.bla diff --git a/tests/lean/prodtst.lean b/tests/lean/prodtst.lean index 7adf7e0c11..77ea839595 100644 --- a/tests/lean/prodtst.lean +++ b/tests/lean/prodtst.lean @@ -4,4 +4,4 @@ inductive prod2 (A B : Type.{_+1}) | mk : A → B → prod2 set_option pp.universes true -check @prod2 +#check @prod2 diff --git a/tests/lean/proj_notation.lean b/tests/lean/proj_notation.lean index 47a8ca70f9..fd58096f50 100644 --- a/tests/lean/proj_notation.lean +++ b/tests/lean/proj_notation.lean @@ -4,18 +4,18 @@ structure myprod (A B : Type) := variable p : myprod nat nat variable f : nat → nat -check p↣fst -check p↣1 -check p↣2 -check p↣snd +#check p↣fst +#check p↣1 +#check p↣2 +#check p↣snd -check p~>fst -check p~>1 -check p~>2 -check p~>snd +#check p~>fst +#check p~>1 +#check p~>2 +#check p~>snd -check f p↣1 -check p↣1 + p↣2 +#check f p↣1 +#check p↣1 + p↣2 example (A B : Type) : A × B → B × A := λ h, ⟨h↣2, h↣1⟩ @@ -29,16 +29,16 @@ structure position (A B : Type) := structure car := (pos : position nat nat) (cheap : bool) -check λ c : car, c↣pos↣x +#check λ c : car, c↣pos↣x -check λ c : car, c↣fst +#check λ c : car, c↣fst -check λ c : car, c↣0 +#check λ c : car, c↣0 -check λ c : car, c↣3 +#check λ c : car, c↣3 -check λ n : nat, n↣1 +#check λ n : nat, n↣1 -check p.1 -check p.2 -check λ c : car, c.1.2 +#check p.1 +#check p.2 +#check λ c : car, c.1.2 diff --git a/tests/lean/proj_notation.lean.expected.out b/tests/lean/proj_notation.lean.expected.out index 4a871698f8..7c97968841 100644 --- a/tests/lean/proj_notation.lean.expected.out +++ b/tests/lean/proj_notation.lean.expected.out @@ -9,18 +9,18 @@ p^.snd : ℕ f (p^.fst) : ℕ p^.fst + p^.snd : ℕ λ (c : car), (c^.pos)^.x : car → ℕ -proj_notation.lean:34:18: error: invalid '^.' notation, 'fst' is not a valid "field" because environment does not contain 'car.fst' +proj_notation.lean:34:19: error: invalid '^.' notation, 'fst' is not a valid "field" because environment does not contain 'car.fst' c which has type car λ (c : car), sorry : Π (c : car), delayed[?M_1] -proj_notation.lean:36:19: error: invalid projection, index must be greater than 0 -proj_notation.lean:38:18: error: invalid projection, structure has only 2 field(s) +proj_notation.lean:36:20: error: invalid projection, index must be greater than 0 +proj_notation.lean:38:19: error: invalid projection, structure has only 2 field(s) c which has type car λ (c : car), sorry : Π (c : car), delayed[?M_1] -proj_notation.lean:40:18: error: invalid projection, structure expected +proj_notation.lean:40:19: error: invalid projection, structure expected n has type ℕ diff --git a/tests/lean/protected.lean b/tests/lean/protected.lean index b255910308..21ecc13edd 100644 --- a/tests/lean/protected.lean +++ b/tests/lean/protected.lean @@ -6,5 +6,5 @@ namespace foo end foo open foo -check C -check D +#check C +#check D diff --git a/tests/lean/protected.lean.expected.out b/tests/lean/protected.lean.expected.out index ab504a802d..628b2f6ece 100644 --- a/tests/lean/protected.lean.expected.out +++ b/tests/lean/protected.lean.expected.out @@ -1,2 +1,2 @@ -protected.lean:9:6: error: unknown identifier 'C' +protected.lean:9:7: error: unknown identifier 'C' D : Prop diff --git a/tests/lean/protected_consts.lean b/tests/lean/protected_consts.lean index 61d8f00439..7735c8692e 100644 --- a/tests/lean/protected_consts.lean +++ b/tests/lean/protected_consts.lean @@ -10,27 +10,27 @@ namespace foo end foo open foo -check foo.A -check A -- error -check foo.a -check a -- error -check foo.A₁ -check foo.A₂ -check A₁ -- error -check A₂ -- error -check foo.a₁ -check foo.a₂ -check a₁ -- error -check a₂ -- error -check foo.B -check B -check foo.b -check b -check foo.b₁ -check foo.b₂ -check b₁ -check b₂ -check foo.B₁ -check foo.B₂ -check B₁ -check B₂ +#check foo.A +#check A -- error +#check foo.a +#check a -- error +#check foo.A₁ +#check foo.A₂ +#check A₁ -- error +#check A₂ -- error +#check foo.a₁ +#check foo.a₂ +#check a₁ -- error +#check a₂ -- error +#check foo.B +#check B +#check foo.b +#check b +#check foo.b₁ +#check foo.b₂ +#check b₁ +#check b₂ +#check foo.B₁ +#check foo.B₂ +#check B₁ +#check B₂ diff --git a/tests/lean/protected_consts.lean.expected.out b/tests/lean/protected_consts.lean.expected.out index 9a9a9ad8ea..08287b0600 100644 --- a/tests/lean/protected_consts.lean.expected.out +++ b/tests/lean/protected_consts.lean.expected.out @@ -1,15 +1,15 @@ foo.A : Prop -protected_consts.lean:14:6: error: unknown identifier 'A' +protected_consts.lean:14:7: error: unknown identifier 'A' foo.a : foo.A -protected_consts.lean:16:6: error: unknown identifier 'a' +protected_consts.lean:16:7: error: unknown identifier 'a' foo.A₁ : Prop foo.A₂ : Prop -protected_consts.lean:19:6: error: unknown identifier 'A₁' -protected_consts.lean:20:6: error: unknown identifier 'A₂' +protected_consts.lean:19:7: error: unknown identifier 'A₁' +protected_consts.lean:20:7: error: unknown identifier 'A₂' foo.a₁ : foo.A foo.a₂ : foo.A -protected_consts.lean:23:6: error: unknown identifier 'a₁' -protected_consts.lean:24:6: error: unknown identifier 'a₂' +protected_consts.lean:23:7: error: unknown identifier 'a₁' +protected_consts.lean:24:7: error: unknown identifier 'a₂' B : Prop B : Prop b : B diff --git a/tests/lean/protected_test.lean b/tests/lean/protected_test.lean index cf50ccde18..21d1fa7dfd 100644 --- a/tests/lean/protected_test.lean +++ b/tests/lean/protected_test.lean @@ -1,11 +1,11 @@ namespace nat - check induction_on -- ERROR - check rec_on -- ERROR - check nat.induction_on - check less_than_or_equal.rec_on -- OK - check nat.less_than_or_equal.rec_on + #check induction_on -- ERROR + #check rec_on -- ERROR + #check nat.induction_on + #check less_than_or_equal.rec_on -- OK + #check nat.less_than_or_equal.rec_on namespace le - check rec_on -- ERROR - check less_than_or_equal.rec_on + #check rec_on -- ERROR + #check less_than_or_equal.rec_on end le end nat diff --git a/tests/lean/protected_test.lean.expected.out b/tests/lean/protected_test.lean.expected.out index 88459e2aa0..3e8560dcee 100644 --- a/tests/lean/protected_test.lean.expected.out +++ b/tests/lean/protected_test.lean.expected.out @@ -1,5 +1,5 @@ -protected_test.lean:2:8: error: unknown identifier 'induction_on' -protected_test.lean:3:8: error: unknown identifier 'rec_on' +protected_test.lean:2:9: error: unknown identifier 'induction_on' +protected_test.lean:3:9: error: unknown identifier 'rec_on' nat.induction_on : ∀ (n : ℕ), ?M_1 0 → (∀ (a : ℕ), ?M_1 a → ?M_1 (succ a)) → ?M_1 n less_than_or_equal.rec_on : less_than_or_equal ?M_1 ?M_3 → @@ -7,7 +7,7 @@ less_than_or_equal.rec_on : less_than_or_equal.rec_on : less_than_or_equal ?M_1 ?M_3 → ?M_2 ?M_1 → (∀ {b : ℕ}, less_than_or_equal ?M_1 b → ?M_2 b → ?M_2 (succ b)) → ?M_2 ?M_3 -protected_test.lean:8:10: error: unknown identifier 'rec_on' +protected_test.lean:8:11: error: unknown identifier 'rec_on' less_than_or_equal.rec_on : less_than_or_equal ?M_1 ?M_3 → ?M_2 ?M_1 → (∀ {b : ℕ}, less_than_or_equal ?M_1 b → ?M_2 b → ?M_2 (succ b)) → ?M_2 ?M_3 diff --git a/tests/lean/quot_bug.lean b/tests/lean/quot_bug.lean index 5ee072047f..814c14dc45 100644 --- a/tests/lean/quot_bug.lean +++ b/tests/lean/quot_bug.lean @@ -3,7 +3,7 @@ variables {A : Type} {B : A → Type} variable f : Π a : A, B a -eval λ x, quot.lift_on ⟦f⟧ (λf : (Πx : A, B x), f) _ x +#reduce λ x, quot.lift_on ⟦f⟧ (λf : (Πx : A, B x), f) _ x example (x : A) : quot.lift_on ⟦f⟧ (λf : (Πx : A, B x), f) sorry x = f x := rfl diff --git a/tests/lean/quot_ind_bug.lean b/tests/lean/quot_ind_bug.lean index 2ccb4e2c4d..1f16f37522 100644 --- a/tests/lean/quot_ind_bug.lean +++ b/tests/lean/quot_ind_bug.lean @@ -1,6 +1,6 @@ open quotient variables {A : Type} [s : setoid A] {B : quotient s → Prop} (c : ∀ (a : A), B (quotient.mk a)) (a : A) -check (quotient.ind c ⟦a⟧ : B ⟦a⟧) -check c a -eval (quotient.ind c ⟦a⟧ : B ⟦a⟧) +#check (quotient.ind c ⟦a⟧ : B ⟦a⟧) +#check c a +#reduce (quotient.ind c ⟦a⟧ : B ⟦a⟧) diff --git a/tests/lean/record_rec_protected.lean b/tests/lean/record_rec_protected.lean index 9f97ae68d6..c741f3ae71 100644 --- a/tests/lean/record_rec_protected.lean +++ b/tests/lean/record_rec_protected.lean @@ -5,4 +5,4 @@ mk :: (x : A) (y : B) open point -check rec -- error, rec is protected +#check rec -- error, rec is protected diff --git a/tests/lean/record_rec_protected.lean.expected.out b/tests/lean/record_rec_protected.lean.expected.out index 891e8d3ec0..5ad63e0c1d 100644 --- a/tests/lean/record_rec_protected.lean.expected.out +++ b/tests/lean/record_rec_protected.lean.expected.out @@ -1 +1 @@ -record_rec_protected.lean:8:6: error: unknown identifier 'rec' +record_rec_protected.lean:8:7: error: unknown identifier 'rec' diff --git a/tests/lean/reserve_bugs.lean b/tests/lean/reserve_bugs.lean index 71ec5f59b9..b47d38a6f5 100644 --- a/tests/lean/reserve_bugs.lean +++ b/tests/lean/reserve_bugs.lean @@ -17,13 +17,13 @@ local infixr `&` := h set_option pp.notation false -check -(1:num) + 2 -check 1 & 2 & 3 & 4 -check (1:num) - 2 - 3 - 4 +#check -(1:num) + 2 +#check 1 & 2 & 3 & 4 +#check (1:num) - 2 - 3 - 4 infixr `~~`:60 := h infixl `!!`:60 := h -check 1 ~~ 2 ~~ 3 ~~ 4 -check 1 !! 2 !! 3 !! 4 -check 1 ~~ 2 + 3 ~~ 4 +#check 1 ~~ 2 ~~ 3 ~~ 4 +#check 1 !! 2 !! 3 !! 4 +#check 1 ~~ 2 + 3 ~~ 4 diff --git a/tests/lean/restrict_bug.lean b/tests/lean/restrict_bug.lean index 252a109db2..691a6af0c5 100644 --- a/tests/lean/restrict_bug.lean +++ b/tests/lean/restrict_bug.lean @@ -2,4 +2,4 @@ axiom all {A : Type}: list A → (A → Prop) → Prop variable {A : Type} variable {R : A → A → Prop} set_option pp.all true -check ∀ a l, all l (R a) +#check ∀ a l, all l (R a) diff --git a/tests/lean/right_assoc_dollar.lean b/tests/lean/right_assoc_dollar.lean index 8439ba1fb3..24d0ee547c 100644 --- a/tests/lean/right_assoc_dollar.lean +++ b/tests/lean/right_assoc_dollar.lean @@ -2,4 +2,4 @@ constant f : nat → nat → nat open nat -check f $ succ $ 10 + 20 +#check f $ succ $ 10 + 20 diff --git a/tests/lean/rquote.lean b/tests/lean/rquote.lean index f2cca2bf06..caa0dc41ed 100644 --- a/tests/lean/rquote.lean +++ b/tests/lean/rquote.lean @@ -11,25 +11,25 @@ end boo open foo boo -check ``f +#check ``f -check ``g +#check ``g open nat -check ``add +#check ``add -check ``gcd +#check ``gcd -check `f -check `foo.f +#check `f +#check `foo.f namespace bla section parameter A : Type definition ID : A → A := λ x, x - check ``ID + #check ``ID end end bla diff --git a/tests/lean/rquote.lean.expected.out b/tests/lean/rquote.lean.expected.out index d345b0f3f7..948ebe9b2c 100644 --- a/tests/lean/rquote.lean.expected.out +++ b/tests/lean/rquote.lean.expected.out @@ -1,7 +1,7 @@ -rquote.lean:14:6: error: invalid resolved quoted symbol, it is ambiguous, possible interpretations: boo.f foo.f (solution: use fully qualified names) +rquote.lean:14:7: error: invalid resolved quoted symbol, it is ambiguous, possible interpretations: boo.f foo.f (solution: use fully qualified names) name.mk_string "g" (name.mk_string "foo" name.anonymous) : name name.mk_string "add" name.anonymous : name name.mk_string "gcd" (name.mk_string "nat" name.anonymous) : name name.mk_string "f" name.anonymous : name name.mk_string "f" (name.mk_string "foo" name.anonymous) : name -rquote.lean:32:8: error: invalid quoted symbol, failed to resolve it (solution: use ` to bypass name resolution) +rquote.lean:32:9: error: invalid quoted symbol, failed to resolve it (solution: use ` to bypass name resolution) diff --git a/tests/lean/run/1302.lean b/tests/lean/run/1302.lean index 1d1a8ef0f9..a235a88bd8 100644 --- a/tests/lean/run/1302.lean +++ b/tests/lean/run/1302.lean @@ -1,5 +1,5 @@ open list fin -vm_eval map (λ i, true) [1] -vm_eval map (λ i, true) [1, 2, 3] -vm_eval map (λ (i : fin 2), true) [fin.mk 0 dec_trivial, fin.mk 1 dec_trivial] +#eval map (λ i, true) [1] +#eval map (λ i, true) [1, 2, 3] +#eval map (λ (i : fin 2), true) [fin.mk 0 dec_trivial, fin.mk 1 dec_trivial] diff --git a/tests/lean/run/1315b.lean b/tests/lean/run/1315b.lean index 52f8988eb3..f4cad702ab 100644 --- a/tests/lean/run/1315b.lean +++ b/tests/lean/run/1315b.lean @@ -52,7 +52,7 @@ do e ← to_expr p, guard (expr.alpha_eqv t e) meta def check_target (p : pexpr) : tactic unit := do t ← target, check_expr p t -run_command do +run_cmd do t ← to_expr `(test._match_2) >>= infer_type, trace t, check_expr `(nat → nat) t diff --git a/tests/lean/run/252.lean b/tests/lean/run/252.lean index 15a97609b5..1f2f140097 100644 --- a/tests/lean/run/252.lean +++ b/tests/lean/run/252.lean @@ -4,12 +4,12 @@ inductive tree (A : Type) | leaf : A → tree | node : tree → tree → tree -check tree.node +#check tree.node definition size {A : Type} (t : tree A) : nat := tree.rec (λ a, 1) (λ t₁ t₂ n₁ n₂, n₁ + n₂) t -check size +#check size -eval size (tree.node (tree.node (tree.leaf 0) (tree.leaf 1)) +#reduce size (tree.node (tree.node (tree.leaf 0) (tree.leaf 1)) (tree.leaf 0)) diff --git a/tests/lean/run/331.lean b/tests/lean/run/331.lean index 29cbe3824b..32004add7e 100644 --- a/tests/lean/run/331.lean +++ b/tests/lean/run/331.lean @@ -6,7 +6,7 @@ namespace nat end nat open nat -check less.rec_on +#check less.rec_on namespace foo1 protected definition foo2.bar : nat := 10 diff --git a/tests/lean/run/444.lean b/tests/lean/run/444.lean index a3a54fe7e3..e869075c28 100644 --- a/tests/lean/run/444.lean +++ b/tests/lean/run/444.lean @@ -1,4 +1,4 @@ open nat -check succ 1 +#check succ 1 notation 1 := unit -check succ 1 +#check succ 1 diff --git a/tests/lean/run/445.lean b/tests/lean/run/445.lean index 1e93c8e1e9..db4293a5a7 100644 --- a/tests/lean/run/445.lean +++ b/tests/lean/run/445.lean @@ -1,6 +1,6 @@ constants (A : Type) (a : A) constants (B : Type) (b₁ b₂ : B) (H : b₁ = b₂) -check a -check b₁ -check H +#check a +#check b₁ +#check H diff --git a/tests/lean/run/490.lean b/tests/lean/run/490.lean index 7d963f6d62..f09bf7c634 100644 --- a/tests/lean/run/490.lean +++ b/tests/lean/run/490.lean @@ -2,5 +2,5 @@ structure {u} foo : Type (u+2) := (elim : Type u → Type u) set_option pp.universes true -check foo.elim -check foo +#check foo.elim +#check foo diff --git a/tests/lean/run/600a.lean b/tests/lean/run/600a.lean index b01a921363..4b144ebec4 100644 --- a/tests/lean/run/600a.lean +++ b/tests/lean/run/600a.lean @@ -1,3 +1,3 @@ /- - -/ -print "ok" +#print "ok" diff --git a/tests/lean/run/600b.lean b/tests/lean/run/600b.lean index 5434688c2e..9900ec4596 100644 --- a/tests/lean/run/600b.lean +++ b/tests/lean/run/600b.lean @@ -1,3 +1,3 @@ /- --/ -print "ok" +#print "ok" diff --git a/tests/lean/run/600c.lean b/tests/lean/run/600c.lean index 4b5f618e3d..8c92f202b9 100644 --- a/tests/lean/run/600c.lean +++ b/tests/lean/run/600c.lean @@ -9,4 +9,4 @@ -/ ----/ -print "ok" +#print "ok" diff --git a/tests/lean/run/751.lean b/tests/lean/run/751.lean index 3e5fbe431a..bc01a67e39 100644 --- a/tests/lean/run/751.lean +++ b/tests/lean/run/751.lean @@ -1,4 +1,4 @@ -exit +#exit inductive foo (A : Type) := | intro : foo A → foo A with bar : Type := diff --git a/tests/lean/run/791.lean b/tests/lean/run/791.lean index c22c76e477..7607e49208 100644 --- a/tests/lean/run/791.lean +++ b/tests/lean/run/791.lean @@ -5,12 +5,12 @@ definition boo.bla.foo : nat := 20 open foo open boo.bla -eval bar -eval foo +#reduce bar +#reduce foo constant x.y.z : nat open x -check y.z +#check y.z open x.y -check z +#check z diff --git a/tests/lean/run/968.lean b/tests/lean/run/968.lean index 90572184ff..904daac779 100644 --- a/tests/lean/run/968.lean +++ b/tests/lean/run/968.lean @@ -2,14 +2,14 @@ variables (A : Type) [inhabited A] definition f (a : A) : A := a -check @f nat nat.inhabited +#check @f nat nat.inhabited structure foo := (a : A) -check @foo nat nat.inhabited +#check @foo nat nat.inhabited inductive bla | mk : A → bla -check @bla nat nat.inhabited +#check @bla nat nat.inhabited diff --git a/tests/lean/run/IO1.lean b/tests/lean/run/IO1.lean index 304a9aec6b..7bfa8029c5 100644 --- a/tests/lean/run/IO1.lean +++ b/tests/lean/run/IO1.lean @@ -11,36 +11,36 @@ definition main : io unit := -- vm_eval main -- set_option trace.compiler.code_gen true -vm_eval put_str "hello\n" +#eval put_str "hello\n" -print "************************" +#print "************************" definition aux (n : nat) : io unit := do put_str "========\nvalue: ", put n, put_str "\n========\n" -vm_eval aux 20 +#eval aux 20 -print "************************" +#print "************************" definition repeat : nat → (nat → io unit) → io unit | 0 a := return () | (n+1) a := do a n, repeat n a -vm_eval repeat 10 aux +#eval repeat 10 aux -print "************************" +#print "************************" definition execute : list (io unit) → io unit | [] := return () | (x::xs) := do x, execute xs -vm_eval repeat 10 (λ i, execute [aux i, put_str "hello\n"]) +#eval repeat 10 (λ i, execute [aux i, put_str "hello\n"]) -print "************************" +#print "************************" -vm_eval +#eval do n ← return 10, put_str "value: ", put n, @@ -48,4 +48,4 @@ vm_eval put (n+2), put_str "\n----------\n" -print "************************" +#print "************************" diff --git a/tests/lean/run/IO2.lean b/tests/lean/run/IO2.lean index 85cb20af4f..aa17fafb01 100644 --- a/tests/lean/run/IO2.lean +++ b/tests/lean/run/IO2.lean @@ -10,4 +10,4 @@ definition foreach {A : Type} {B : Type} : list A → (A → io B) → io punit | [] f := return punit.star | (x::xs) f := do f x, foreach xs f -vm_eval foreach [1,2,3,4,5] (λ i, do put_str "value: ", put i, put_str "\n") +#eval foreach [1,2,3,4,5] (λ i, do put_str "value: ", put i, put_str "\n") diff --git a/tests/lean/run/IO4.lean b/tests/lean/run/IO4.lean index 1d27a82822..3bec537e78 100644 --- a/tests/lean/run/IO4.lean +++ b/tests/lean/run/IO4.lean @@ -9,4 +9,4 @@ do { n ← return (10:nat), else put 2 } -vm_eval main +#eval main diff --git a/tests/lean/run/abstract_tac.lean b/tests/lean/run/abstract_tac.lean index f7e742bb3c..e27e704364 100644 --- a/tests/lean/run/abstract_tac.lean +++ b/tests/lean/run/abstract_tac.lean @@ -6,4 +6,4 @@ begin abstract { symmetry, assumption } end -print ex +#print ex diff --git a/tests/lean/run/anonymous_param.lean b/tests/lean/run/anonymous_param.lean index bc0061bdef..1873ab3a1d 100644 --- a/tests/lean/run/anonymous_param.lean +++ b/tests/lean/run/anonymous_param.lean @@ -1,7 +1,7 @@ -check λ _, nat -check λ (_ _ : nat), nat -check λ _ _ : nat, nat -check (λ _, 0 : nat → nat) +#check λ _, nat +#check λ (_ _ : nat), nat +#check λ _ _ : nat, nat +#check (λ _, 0 : nat → nat) def f (_ : nat) : nat := 0 diff --git a/tests/lean/run/apply3.lean b/tests/lean/run/apply3.lean index eb519fca6d..fc0a4a019b 100644 --- a/tests/lean/run/apply3.lean +++ b/tests/lean/run/apply3.lean @@ -1,6 +1,6 @@ open tactic -print "------- fapply version ----------" +#print "------- fapply version ----------" example (a : nat) : ∃ x : nat, x = a := by do @@ -11,7 +11,7 @@ by do a ← get_local `a, mk_app `eq.refl [a] >>= exact -print "------- apply version ----------" +#print "------- apply version ----------" example (a : nat) : ∃ x : nat, x = a := by do diff --git a/tests/lean/run/apply4.lean b/tests/lean/run/apply4.lean index 6a83d1caf7..a9e8e461d7 100644 --- a/tests/lean/run/apply4.lean +++ b/tests/lean/run/apply4.lean @@ -13,7 +13,7 @@ definition ex : inhabited (nat × nat × bool) := by apply_instance set_option pp.all true -print ex +#print ex set_option pp.all false @@ -29,7 +29,7 @@ by do trace_state, reflexivity -print "----------------" +#print "----------------" set_option pp.all true example (a b : nat) : a = 0 → a = b := diff --git a/tests/lean/run/array1.lean b/tests/lean/run/array1.lean index 34e4a1507b..b17d97a672 100644 --- a/tests/lean/run/array1.lean +++ b/tests/lean/run/array1.lean @@ -1,11 +1,11 @@ -check @array.mk +#check @array.mk -vm_eval mk_array 4 1 +#eval mk_array 4 1 def v : array nat 10 := @array.mk nat 10 (λ ⟨i, _⟩, i) -vm_eval array.map (+10) v +#eval array.map (+10) v def w : array nat 10 := (mk_array 9 1)^.push_back 3 @@ -13,14 +13,14 @@ def w : array nat 10 := def f : fin 10 → nat := array.cases_on w (λ f, f) -vm_eval f ⟨9, dec_trivial⟩ -vm_eval f ⟨2, dec_trivial⟩ +#eval f ⟨9, dec_trivial⟩ +#eval f ⟨2, dec_trivial⟩ -vm_eval (((mk_array 1 1)^.push_back 2)^.push_back 3)^.foldl 0 (+) +#eval (((mk_array 1 1)^.push_back 2)^.push_back 3)^.foldl 0 (+) def array_sum {n} (a : array nat n) : nat := a^.foldl 0 (+) -vm_eval array_sum (mk_array 10 1) +#eval array_sum (mk_array 10 1) -vm_eval (mk_array 10 1)^.data ⟨1, dec_trivial⟩ +#eval (mk_array 10 1)^.data ⟨1, dec_trivial⟩ diff --git a/tests/lean/run/array2.lean b/tests/lean/run/array2.lean index 96f581922d..ba8a73fdd4 100644 --- a/tests/lean/run/array2.lean +++ b/tests/lean/run/array2.lean @@ -1,4 +1,4 @@ -check @array.mk +#check @array.mk local infix ` << `:20 := array.push_back @@ -8,11 +8,11 @@ def test1 := v3 := (v2 << 5)^.write' 0 0 in (v1, v2, v3) -vm_eval test1 +#eval test1 def tst1 (n : nat) := let v1 := (mk_array n 1), v2 := array.map (λ v, v + 1) v1 in v2^.read' 1 -vm_eval tst1 10 +#eval tst1 10 diff --git a/tests/lean/run/as.lean b/tests/lean/run/as.lean index 9c204c9b40..5191a132db 100644 --- a/tests/lean/run/as.lean +++ b/tests/lean/run/as.lean @@ -4,17 +4,17 @@ namespace foo end foo open foo as bla (hiding pr1) -check bla.id +#check bla.id open foo as bla (renaming pr1→pr) -check bla.pr -print raw bla.id +#check bla.pr +#print raw bla.id open foo as boo (pr1) -check boo.pr1 +#check boo.pr1 open foo as boooo (renaming pr1→pr) (hiding id) -check boooo.pr +#check boooo.pr namespace foo namespace bla @@ -23,4 +23,4 @@ end bla end foo open foo.bla as bb -check bb.pr2 +#check bb.pr2 diff --git a/tests/lean/run/as_is_elab.lean b/tests/lean/run/as_is_elab.lean index 5b65f6f2bc..34b8de8451 100644 --- a/tests/lean/run/as_is_elab.lean +++ b/tests/lean/run/as_is_elab.lean @@ -2,9 +2,9 @@ open function variable x : list nat -check x^.map (+1) +#check x^.map (+1) -check x^.foldl (+) 0 +#check x^.foldl (+) 0 def f (l : list (nat × nat)) : list nat := l^.map (λ ⟨a, b⟩, a + b) diff --git a/tests/lean/run/assert_tac1.lean b/tests/lean/run/assert_tac1.lean index a1c110441e..991d4499b5 100644 --- a/tests/lean/run/assert_tac1.lean +++ b/tests/lean/run/assert_tac1.lean @@ -9,7 +9,7 @@ by do x ← get_local `x, mk_app `eq.refl [x] >>= exact -print tst1 +#print tst1 definition tst2 (a : nat) : a = a := by do @@ -24,7 +24,7 @@ by do y ← get_local `y, mk_app `eq.refl [y] >>= exact -print tst2 +#print tst2 definition tst3 (a : nat) : a = a := begin diff --git a/tests/lean/run/assert_tac3.lean b/tests/lean/run/assert_tac3.lean index 4d0207366c..622d9a949f 100644 --- a/tests/lean/run/assert_tac3.lean +++ b/tests/lean/run/assert_tac3.lean @@ -11,7 +11,7 @@ by do exact a, return () -print tst2 +#print tst2 definition tst3 (a b : nat) : a = a := by do diff --git a/tests/lean/run/at_at_bug.lean b/tests/lean/run/at_at_bug.lean index b9af3f9ea5..f27860ec1c 100644 --- a/tests/lean/run/at_at_bug.lean +++ b/tests/lean/run/at_at_bug.lean @@ -5,7 +5,7 @@ example (a b : nat) (p : nat → nat → Prop) (h₁ : p a b) (h₂ : a = b) : p set_option pp.all true variable my_has_add : has_add nat -check @@add my_has_add 0 1 +#check @@add my_has_add 0 1 local notation h1 `▸[` m `]` h2 := @@eq.subst m h1 h2 diff --git a/tests/lean/run/atomic2.lean b/tests/lean/run/atomic2.lean index e994136f21..dd0a96c4b0 100644 --- a/tests/lean/run/atomic2.lean +++ b/tests/lean/run/atomic2.lean @@ -1,3 +1,3 @@ notation `foo` := Type.{1} constant f : Type* → Type* -check foo → f foo → foo +#check foo → f foo → foo diff --git a/tests/lean/run/atomic_notation.lean b/tests/lean/run/atomic_notation.lean index d39fef1c64..61e25cd157 100644 --- a/tests/lean/run/atomic_notation.lean +++ b/tests/lean/run/atomic_notation.lean @@ -1,5 +1,5 @@ open num constant f : num → num notation `o`:1 := (10:num) -check o + 1 -check f o + o + o +#check o + 1 +#check f o + o + o diff --git a/tests/lean/run/auto_param.lean b/tests/lean/run/auto_param.lean index 4aa2a0861b..4c6f214dff 100644 --- a/tests/lean/run/auto_param.lean +++ b/tests/lean/run/auto_param.lean @@ -6,8 +6,8 @@ assumption <|> abstract (comp_val >> skip) <|> fail "my_tac failed to synthesize def f (x : nat) (h : auto_param (x > 0) `my_tac) : nat := nat.pred x -check f 12 -check f 13 +#check f 12 +#check f 13 lemma f_inj {x₁ x₂ : nat} {h₁ : x₁ > 0} {h₂ : x₂ > 0} : f x₁ = f x₂ → x₁ = x₂ := begin @@ -20,10 +20,10 @@ begin assumption end -check @f_inj +#check @f_inj lemma f_def {x : nat} (h : x > 0) : f x = nat.pred x := rfl -- The following is an error --- check λ x, f x +-- #check λ x, f x diff --git a/tests/lean/run/auto_param2.lean b/tests/lean/run/auto_param2.lean index 415002fe1e..18ae7393a1 100644 --- a/tests/lean/run/auto_param2.lean +++ b/tests/lean/run/auto_param2.lean @@ -6,8 +6,8 @@ assumption <|> abstract (comp_val >> skip) <|> fail "my_tac failed to synthesize def f (x : nat) (h : x > 0 . my_tac) : nat := nat.pred x -check f 12 -check f 13 +#check f 12 +#check f 13 lemma f_inj {x₁ x₂ : nat} {h₁ : x₁ > 0} {h₂ : x₂ > 0} : f x₁ = f x₂ → x₁ = x₂ := begin @@ -20,10 +20,10 @@ begin assumption end -check @f_inj +#check @f_inj lemma f_def {x : nat} (h : x > 0) : f x = nat.pred x := rfl -- The following is an error --- check λ x, f x +-- #check λ x, f x diff --git a/tests/lean/run/auto_param_in_structures.lean b/tests/lean/run/auto_param_in_structures.lean index cd36ca9ee9..18ad7c664c 100644 --- a/tests/lean/run/auto_param_in_structures.lean +++ b/tests/lean/run/auto_param_in_structures.lean @@ -12,8 +12,8 @@ monoid.mk add def m2 : monoid nat := monoid.mk mul -print m1 -print m2 +#print m1 +#print m2 def m3 : monoid nat := {op := add} @@ -21,7 +21,7 @@ def m3 : monoid nat := def m4 : monoid nat := {op := mul} -print m3 -print m4 +#print m3 +#print m4 end test diff --git a/tests/lean/run/basic.lean b/tests/lean/run/basic.lean index 63c25112ae..3bb228e2e5 100644 --- a/tests/lean/run/basic.lean +++ b/tests/lean/run/basic.lean @@ -1,26 +1,26 @@ prelude constant {l1 l2} A : Type l1 → Type l2 -check A +#check A definition {l} tst (A : Type*) (B : Type*) (C : Type l) : Type* := A → B → C -check tst +#check tst constant {l} group : Type (l+1) constant {l} carrier : group.{l} → Type l noncomputable definition to_carrier (g : group) := carrier g -check to_carrier.{1} +#check to_carrier.{1} section variable A : Type* - check A + #check A definition B := A → A end constant N : Type 1 -check B N +#check B N constant f : B N -check f +#check f constant a : N -check f a +#check f a section variable T1 : Type* @@ -29,14 +29,14 @@ section definition double (a : T1) (b : T2) := f a (f a b) end -check double -check double.{1 2} +#check double +#check double.{1 2} definition Prop := Type 0 constant Eq : Π {A : Type*}, A → A → Prop infix `=`:50 := Eq -check Eq.{1} +#check Eq.{1} section universe variable l @@ -49,8 +49,8 @@ section noncomputable definition is_proj3 (f : T1 → T2 → T3 → T3) := ∀ x y z, f x y z = z end -check @is_proj2.{1} -check @is_proj3.{1 2} +#check @is_proj2.{1} +#check @is_proj3.{1 2} namespace foo section @@ -61,8 +61,8 @@ section noncomputable definition is_proj2 := ∀ x y, f x y = y noncomputable definition is_proj3 (f : T1 → T2 → T3 → T3) := ∀ x y z, f x y z = z end -check @foo.is_proj2.{1} -check @foo.is_proj3.{1 2} +#check @foo.is_proj2.{1} +#check @foo.is_proj3.{1 2} end foo namespace bla @@ -74,6 +74,6 @@ section noncomputable definition is_proj2 := ∀ x y, f x y = y noncomputable definition is_proj3 (f : T1 → T2 → T3 → T3) := ∀ x y z, f x y z = z end -check @bla.is_proj2.{1 2} -check @bla.is_proj3.{1 2 3} +#check @bla.is_proj2.{1 2} +#check @bla.is_proj3.{1 2 3} end bla diff --git a/tests/lean/run/basic_monitor.lean b/tests/lean/run/basic_monitor.lean index 9d5f90c960..61d9434887 100644 --- a/tests/lean/run/basic_monitor.lean +++ b/tests/lean/run/basic_monitor.lean @@ -1,7 +1,7 @@ meta def basic_monitor : vm_monitor nat := { init := 0, step := λ s, return (trace ("step " ++ s^.to_string) (s+1)) } -run_command vm_monitor.register `basic_monitor +run_cmd vm_monitor.register `basic_monitor set_option debugger true diff --git a/tests/lean/run/basic_monitor1.lean b/tests/lean/run/basic_monitor1.lean index 300a4517cf..fa4b2ec984 100644 --- a/tests/lean/run/basic_monitor1.lean +++ b/tests/lean/run/basic_monitor1.lean @@ -1,7 +1,7 @@ meta def basic_monitor : vm_monitor nat := { init := 0, step := λ s, return (trace ("step " ++ s^.to_string) (s+1)) >> failure } -run_command vm_monitor.register `basic_monitor +run_cmd vm_monitor.register `basic_monitor set_option debugger true @@ -9,4 +9,4 @@ def f : nat → nat | 0 := 0 | (a+1) := f a -vm_eval trace "a" (f 4) +#eval trace "a" (f 4) diff --git a/tests/lean/run/basic_monitor2.lean b/tests/lean/run/basic_monitor2.lean index c0d29bbadf..2970a10954 100644 --- a/tests/lean/run/basic_monitor2.lean +++ b/tests/lean/run/basic_monitor2.lean @@ -28,7 +28,7 @@ meta def basic_monitor : vm_monitor nat := vm.trace (to_fmt "[" ++ csz ++ "]: " ++ to_fmt fn ++ " @ " ++ pos), return csz } -run_command vm_monitor.register `basic_monitor +run_cmd vm_monitor.register `basic_monitor set_option debugger true @@ -36,4 +36,4 @@ def f : nat → nat | 0 := 0 | (a+1) := f a -vm_eval trace "a" (f 4) +#eval trace "a" (f 4) diff --git a/tests/lean/run/basic_monitor3.lean b/tests/lean/run/basic_monitor3.lean index 53962421b5..a66c1d952e 100644 --- a/tests/lean/run/basic_monitor3.lean +++ b/tests/lean/run/basic_monitor3.lean @@ -57,7 +57,7 @@ meta def basic_monitor : vm_monitor nat := } -run_command vm_monitor.register `basic_monitor +run_cmd vm_monitor.register `basic_monitor set_option debugger true open tactic diff --git a/tests/lean/run/booltst.lean b/tests/lean/run/booltst.lean index f13559a8cf..6086ef83a0 100644 --- a/tests/lean/run/booltst.lean +++ b/tests/lean/run/booltst.lean @@ -1,3 +1,3 @@ open bool -check ff +#check ff diff --git a/tests/lean/run/bor_lazy.lean b/tests/lean/run/bor_lazy.lean index 69d445ca0c..160a332b28 100644 --- a/tests/lean/run/bor_lazy.lean +++ b/tests/lean/run/bor_lazy.lean @@ -1,3 +1,3 @@ open bool -vm_eval (timeit "branch1:" tt) || (timeit "branch2:" tt) +#eval (timeit "branch1:" tt) || (timeit "branch2:" tt) diff --git a/tests/lean/run/bug6.lean b/tests/lean/run/bug6.lean index 4cf3109ddc..6e58b339d1 100644 --- a/tests/lean/run/bug6.lean +++ b/tests/lean/run/bug6.lean @@ -5,8 +5,8 @@ section := symm H variables x y : A variable H : x = y - check T H - check T + #check T H + #check T end section @@ -15,6 +15,6 @@ section := symm H variables x y : A variable H : x = y - check T2 H - check T2 + #check T2 H + #check T2 end diff --git a/tests/lean/run/bug_proving_eqn_lemmas.lean b/tests/lean/run/bug_proving_eqn_lemmas.lean index 1ef682b52c..0bd728ff1b 100644 --- a/tests/lean/run/bug_proving_eqn_lemmas.lean +++ b/tests/lean/run/bug_proving_eqn_lemmas.lean @@ -10,4 +10,4 @@ def to_list {α : Type u} : bintree α → list α → list α | (leaf α) l := α :: l | (node t₁ t₂) l := to_list t₁ (to_list t₂ l) -vm_eval to_list (node (node (leaf 1) (leaf 2)) (node (leaf 3) (leaf 4))) [] +#eval to_list (node (node (leaf 1) (leaf 2)) (node (leaf 3) (leaf 4))) [] diff --git a/tests/lean/run/calc_heq_symm.lean b/tests/lean/run/calc_heq_symm.lean index ab71da57e5..a5a51c3375 100644 --- a/tests/lean/run/calc_heq_symm.lean +++ b/tests/lean/run/calc_heq_symm.lean @@ -5,4 +5,4 @@ calc d == c : heq.symm H₃ ... == a₂ : heq.symm H₁ ... = a₁ : eq.symm H₀ -print definition tst +#print definition tst diff --git a/tests/lean/run/cases_tac1.lean b/tests/lean/run/cases_tac1.lean index 8c329a80c4..5d9b0dcf57 100644 --- a/tests/lean/run/cases_tac1.lean +++ b/tests/lean/run/cases_tac1.lean @@ -32,7 +32,7 @@ by do subst Heq1, subst Heq2, reflexivity -print "-------" +#print "-------" example (n : nat) : n ≠ 0 → succ (pred n) = n := by do @@ -43,4 +43,4 @@ by do contradiction, reflexivity -print "---------" +#print "---------" diff --git a/tests/lean/run/check_constants.lean b/tests/lean/run/check_constants.lean index 21daef7b75..c93fd59ce9 100644 --- a/tests/lean/run/check_constants.lean +++ b/tests/lean/run/check_constants.lean @@ -3,377 +3,377 @@ import smt system.io open tactic meta def script_check_id (n : name) : tactic unit := do env ← get_env, (env^.get n >> return ()) <|> (guard $ env^.is_namespace n) <|> (attribute.get_instances n >> return ()) <|> fail ("identifier '" ++ to_string n ++ "' is not a constant, namespace nor attribute") -run_command script_check_id `abs -run_command script_check_id `absurd -run_command script_check_id `acc.cases_on -run_command script_check_id `add -run_command script_check_id `add_comm_group -run_command script_check_id `add_comm_semigroup -run_command script_check_id `add_group -run_command script_check_id `add_monoid -run_command script_check_id `and -run_command script_check_id `and.elim_left -run_command script_check_id `and.elim_right -run_command script_check_id `and.intro -run_command script_check_id `andthen -run_command script_check_id `auto_param -run_command script_check_id `bit0 -run_command script_check_id `bit1 -run_command script_check_id `bool -run_command script_check_id `bool.ff -run_command script_check_id `bool.tt -run_command script_check_id `bind -run_command script_check_id `combinator.K -run_command script_check_id `caching_user_attribute -run_command script_check_id `cast -run_command script_check_id `cast_heq -run_command script_check_id `char -run_command script_check_id `char.of_nat -run_command script_check_id `char.of_nat_ne_of_ne -run_command script_check_id `classical.prop_decidable -run_command script_check_id `classical.type_decidable_eq -run_command script_check_id `coe -run_command script_check_id `coe_fn -run_command script_check_id `coe_sort -run_command script_check_id `coe_to_lift -run_command script_check_id `congr -run_command script_check_id `congr_arg -run_command script_check_id `congr_fun -run_command script_check_id `decidable -run_command script_check_id `decidable.to_bool -run_command script_check_id `distrib -run_command script_check_id `dite -run_command script_check_id `div -run_command script_check_id `id -run_command script_check_id `empty -run_command script_check_id `emptyc -run_command script_check_id `Exists -run_command script_check_id `eq -run_command script_check_id `eq.cases_on -run_command script_check_id `eq.drec -run_command script_check_id `eq.mp -run_command script_check_id `eq.mpr -run_command script_check_id `eq.rec -run_command script_check_id `eq.refl -run_command script_check_id `eq.subst -run_command script_check_id `eq.symm -run_command script_check_id `eq.trans -run_command script_check_id `eq_of_heq -run_command script_check_id `eq_rec_heq -run_command script_check_id `eq_true_intro -run_command script_check_id `eq_false_intro -run_command script_check_id `eq_self_iff_true -run_command script_check_id `expr -run_command script_check_id `expr.subst -run_command script_check_id `format -run_command script_check_id `false -run_command script_check_id `false_of_true_iff_false -run_command script_check_id `false_of_true_eq_false -run_command script_check_id `true_eq_false_of_false -run_command script_check_id `false.rec -run_command script_check_id `field -run_command script_check_id `fin.mk -run_command script_check_id `fin.ne_of_vne -run_command script_check_id `forall_congr -run_command script_check_id `forall_congr_eq -run_command script_check_id `forall_not_of_not_exists -run_command script_check_id `funext -run_command script_check_id `ge -run_command script_check_id `gt -run_command script_check_id `has_add -run_command script_check_id `has_div -run_command script_check_id `has_mul -run_command script_check_id `has_inv -run_command script_check_id `has_le -run_command script_check_id `has_lt -run_command script_check_id `has_neg -run_command script_check_id `has_one -run_command script_check_id `has_one.one -run_command script_check_id `has_sizeof -run_command script_check_id `has_sizeof.mk -run_command script_check_id `has_sub -run_command script_check_id `has_to_format -run_command script_check_id `has_to_string -run_command script_check_id `has_zero -run_command script_check_id `has_zero.zero -run_command script_check_id `has_coe_t -run_command script_check_id `heq -run_command script_check_id `heq.refl -run_command script_check_id `heq.symm -run_command script_check_id `heq.trans -run_command script_check_id `heq_of_eq -run_command script_check_id `id_locked -run_command script_check_id `if_neg -run_command script_check_id `if_pos -run_command script_check_id `iff -run_command script_check_id `iff_false_intro -run_command script_check_id `iff.intro -run_command script_check_id `iff.mpr -run_command script_check_id `iff.refl -run_command script_check_id `iff.symm -run_command script_check_id `iff.trans -run_command script_check_id `iff_true_intro -run_command script_check_id `imp_congr -run_command script_check_id `imp_congr_eq -run_command script_check_id `imp_congr_ctx -run_command script_check_id `imp_congr_ctx_eq -run_command script_check_id `implies -run_command script_check_id `implies_of_if_neg -run_command script_check_id `implies_of_if_pos -run_command script_check_id `insert -run_command script_check_id `int -run_command script_check_id `int.has_add -run_command script_check_id `int.has_mul -run_command script_check_id `int.has_sub -run_command script_check_id `int.has_div -run_command script_check_id `int.has_le -run_command script_check_id `int.has_lt -run_command script_check_id `int.has_neg -run_command script_check_id `int.has_mod -run_command script_check_id `int.bit0_nonneg -run_command script_check_id `int.bit1_nonneg -run_command script_check_id `int.one_nonneg -run_command script_check_id `int.zero_nonneg -run_command script_check_id `int.bit0_pos -run_command script_check_id `int.bit1_pos -run_command script_check_id `int.one_pos -run_command script_check_id `int.nat_abs_zero -run_command script_check_id `int.nat_abs_one -run_command script_check_id `int.nat_abs_bit0_step -run_command script_check_id `int.nat_abs_bit1_nonneg_step -run_command script_check_id `int.ne_of_nat_ne_nonneg_case -run_command script_check_id `int.ne_neg_of_ne -run_command script_check_id `int.neg_ne_of_pos -run_command script_check_id `int.ne_neg_of_pos -run_command script_check_id `int.neg_ne_zero_of_ne -run_command script_check_id `int.zero_ne_neg_of_ne -run_command script_check_id `int.decidable_linear_ordered_comm_group -run_command script_check_id `interactive.parse -run_command script_check_id `inv -run_command script_check_id `io -run_command script_check_id `io.map -run_command script_check_id `io.bind -run_command script_check_id `io.monad -run_command script_check_id `io.return -run_command script_check_id `io.put_str -run_command script_check_id `io.get_line -run_command script_check_id `is_associative -run_command script_check_id `is_associative.assoc -run_command script_check_id `is_commutative -run_command script_check_id `is_commutative.comm -run_command script_check_id `ite -run_command script_check_id `left_distrib -run_command script_check_id `left_comm -run_command script_check_id `le -run_command script_check_id `le_refl -run_command script_check_id `linear_ordered_ring -run_command script_check_id `linear_ordered_semiring -run_command script_check_id `list -run_command script_check_id `list.nil -run_command script_check_id `list.cons -run_command script_check_id `lt -run_command script_check_id `match_failed -run_command script_check_id `mod -run_command script_check_id `monad -run_command script_check_id `monad.bind -run_command script_check_id `monad.ret -run_command script_check_id `monad_fail -run_command script_check_id `monoid -run_command script_check_id `mul -run_command script_check_id `mul_one -run_command script_check_id `mul_zero -run_command script_check_id `mul_zero_class -run_command script_check_id `name.anonymous -run_command script_check_id `name.mk_numeral -run_command script_check_id `name.mk_string -run_command script_check_id `nat -run_command script_check_id `nat.of_num -run_command script_check_id `nat.succ -run_command script_check_id `nat.zero -run_command script_check_id `nat.has_zero -run_command script_check_id `nat.has_one -run_command script_check_id `nat.has_add -run_command script_check_id `nat.add -run_command script_check_id `nat.cases_on -run_command script_check_id `nat.bit0_ne -run_command script_check_id `nat.bit0_ne_bit1 -run_command script_check_id `nat.bit0_ne_zero -run_command script_check_id `nat.bit0_ne_one -run_command script_check_id `nat.bit1_ne -run_command script_check_id `nat.bit1_ne_bit0 -run_command script_check_id `nat.bit1_ne_zero -run_command script_check_id `nat.bit1_ne_one -run_command script_check_id `nat.zero_ne_one -run_command script_check_id `nat.zero_ne_bit0 -run_command script_check_id `nat.zero_ne_bit1 -run_command script_check_id `nat.one_ne_zero -run_command script_check_id `nat.one_ne_bit0 -run_command script_check_id `nat.one_ne_bit1 -run_command script_check_id `nat.bit0_lt -run_command script_check_id `nat.bit1_lt -run_command script_check_id `nat.bit0_lt_bit1 -run_command script_check_id `nat.bit1_lt_bit0 -run_command script_check_id `nat.zero_lt_one -run_command script_check_id `nat.zero_lt_bit1 -run_command script_check_id `nat.zero_lt_bit0 -run_command script_check_id `nat.one_lt_bit0 -run_command script_check_id `nat.one_lt_bit1 -run_command script_check_id `nat.le_of_lt -run_command script_check_id `nat.le_refl -run_command script_check_id `ne -run_command script_check_id `neg -run_command script_check_id `neq_of_not_iff -run_command script_check_id `norm_num.add1 -run_command script_check_id `norm_num.add1_bit0 -run_command script_check_id `norm_num.add1_bit1_helper -run_command script_check_id `norm_num.add1_one -run_command script_check_id `norm_num.add1_zero -run_command script_check_id `norm_num.add_div_helper -run_command script_check_id `norm_num.bin_add_zero -run_command script_check_id `norm_num.bin_zero_add -run_command script_check_id `norm_num.bit0_add_bit0_helper -run_command script_check_id `norm_num.bit0_add_bit1_helper -run_command script_check_id `norm_num.bit0_add_one -run_command script_check_id `norm_num.bit1_add_bit0_helper -run_command script_check_id `norm_num.bit1_add_bit1_helper -run_command script_check_id `norm_num.bit1_add_one_helper -run_command script_check_id `norm_num.div_add_helper -run_command script_check_id `norm_num.div_eq_div_helper -run_command script_check_id `norm_num.div_helper -run_command script_check_id `norm_num.div_mul_helper -run_command script_check_id `norm_num.mk_cong -run_command script_check_id `norm_num.mul_bit0_helper -run_command script_check_id `norm_num.mul_bit1_helper -run_command script_check_id `norm_num.mul_div_helper -run_command script_check_id `norm_num.neg_add_neg_helper -run_command script_check_id `norm_num.neg_add_pos_helper1 -run_command script_check_id `norm_num.neg_add_pos_helper2 -run_command script_check_id `norm_num.neg_mul_neg_helper -run_command script_check_id `norm_num.neg_mul_pos_helper -run_command script_check_id `norm_num.neg_neg_helper -run_command script_check_id `norm_num.neg_zero_helper -run_command script_check_id `norm_num.nonneg_bit0_helper -run_command script_check_id `norm_num.nonneg_bit1_helper -run_command script_check_id `norm_num.nonzero_of_div_helper -run_command script_check_id `norm_num.nonzero_of_neg_helper -run_command script_check_id `norm_num.nonzero_of_pos_helper -run_command script_check_id `norm_num.one_add_bit0 -run_command script_check_id `norm_num.one_add_bit1_helper -run_command script_check_id `norm_num.one_add_one -run_command script_check_id `norm_num.pos_add_neg_helper -run_command script_check_id `norm_num.pos_bit0_helper -run_command script_check_id `norm_num.pos_bit1_helper -run_command script_check_id `norm_num.pos_mul_neg_helper -run_command script_check_id `norm_num.sub_nat_zero_helper -run_command script_check_id `norm_num.sub_nat_pos_helper -run_command script_check_id `norm_num.subst_into_div -run_command script_check_id `norm_num.subst_into_prod -run_command script_check_id `norm_num.subst_into_subtr -run_command script_check_id `norm_num.subst_into_sum -run_command script_check_id `not -run_command script_check_id `not_of_iff_false -run_command script_check_id `not_of_eq_false -run_command script_check_id `num -run_command script_check_id `num.pos -run_command script_check_id `num.zero -run_command script_check_id `of_eq_true -run_command script_check_id `of_iff_true -run_command script_check_id `one -run_command script_check_id `opt_param -run_command script_check_id `or -run_command script_check_id `orelse -run_command script_check_id `out_param -run_command script_check_id `punit -run_command script_check_id `punit.star -run_command script_check_id `pos_num.bit0 -run_command script_check_id `pos_num.bit1 -run_command script_check_id `pos_num.one -run_command script_check_id `prod.mk -run_command script_check_id `pprod -run_command script_check_id `pprod.mk -run_command script_check_id `pprod.fst -run_command script_check_id `pprod.snd -run_command script_check_id `propext -run_command script_check_id `pexpr -run_command script_check_id `pexpr.subst -run_command script_check_id `pre_monad.bind -run_command script_check_id `pre_monad.and_then -run_command script_check_id `pre_monad.seq -run_command script_check_id `to_pexpr -run_command script_check_id `quot.mk -run_command script_check_id `quot.lift -run_command script_check_id `real -run_command script_check_id `real.of_int -run_command script_check_id `real.to_int -run_command script_check_id `real.is_int -run_command script_check_id `real.has_neg -run_command script_check_id `real.has_div -run_command script_check_id `real.has_add -run_command script_check_id `real.has_mul -run_command script_check_id `real.has_sub -run_command script_check_id `real.has_lt -run_command script_check_id `real.has_le -run_command script_check_id `rfl -run_command script_check_id `right_distrib -run_command script_check_id `ring -run_command script_check_id `scope_trace -run_command script_check_id `set_of -run_command script_check_id `sep -run_command script_check_id `semiring -run_command script_check_id `sigma -run_command script_check_id `sigma.mk -run_command script_check_id `sigma.fst -run_command script_check_id `sigma.snd -run_command script_check_id `psigma -run_command script_check_id `psigma.cases_on -run_command script_check_id `psigma.mk -run_command script_check_id `singleton -run_command script_check_id `sizeof -run_command script_check_id `smt.array -run_command script_check_id `smt.select -run_command script_check_id `smt.store -run_command script_check_id `smt.prove -run_command script_check_id `string -run_command script_check_id `string.empty -run_command script_check_id `string.str -run_command script_check_id `string.empty_ne_str -run_command script_check_id `string.str_ne_empty -run_command script_check_id `string.str_ne_str_left -run_command script_check_id `string.str_ne_str_right -run_command script_check_id `sub -run_command script_check_id `subsingleton -run_command script_check_id `subsingleton.elim -run_command script_check_id `subsingleton.helim -run_command script_check_id `subtype -run_command script_check_id `subtype.mk -run_command script_check_id `subtype.val -run_command script_check_id `subtype.rec -run_command script_check_id `psum -run_command script_check_id `psum.cases_on -run_command script_check_id `psum.inl -run_command script_check_id `psum.inr -run_command script_check_id `tactic -run_command script_check_id `tactic.eval_expr -run_command script_check_id `tactic.try -run_command script_check_id `tactic.triv -run_command script_check_id `thunk -run_command script_check_id `to_fmt -run_command script_check_id `to_string -run_command script_check_id `trans_rel_left -run_command script_check_id `trans_rel_right -run_command script_check_id `true -run_command script_check_id `true.intro -run_command script_check_id `unification_hint -run_command script_check_id `unification_hint.mk -run_command script_check_id `unit -run_command script_check_id `unit.cases_on -run_command script_check_id `unit.star -run_command script_check_id `user_attribute -run_command script_check_id `vm_monitor -run_command script_check_id `weak_order -run_command script_check_id `well_founded -run_command script_check_id `xor -run_command script_check_id `zero -run_command script_check_id `zero_le_one -run_command script_check_id `zero_lt_one -run_command script_check_id `zero_mul +run_cmd script_check_id `abs +run_cmd script_check_id `absurd +run_cmd script_check_id `acc.cases_on +run_cmd script_check_id `add +run_cmd script_check_id `add_comm_group +run_cmd script_check_id `add_comm_semigroup +run_cmd script_check_id `add_group +run_cmd script_check_id `add_monoid +run_cmd script_check_id `and +run_cmd script_check_id `and.elim_left +run_cmd script_check_id `and.elim_right +run_cmd script_check_id `and.intro +run_cmd script_check_id `andthen +run_cmd script_check_id `auto_param +run_cmd script_check_id `bit0 +run_cmd script_check_id `bit1 +run_cmd script_check_id `bool +run_cmd script_check_id `bool.ff +run_cmd script_check_id `bool.tt +run_cmd script_check_id `bind +run_cmd script_check_id `combinator.K +run_cmd script_check_id `caching_user_attribute +run_cmd script_check_id `cast +run_cmd script_check_id `cast_heq +run_cmd script_check_id `char +run_cmd script_check_id `char.of_nat +run_cmd script_check_id `char.of_nat_ne_of_ne +run_cmd script_check_id `classical.prop_decidable +run_cmd script_check_id `classical.type_decidable_eq +run_cmd script_check_id `coe +run_cmd script_check_id `coe_fn +run_cmd script_check_id `coe_sort +run_cmd script_check_id `coe_to_lift +run_cmd script_check_id `congr +run_cmd script_check_id `congr_arg +run_cmd script_check_id `congr_fun +run_cmd script_check_id `decidable +run_cmd script_check_id `decidable.to_bool +run_cmd script_check_id `distrib +run_cmd script_check_id `dite +run_cmd script_check_id `div +run_cmd script_check_id `id +run_cmd script_check_id `empty +run_cmd script_check_id `emptyc +run_cmd script_check_id `Exists +run_cmd script_check_id `eq +run_cmd script_check_id `eq.cases_on +run_cmd script_check_id `eq.drec +run_cmd script_check_id `eq.mp +run_cmd script_check_id `eq.mpr +run_cmd script_check_id `eq.rec +run_cmd script_check_id `eq.refl +run_cmd script_check_id `eq.subst +run_cmd script_check_id `eq.symm +run_cmd script_check_id `eq.trans +run_cmd script_check_id `eq_of_heq +run_cmd script_check_id `eq_rec_heq +run_cmd script_check_id `eq_true_intro +run_cmd script_check_id `eq_false_intro +run_cmd script_check_id `eq_self_iff_true +run_cmd script_check_id `expr +run_cmd script_check_id `expr.subst +run_cmd script_check_id `format +run_cmd script_check_id `false +run_cmd script_check_id `false_of_true_iff_false +run_cmd script_check_id `false_of_true_eq_false +run_cmd script_check_id `true_eq_false_of_false +run_cmd script_check_id `false.rec +run_cmd script_check_id `field +run_cmd script_check_id `fin.mk +run_cmd script_check_id `fin.ne_of_vne +run_cmd script_check_id `forall_congr +run_cmd script_check_id `forall_congr_eq +run_cmd script_check_id `forall_not_of_not_exists +run_cmd script_check_id `funext +run_cmd script_check_id `ge +run_cmd script_check_id `gt +run_cmd script_check_id `has_add +run_cmd script_check_id `has_div +run_cmd script_check_id `has_mul +run_cmd script_check_id `has_inv +run_cmd script_check_id `has_le +run_cmd script_check_id `has_lt +run_cmd script_check_id `has_neg +run_cmd script_check_id `has_one +run_cmd script_check_id `has_one.one +run_cmd script_check_id `has_sizeof +run_cmd script_check_id `has_sizeof.mk +run_cmd script_check_id `has_sub +run_cmd script_check_id `has_to_format +run_cmd script_check_id `has_to_string +run_cmd script_check_id `has_zero +run_cmd script_check_id `has_zero.zero +run_cmd script_check_id `has_coe_t +run_cmd script_check_id `heq +run_cmd script_check_id `heq.refl +run_cmd script_check_id `heq.symm +run_cmd script_check_id `heq.trans +run_cmd script_check_id `heq_of_eq +run_cmd script_check_id `id_locked +run_cmd script_check_id `if_neg +run_cmd script_check_id `if_pos +run_cmd script_check_id `iff +run_cmd script_check_id `iff_false_intro +run_cmd script_check_id `iff.intro +run_cmd script_check_id `iff.mpr +run_cmd script_check_id `iff.refl +run_cmd script_check_id `iff.symm +run_cmd script_check_id `iff.trans +run_cmd script_check_id `iff_true_intro +run_cmd script_check_id `imp_congr +run_cmd script_check_id `imp_congr_eq +run_cmd script_check_id `imp_congr_ctx +run_cmd script_check_id `imp_congr_ctx_eq +run_cmd script_check_id `implies +run_cmd script_check_id `implies_of_if_neg +run_cmd script_check_id `implies_of_if_pos +run_cmd script_check_id `insert +run_cmd script_check_id `int +run_cmd script_check_id `int.has_add +run_cmd script_check_id `int.has_mul +run_cmd script_check_id `int.has_sub +run_cmd script_check_id `int.has_div +run_cmd script_check_id `int.has_le +run_cmd script_check_id `int.has_lt +run_cmd script_check_id `int.has_neg +run_cmd script_check_id `int.has_mod +run_cmd script_check_id `int.bit0_nonneg +run_cmd script_check_id `int.bit1_nonneg +run_cmd script_check_id `int.one_nonneg +run_cmd script_check_id `int.zero_nonneg +run_cmd script_check_id `int.bit0_pos +run_cmd script_check_id `int.bit1_pos +run_cmd script_check_id `int.one_pos +run_cmd script_check_id `int.nat_abs_zero +run_cmd script_check_id `int.nat_abs_one +run_cmd script_check_id `int.nat_abs_bit0_step +run_cmd script_check_id `int.nat_abs_bit1_nonneg_step +run_cmd script_check_id `int.ne_of_nat_ne_nonneg_case +run_cmd script_check_id `int.ne_neg_of_ne +run_cmd script_check_id `int.neg_ne_of_pos +run_cmd script_check_id `int.ne_neg_of_pos +run_cmd script_check_id `int.neg_ne_zero_of_ne +run_cmd script_check_id `int.zero_ne_neg_of_ne +run_cmd script_check_id `int.decidable_linear_ordered_comm_group +run_cmd script_check_id `interactive.parse +run_cmd script_check_id `inv +run_cmd script_check_id `io +run_cmd script_check_id `io.map +run_cmd script_check_id `io.bind +run_cmd script_check_id `io.monad +run_cmd script_check_id `io.return +run_cmd script_check_id `io.put_str +run_cmd script_check_id `io.get_line +run_cmd script_check_id `is_associative +run_cmd script_check_id `is_associative.assoc +run_cmd script_check_id `is_commutative +run_cmd script_check_id `is_commutative.comm +run_cmd script_check_id `ite +run_cmd script_check_id `left_distrib +run_cmd script_check_id `left_comm +run_cmd script_check_id `le +run_cmd script_check_id `le_refl +run_cmd script_check_id `linear_ordered_ring +run_cmd script_check_id `linear_ordered_semiring +run_cmd script_check_id `list +run_cmd script_check_id `list.nil +run_cmd script_check_id `list.cons +run_cmd script_check_id `lt +run_cmd script_check_id `match_failed +run_cmd script_check_id `mod +run_cmd script_check_id `monad +run_cmd script_check_id `monad.bind +run_cmd script_check_id `monad.ret +run_cmd script_check_id `monad_fail +run_cmd script_check_id `monoid +run_cmd script_check_id `mul +run_cmd script_check_id `mul_one +run_cmd script_check_id `mul_zero +run_cmd script_check_id `mul_zero_class +run_cmd script_check_id `name.anonymous +run_cmd script_check_id `name.mk_numeral +run_cmd script_check_id `name.mk_string +run_cmd script_check_id `nat +run_cmd script_check_id `nat.of_num +run_cmd script_check_id `nat.succ +run_cmd script_check_id `nat.zero +run_cmd script_check_id `nat.has_zero +run_cmd script_check_id `nat.has_one +run_cmd script_check_id `nat.has_add +run_cmd script_check_id `nat.add +run_cmd script_check_id `nat.cases_on +run_cmd script_check_id `nat.bit0_ne +run_cmd script_check_id `nat.bit0_ne_bit1 +run_cmd script_check_id `nat.bit0_ne_zero +run_cmd script_check_id `nat.bit0_ne_one +run_cmd script_check_id `nat.bit1_ne +run_cmd script_check_id `nat.bit1_ne_bit0 +run_cmd script_check_id `nat.bit1_ne_zero +run_cmd script_check_id `nat.bit1_ne_one +run_cmd script_check_id `nat.zero_ne_one +run_cmd script_check_id `nat.zero_ne_bit0 +run_cmd script_check_id `nat.zero_ne_bit1 +run_cmd script_check_id `nat.one_ne_zero +run_cmd script_check_id `nat.one_ne_bit0 +run_cmd script_check_id `nat.one_ne_bit1 +run_cmd script_check_id `nat.bit0_lt +run_cmd script_check_id `nat.bit1_lt +run_cmd script_check_id `nat.bit0_lt_bit1 +run_cmd script_check_id `nat.bit1_lt_bit0 +run_cmd script_check_id `nat.zero_lt_one +run_cmd script_check_id `nat.zero_lt_bit1 +run_cmd script_check_id `nat.zero_lt_bit0 +run_cmd script_check_id `nat.one_lt_bit0 +run_cmd script_check_id `nat.one_lt_bit1 +run_cmd script_check_id `nat.le_of_lt +run_cmd script_check_id `nat.le_refl +run_cmd script_check_id `ne +run_cmd script_check_id `neg +run_cmd script_check_id `neq_of_not_iff +run_cmd script_check_id `norm_num.add1 +run_cmd script_check_id `norm_num.add1_bit0 +run_cmd script_check_id `norm_num.add1_bit1_helper +run_cmd script_check_id `norm_num.add1_one +run_cmd script_check_id `norm_num.add1_zero +run_cmd script_check_id `norm_num.add_div_helper +run_cmd script_check_id `norm_num.bin_add_zero +run_cmd script_check_id `norm_num.bin_zero_add +run_cmd script_check_id `norm_num.bit0_add_bit0_helper +run_cmd script_check_id `norm_num.bit0_add_bit1_helper +run_cmd script_check_id `norm_num.bit0_add_one +run_cmd script_check_id `norm_num.bit1_add_bit0_helper +run_cmd script_check_id `norm_num.bit1_add_bit1_helper +run_cmd script_check_id `norm_num.bit1_add_one_helper +run_cmd script_check_id `norm_num.div_add_helper +run_cmd script_check_id `norm_num.div_eq_div_helper +run_cmd script_check_id `norm_num.div_helper +run_cmd script_check_id `norm_num.div_mul_helper +run_cmd script_check_id `norm_num.mk_cong +run_cmd script_check_id `norm_num.mul_bit0_helper +run_cmd script_check_id `norm_num.mul_bit1_helper +run_cmd script_check_id `norm_num.mul_div_helper +run_cmd script_check_id `norm_num.neg_add_neg_helper +run_cmd script_check_id `norm_num.neg_add_pos_helper1 +run_cmd script_check_id `norm_num.neg_add_pos_helper2 +run_cmd script_check_id `norm_num.neg_mul_neg_helper +run_cmd script_check_id `norm_num.neg_mul_pos_helper +run_cmd script_check_id `norm_num.neg_neg_helper +run_cmd script_check_id `norm_num.neg_zero_helper +run_cmd script_check_id `norm_num.nonneg_bit0_helper +run_cmd script_check_id `norm_num.nonneg_bit1_helper +run_cmd script_check_id `norm_num.nonzero_of_div_helper +run_cmd script_check_id `norm_num.nonzero_of_neg_helper +run_cmd script_check_id `norm_num.nonzero_of_pos_helper +run_cmd script_check_id `norm_num.one_add_bit0 +run_cmd script_check_id `norm_num.one_add_bit1_helper +run_cmd script_check_id `norm_num.one_add_one +run_cmd script_check_id `norm_num.pos_add_neg_helper +run_cmd script_check_id `norm_num.pos_bit0_helper +run_cmd script_check_id `norm_num.pos_bit1_helper +run_cmd script_check_id `norm_num.pos_mul_neg_helper +run_cmd script_check_id `norm_num.sub_nat_zero_helper +run_cmd script_check_id `norm_num.sub_nat_pos_helper +run_cmd script_check_id `norm_num.subst_into_div +run_cmd script_check_id `norm_num.subst_into_prod +run_cmd script_check_id `norm_num.subst_into_subtr +run_cmd script_check_id `norm_num.subst_into_sum +run_cmd script_check_id `not +run_cmd script_check_id `not_of_iff_false +run_cmd script_check_id `not_of_eq_false +run_cmd script_check_id `num +run_cmd script_check_id `num.pos +run_cmd script_check_id `num.zero +run_cmd script_check_id `of_eq_true +run_cmd script_check_id `of_iff_true +run_cmd script_check_id `one +run_cmd script_check_id `opt_param +run_cmd script_check_id `or +run_cmd script_check_id `orelse +run_cmd script_check_id `out_param +run_cmd script_check_id `punit +run_cmd script_check_id `punit.star +run_cmd script_check_id `pos_num.bit0 +run_cmd script_check_id `pos_num.bit1 +run_cmd script_check_id `pos_num.one +run_cmd script_check_id `prod.mk +run_cmd script_check_id `pprod +run_cmd script_check_id `pprod.mk +run_cmd script_check_id `pprod.fst +run_cmd script_check_id `pprod.snd +run_cmd script_check_id `propext +run_cmd script_check_id `pexpr +run_cmd script_check_id `pexpr.subst +run_cmd script_check_id `pre_monad.bind +run_cmd script_check_id `pre_monad.and_then +run_cmd script_check_id `pre_monad.seq +run_cmd script_check_id `to_pexpr +run_cmd script_check_id `quot.mk +run_cmd script_check_id `quot.lift +run_cmd script_check_id `real +run_cmd script_check_id `real.of_int +run_cmd script_check_id `real.to_int +run_cmd script_check_id `real.is_int +run_cmd script_check_id `real.has_neg +run_cmd script_check_id `real.has_div +run_cmd script_check_id `real.has_add +run_cmd script_check_id `real.has_mul +run_cmd script_check_id `real.has_sub +run_cmd script_check_id `real.has_lt +run_cmd script_check_id `real.has_le +run_cmd script_check_id `rfl +run_cmd script_check_id `right_distrib +run_cmd script_check_id `ring +run_cmd script_check_id `scope_trace +run_cmd script_check_id `set_of +run_cmd script_check_id `sep +run_cmd script_check_id `semiring +run_cmd script_check_id `sigma +run_cmd script_check_id `sigma.mk +run_cmd script_check_id `sigma.fst +run_cmd script_check_id `sigma.snd +run_cmd script_check_id `psigma +run_cmd script_check_id `psigma.cases_on +run_cmd script_check_id `psigma.mk +run_cmd script_check_id `singleton +run_cmd script_check_id `sizeof +run_cmd script_check_id `smt.array +run_cmd script_check_id `smt.select +run_cmd script_check_id `smt.store +run_cmd script_check_id `smt.prove +run_cmd script_check_id `string +run_cmd script_check_id `string.empty +run_cmd script_check_id `string.str +run_cmd script_check_id `string.empty_ne_str +run_cmd script_check_id `string.str_ne_empty +run_cmd script_check_id `string.str_ne_str_left +run_cmd script_check_id `string.str_ne_str_right +run_cmd script_check_id `sub +run_cmd script_check_id `subsingleton +run_cmd script_check_id `subsingleton.elim +run_cmd script_check_id `subsingleton.helim +run_cmd script_check_id `subtype +run_cmd script_check_id `subtype.mk +run_cmd script_check_id `subtype.val +run_cmd script_check_id `subtype.rec +run_cmd script_check_id `psum +run_cmd script_check_id `psum.cases_on +run_cmd script_check_id `psum.inl +run_cmd script_check_id `psum.inr +run_cmd script_check_id `tactic +run_cmd script_check_id `tactic.eval_expr +run_cmd script_check_id `tactic.try +run_cmd script_check_id `tactic.triv +run_cmd script_check_id `thunk +run_cmd script_check_id `to_fmt +run_cmd script_check_id `to_string +run_cmd script_check_id `trans_rel_left +run_cmd script_check_id `trans_rel_right +run_cmd script_check_id `true +run_cmd script_check_id `true.intro +run_cmd script_check_id `unification_hint +run_cmd script_check_id `unification_hint.mk +run_cmd script_check_id `unit +run_cmd script_check_id `unit.cases_on +run_cmd script_check_id `unit.star +run_cmd script_check_id `user_attribute +run_cmd script_check_id `vm_monitor +run_cmd script_check_id `weak_order +run_cmd script_check_id `well_founded +run_cmd script_check_id `xor +run_cmd script_check_id `zero +run_cmd script_check_id `zero_le_one +run_cmd script_check_id `zero_lt_one +run_cmd script_check_id `zero_mul diff --git a/tests/lean/run/class1.lean b/tests/lean/run/class1.lean index 14f7ef36b4..6934a9512e 100644 --- a/tests/lean/run/class1.lean +++ b/tests/lean/run/class1.lean @@ -3,4 +3,4 @@ open prod inhabited definition H : inhabited (Prop × num × (num → num)) := by tactic.apply_instance -print H +#print H diff --git a/tests/lean/run/class2.lean b/tests/lean/run/class2.lean index e84b41b626..d37ad8ab60 100644 --- a/tests/lean/run/class2.lean +++ b/tests/lean/run/class2.lean @@ -2,4 +2,4 @@ open tactic theorem H {A B : Type} (H1 : inhabited A) : inhabited (Prop × A × (B → num)) := by apply_instance -print H +#print H diff --git a/tests/lean/run/class3.lean b/tests/lean/run/class3.lean index ac647a855d..49612f93ae 100644 --- a/tests/lean/run/class3.lean +++ b/tests/lean/run/class3.lean @@ -10,4 +10,4 @@ section end -print tst +#print tst diff --git a/tests/lean/run/cody2.lean b/tests/lean/run/cody2.lean index 162ab33941..ff2e456e21 100644 --- a/tests/lean/run/cody2.lean +++ b/tests/lean/run/cody2.lean @@ -19,6 +19,6 @@ theorem delta_aux : ¬ (δ (i delta)) := assume H : δ (i delta), H (subst (symm (@retract delta (i delta))) H) -check delta_aux. +#check delta_aux. end diff --git a/tests/lean/run/coe_univ_bug.lean b/tests/lean/run/coe_univ_bug.lean index 6921bced2a..a9aa825c5e 100644 --- a/tests/lean/run/coe_univ_bug.lean +++ b/tests/lean/run/coe_univ_bug.lean @@ -17,4 +17,4 @@ instance coesubtype {A : Type u} {p : A → Prop} : has_coe (@coe_sort _ pred2su def g {n : nat} (v : below n) : nat := v + 1 -print g +#print g diff --git a/tests/lean/run/complete_rec_var.lean b/tests/lean/run/complete_rec_var.lean index 9235f83a40..04eeb7cec2 100644 --- a/tests/lean/run/complete_rec_var.lean +++ b/tests/lean/run/complete_rec_var.lean @@ -2,7 +2,7 @@ def f : nat → nat → nat | (x+1) (y+1) := f (x+10) y | _ _ := 1 -vm_eval f 1 1000 +#eval f 1 1000 example (x y) : f (x+1) (y+1) = f (x+10) y := rfl diff --git a/tests/lean/run/confuse_ind.lean b/tests/lean/run/confuse_ind.lean index d6cb7ae7b9..d2ecd0f225 100644 --- a/tests/lean/run/confuse_ind.lean +++ b/tests/lean/run/confuse_ind.lean @@ -6,4 +6,4 @@ inductive confuse (A : Type) | leaf2 : num → confuse | node : mk_arrow A confuse → confuse -check confuse.cases_on +#check confuse.cases_on diff --git a/tests/lean/run/consume.lean b/tests/lean/run/consume.lean index 226f736e80..e8d6b5d6ee 100644 --- a/tests/lean/run/consume.lean +++ b/tests/lean/run/consume.lean @@ -1,9 +1,9 @@ definition pr2 {A : Type} (a b : A) := a -check pr2 -check pr2 -check pr2 -check @pr2 -check @pr2 -check @@pr2 -check pr2 +#check pr2 +#check pr2 +#check pr2 +#check @pr2 +#check @pr2 +#check @@pr2 +#check pr2 diff --git a/tests/lean/run/converter.lean b/tests/lean/run/converter.lean index fcb6103516..8a1a7af1e9 100644 --- a/tests/lean/run/converter.lean +++ b/tests/lean/run/converter.lean @@ -1,8 +1,8 @@ open tactic conv open tactic -run_command mk_simp_attr `foo -run_command mk_simp_attr `bla +run_cmd mk_simp_attr `foo +run_cmd mk_simp_attr `bla constant f : nat → nat → nat @[foo] lemma f_lemma : ∀ x, f x x = 0 := @@ -52,7 +52,7 @@ lemma ex3 (p q r : Prop) : (p ∧ true ∧ p) = p := by conversion $ bottom_up (apply_propext_simp_set `default) -print "---------" +#print "---------" lemma ex4 (a b c : nat) : g (g (g (f (f (g (g a)) (g (g a))) a))) = g (g (g (f (f a a) a))) := by conversion $ diff --git a/tests/lean/run/cute_binders.lean b/tests/lean/run/cute_binders.lean index 5d69b23acb..ab6dad17ca 100644 --- a/tests/lean/run/cute_binders.lean +++ b/tests/lean/run/cute_binders.lean @@ -7,11 +7,11 @@ variables s : set nat variables p : nat → nat → Prop --- check a ∈ s +-- #check a ∈ s set_option pp.binder_types true -check ∀ b c a ∈ s, a + b + c > 0 +#check ∀ b c a ∈ s, a + b + c > 0 -- ∀ (b c a : ℕ), b ∈ s → c ∈ s → a ∈ s → a + b + c > 0 : Prop -check ∀ a < 5, p a (a+1) +#check ∀ a < 5, p a (a+1) -- ∀ (a : ℕ), a < 5 → p a (a + 1) : Prop -check ∀ a b ∈ [2, 3], p a b +#check ∀ a b ∈ [2, 3], p a b -- ∀ (a b : ℕ), a ∈ [2, 3] → b ∈ [2, 3] → p a b diff --git a/tests/lean/run/decidable.lean b/tests/lean/run/decidable.lean index 34b0c65852..1d31701f8f 100644 --- a/tests/lean/run/decidable.lean +++ b/tests/lean/run/decidable.lean @@ -3,4 +3,4 @@ open bool unit decidable constants a b c : bool constants u v : unit set_option pp.implicit true -check if ((a = b) ∧ (b = c) → ¬ (u = v) ∨ (a = c) → (a = c) ↔ a = tt ↔ true) then a else b +#check if ((a = b) ∧ (b = c) → ¬ (u = v) ∨ (a = c) → (a = c) ↔ a = tt ↔ true) then a else b diff --git a/tests/lean/run/decl_olean.lean b/tests/lean/run/decl_olean.lean index d47e7f1dc4..b26c2c3b18 100644 --- a/tests/lean/run/decl_olean.lean +++ b/tests/lean/run/decl_olean.lean @@ -9,10 +9,10 @@ do env ← get_env, olean ← returnopt (env^.decl_olean n) <|> return "current file", trace $ to_string n ++ " was defined at " ++ olean ++ " : " ++ to_string pos.1 ++ ":" ++ to_string pos.2 -run_command show_pos `add -run_command show_pos `nat.succ -run_command show_pos `subsingleton.intro -run_command show_pos `subsingleton.rec -run_command show_pos `nat.add -run_command show_pos `quotient -run_command show_pos `g +run_cmd show_pos `add +run_cmd show_pos `nat.succ +run_cmd show_pos `subsingleton.intro +run_cmd show_pos `subsingleton.rec +run_cmd show_pos `nat.add +run_cmd show_pos `quotient +run_cmd show_pos `g diff --git a/tests/lean/run/declare_axiom.lean b/tests/lean/run/declare_axiom.lean index cc8443f84b..54270fba25 100644 --- a/tests/lean/run/declare_axiom.lean +++ b/tests/lean/run/declare_axiom.lean @@ -1,5 +1,5 @@ open tactic -run_command (do +run_cmd (do e ← to_expr `(false), add_decl $ declaration.ax `useful_assumption [] e) diff --git a/tests/lean/run/def1.lean b/tests/lean/run/def1.lean index 5f089f6c50..4ad2261b4d 100644 --- a/tests/lean/run/def1.lean +++ b/tests/lean/run/def1.lean @@ -9,11 +9,11 @@ eq.trans H₁ (eq.symm H₂) lemma foo₂ (f : A → A → A) (a b c : A) (H₁ : a = b) (H₂ : c = b) : f a = f c := eq.symm H₂ ▸ H₁ ▸ rfl -check foo₁ -check foo₂ +#check foo₁ +#check foo₂ end tst -check tst.foo₁ -check tst.foo₂ -print tst.foo₁ +#check tst.foo₁ +#check tst.foo₂ +#print tst.foo₁ diff --git a/tests/lean/run/def2.lean b/tests/lean/run/def2.lean index 0037c4ec98..0ec294d7b8 100644 --- a/tests/lean/run/def2.lean +++ b/tests/lean/run/def2.lean @@ -2,4 +2,4 @@ definition plus (a b : nat) : nat := nat.rec_on a b (λ a' ih, nat.succ ih) -vm_eval plus 3 5 +#eval plus 3 5 diff --git a/tests/lean/run/def3.lean b/tests/lean/run/def3.lean index 8377bf1e52..6683e66b02 100644 --- a/tests/lean/run/def3.lean +++ b/tests/lean/run/def3.lean @@ -9,4 +9,4 @@ f (f a b) a set_option trace.compiler true -vm_eval g (g (f 2 3) 2) 3 +#eval g (g (f 2 3) 2) 3 diff --git a/tests/lean/run/def4.lean b/tests/lean/run/def4.lean index d142185cea..db875378b4 100644 --- a/tests/lean/run/def4.lean +++ b/tests/lean/run/def4.lean @@ -7,4 +7,4 @@ section end -check f +#check f diff --git a/tests/lean/run/def5.lean b/tests/lean/run/def5.lean index ef25c02b8a..954f13833b 100644 --- a/tests/lean/run/def5.lean +++ b/tests/lean/run/def5.lean @@ -5,7 +5,7 @@ section definition f : A → A := λ x, x - check f + #check f end -check f +#check f diff --git a/tests/lean/run/def_brec3.lean b/tests/lean/run/def_brec3.lean index 6a4b6d81b3..8621b27af7 100644 --- a/tests/lean/run/def_brec3.lean +++ b/tests/lean/run/def_brec3.lean @@ -17,4 +17,4 @@ rfl example (n : nat) (b1 b2 : bool) (v1 v2 : bv n) : map2 f (cons n b1 v1) (cons n b2 v2) = cons n (f b1 b2) (map2 f v1 v2) := rfl -print map2 +#print map2 diff --git a/tests/lean/run/def_complete_bug.lean b/tests/lean/run/def_complete_bug.lean index 2fe87a919c..1a1b7111e3 100644 --- a/tests/lean/run/def_complete_bug.lean +++ b/tests/lean/run/def_complete_bug.lean @@ -5,9 +5,9 @@ definition g : list nat → list nat → nat | (x::xs) (y::ys) := g xs ys + y | (x::xs) [] := g xs [] -print g._main.equations._eqn_1 -print g._main.equations._eqn_2 -print g._main.equations._eqn_3 -print g._main.equations._eqn_4 -print g._main.equations._eqn_5 -print g._main.equations._eqn_6 +#print g._main.equations._eqn_1 +#print g._main.equations._eqn_2 +#print g._main.equations._eqn_3 +#print g._main.equations._eqn_4 +#print g._main.equations._eqn_5 +#print g._main.equations._eqn_6 diff --git a/tests/lean/run/def_ite_value.lean b/tests/lean/run/def_ite_value.lean index f551f1fcc0..f31c2362fa 100644 --- a/tests/lean/run/def_ite_value.lean +++ b/tests/lean/run/def_ite_value.lean @@ -11,9 +11,9 @@ definition f : ∀ n : nat, bv n → nat → nat set_option pp.binder_types true -check @f._main.equations._eqn_1 -check @f._main.equations._eqn_2 -check @f._main.equations._eqn_3 +#check @f._main.equations._eqn_1 +#check @f._main.equations._eqn_2 +#check @f._main.equations._eqn_3 example (n : nat) (b : bool) (v : bv n) (x : nat) : x ≠ 1000000 → f (n+1) (cons n b v) x = f n v (x + 1) := assume H, f._main.equations._eqn_3 n b v x H diff --git a/tests/lean/run/default_field_pi.lean b/tests/lean/run/default_field_pi.lean index 4a66cf75a1..cd48fa9a5b 100644 --- a/tests/lean/run/default_field_pi.lean +++ b/tests/lean/run/default_field_pi.lean @@ -2,4 +2,4 @@ structure foo := (bar : Π n : ℕ, ℕ := id) (baz : Π {n : ℕ}, ℕ := id) -check {foo.} +#check {foo.} diff --git a/tests/lean/run/default_field_values1.lean b/tests/lean/run/default_field_values1.lean index 337f4be0c9..e581e949d3 100644 --- a/tests/lean/run/default_field_values1.lean +++ b/tests/lean/run/default_field_values1.lean @@ -7,9 +7,9 @@ structure bla (α β : Type) extends foo α β := structure boo (α : Type) extends bla α α := (d := f (f x)) -print bla.z._default -print boo.z._default -print boo.d._default +#print bla.z._default +#print boo.z._default +#print boo.d._default lemma ex₁ : {boo . x := 10, f := nat.succ, y := 10}^.z = 11 := rfl @@ -21,7 +21,7 @@ structure cfg := (x : nat := 10) (y : bool := tt) -check {cfg .} +#check {cfg .} lemma ex₃ : {cfg .} = {x := 10, y := tt} := rfl diff --git a/tests/lean/run/default_param.lean b/tests/lean/run/default_param.lean index d28eda299f..e56fd10d12 100644 --- a/tests/lean/run/default_param.lean +++ b/tests/lean/run/default_param.lean @@ -6,7 +6,7 @@ a + o example : f 1 = f 1 5 := rfl -check f 1 +#check f 1 structure config := (v1 := 10) @@ -41,7 +41,7 @@ rfl def boo (a : nat) (b : opt_param nat a) (c : opt_param bool ff) (d : opt_param config {v2 := b, flag := c}) := g a d -check boo 2 +#check boo 2 example : boo 2 = 4 := rfl @@ -58,7 +58,7 @@ set_option pp.all true meta def check_expr (p : pexpr) (t : expr) : tactic unit := do e ← to_expr p, guard (t = e) -run_command do +run_cmd do e ← to_expr `(boo 2), check_expr `(boo 2 (2:nat) ff {v1 := config.v1._default, v2 := 2, flag := ff, ps := config.ps._default}) e, e ← to_expr `(f 1), diff --git a/tests/lean/run/default_param2.lean b/tests/lean/run/default_param2.lean index db1a8955a2..7ede3a526f 100644 --- a/tests/lean/run/default_param2.lean +++ b/tests/lean/run/default_param2.lean @@ -6,7 +6,7 @@ a + o example : f 1 = f 1 5 := rfl -check f 1 +#check f 1 structure config := (v1 := 10) @@ -41,7 +41,7 @@ rfl def boo (a : nat) (b : nat := a) (c : bool := ff) (d : config := {v2 := b, flag := c}) := g a d -check boo 2 +#check boo 2 example : boo 2 = 4 := rfl @@ -58,7 +58,7 @@ set_option pp.all true meta def check_expr (p : pexpr) (t : expr) : tactic unit := do e ← to_expr p, guard (t = e) -run_command do +run_cmd do e ← to_expr `(boo 2), check_expr `(boo 2 (2:nat) ff {v1 := config.v1._default, v2 := 2, flag := ff, ps := config.ps._default}) e, e ← to_expr `(f 1), diff --git a/tests/lean/run/dep_coe_to_fn.lean b/tests/lean/run/dep_coe_to_fn.lean index 10be2341f3..95a69eaa36 100644 --- a/tests/lean/run/dep_coe_to_fn.lean +++ b/tests/lean/run/dep_coe_to_fn.lean @@ -8,4 +8,4 @@ instance F_to_fn : has_coe_to_fun Func := coe := λ f, f^.fn } variables (f : Func) (a : f^.A) (b : f^.B) -check (f a b) +#check (f a b) diff --git a/tests/lean/run/dep_coe_to_fn2.lean b/tests/lean/run/dep_coe_to_fn2.lean index 7acf9fd76c..8de9de391b 100644 --- a/tests/lean/run/dep_coe_to_fn2.lean +++ b/tests/lean/run/dep_coe_to_fn2.lean @@ -8,4 +8,4 @@ instance F_to_fn : has_coe_to_fun Func := coe := λ f, f^.fn } variables (f : Func) (a : f^.A) (b : f^.B a) -check (f a b) +#check (f a b) diff --git a/tests/lean/run/dep_coe_to_fn3.lean b/tests/lean/run/dep_coe_to_fn3.lean index 12b600e829..0b2b320eab 100644 --- a/tests/lean/run/dep_coe_to_fn3.lean +++ b/tests/lean/run/dep_coe_to_fn3.lean @@ -8,7 +8,7 @@ instance F_to_fn : has_coe_to_fun Func := coe := λ f a b, f^.fn a (f^.fn a b) } variables (f : Func) (a : f^.A) (b : f^.B a) -check (f a b) +#check (f a b) def f1 : Func := { A := nat, diff --git a/tests/lean/run/doc_string1.lean b/tests/lean/run/doc_string1.lean index f6f2ebc977..24f8d1efa1 100644 --- a/tests/lean/run/doc_string1.lean +++ b/tests/lean/run/doc_string1.lean @@ -2,7 +2,7 @@ Documentation for x ``` -eval x + x +#reduce x + x ``` Testing... -/ @@ -12,13 +12,13 @@ def y := "alo" open tactic -run_command do +run_cmd do d ← doc_string `x, trace d -run_command add_doc_string `y "testing simple doc" +run_cmd add_doc_string `y "testing simple doc" -run_command do +run_cmd do d ← doc_string `y, trace d @@ -36,7 +36,7 @@ namespace foo end bla end foo -run_command do +run_cmd do trace "--------", doc_string `foo.bla.single >>= trace @@ -45,7 +45,7 @@ run_command do foo -/ constant A : Type -run_command doc_string `A >>= trace +run_cmd doc_string `A >>= trace /--Documentation for point test @@ -54,5 +54,5 @@ test structure point := (x : nat) (y : nat) -run_command doc_string `point >>= trace -print "----------" +run_cmd doc_string `point >>= trace +#print "----------" diff --git a/tests/lean/run/doc_string2.lean b/tests/lean/run/doc_string2.lean index 1cabbb78d3..d0d96a074c 100644 --- a/tests/lean/run/doc_string2.lean +++ b/tests/lean/run/doc_string2.lean @@ -9,7 +9,7 @@ end foo open tactic -run_command do +run_cmd do trace "--------", doc_string `foo >>= trace, trace "--------", diff --git a/tests/lean/run/doc_string3.lean b/tests/lean/run/doc_string3.lean index 454422266d..0789671623 100644 --- a/tests/lean/run/doc_string3.lean +++ b/tests/lean/run/doc_string3.lean @@ -22,4 +22,4 @@ end foo -/ open tactic -run_command module_doc_strings >>= trace +run_cmd module_doc_strings >>= trace diff --git a/tests/lean/run/doc_string4.lean b/tests/lean/run/doc_string4.lean index 07798ea45d..e46d5057b9 100644 --- a/tests/lean/run/doc_string4.lean +++ b/tests/lean/run/doc_string4.lean @@ -13,7 +13,7 @@ open tactic We encode x + 1 as ``` -check aexp.plus (aexp.var "x") (aexp.val 1) +#check aexp.plus (aexp.var "x") (aexp.val 1) ``` -/ inductive aexp diff --git a/tests/lean/run/e1.lean b/tests/lean/run/e1.lean index 1cb094254d..5e0d251f9d 100644 --- a/tests/lean/run/e1.lean +++ b/tests/lean/run/e1.lean @@ -4,13 +4,13 @@ constant eq : forall {A : Type}, A → A → Prop constant N : Type constants a b c : N infix `=`:50 := eq -check a = b +#check a = b constant f : Prop → N → N constant g : N → N → N precedence `+`:50 infixl + := f infixl + := g -check a + b + c +#check a + b + c constant p : Prop -check p + a + b + c +#check p + a + b + c diff --git a/tests/lean/run/e15.lean b/tests/lean/run/e15.lean index c28f036608..4ce7da5f5d 100644 --- a/tests/lean/run/e15.lean +++ b/tests/lean/run/e15.lean @@ -8,20 +8,20 @@ inductive list (A : Sort*) | nil {} : list | cons : A → list → list namespace list end list open list -check nil -check nil.{1} -check @nil.{1} nat -check @nil nat +#check nil +#check nil.{1} +#check @nil.{1} nat +#check @nil nat -check cons zero nil +#check cons zero nil inductive vector (A : Sort*) : nat → Sort* | vnil {} : vector zero | vcons : forall {n : nat}, A → vector n → vector (succ n) namespace vector end vector open vector -check vcons zero vnil +#check vcons zero vnil constant n : nat -check vcons n vnil +#check vcons n vnil -check vector.rec +#check vector.rec diff --git a/tests/lean/run/e16.lean b/tests/lean/run/e16.lean index a92cc0a1bd..cdc9134550 100644 --- a/tests/lean/run/e16.lean +++ b/tests/lean/run/e16.lean @@ -9,20 +9,20 @@ inductive {u} list (A : Type u) : Type u | cons : A → list → list namespace list end list open list -check nil -check nil.{0} -check @nil.{0} nat -check @nil nat +#check nil +#check nil.{0} +#check @nil.{0} nat +#check @nil nat -check cons zero nil +#check cons zero nil inductive {u} vector (A : Type u) : nat → Type u | vnil {} : vector zero | vcons : forall {n : nat}, A → vector n → vector (succ n) namespace vector end vector open vector -check vcons zero vnil +#check vcons zero vnil constant n : nat -check vcons n vnil +#check vcons n vnil -check vector.rec +#check vector.rec diff --git a/tests/lean/run/e2.lean b/tests/lean/run/e2.lean index d1075ffb8f..c2dc2e2e98 100644 --- a/tests/lean/run/e2.lean +++ b/tests/lean/run/e2.lean @@ -1,3 +1,3 @@ prelude definition Prop := Type.{0} -check Prop +#check Prop diff --git a/tests/lean/run/e3.lean b/tests/lean/run/e3.lean index b4f4925550..dc574d4627 100644 --- a/tests/lean/run/e3.lean +++ b/tests/lean/run/e3.lean @@ -2,7 +2,7 @@ prelude definition Prop := Type.{0} definition false := ∀x : Prop, x -check false +#check false theorem false.elim (C : Prop) (H : false) : C := H C @@ -10,7 +10,7 @@ theorem false.elim (C : Prop) (H : false) : C definition Eq {A : Type} (a b : A) := ∀ {P : A → Prop}, P a → P b -check Eq +#check Eq infix `=`:50 := Eq diff --git a/tests/lean/run/e4.lean b/tests/lean/run/e4.lean index bba6aba47b..0619e4b1dd 100644 --- a/tests/lean/run/e4.lean +++ b/tests/lean/run/e4.lean @@ -2,7 +2,7 @@ prelude definition Prop := Sort.{0} definition false : Prop := ∀x : Prop, x -check false +#check false theorem false.elim (C : Prop) (H : false) : C := H C @@ -10,7 +10,7 @@ theorem false.elim (C : Prop) (H : false) : C definition Eq {A : Type} (a b : A) := ∀ P : A → Prop, P a → P b -check Eq +#check Eq infix `=`:50 := Eq diff --git a/tests/lean/run/e5.lean b/tests/lean/run/e5.lean index f2497853a5..8f55540780 100644 --- a/tests/lean/run/e5.lean +++ b/tests/lean/run/e5.lean @@ -2,7 +2,7 @@ prelude definition Prop := Sort.{0} definition false : Prop := ∀ x : Prop, x -check false +#check false theorem false.elim (C : Prop) (H : false) : C := H C @@ -10,7 +10,7 @@ theorem false.elim (C : Prop) (H : false) : C definition Eq {A : Type} (a b : A) := ∀ P : A → Prop, P a → P b -check Eq +#check Eq infix `=`:50 := Eq @@ -38,34 +38,34 @@ inductive nat : Type | succ : nat → nat namespace nat end nat open nat -print "using strict implicit arguments" +#print "using strict implicit arguments" definition symmetric {A : Type} (R : A → A → Prop) := ∀ ⦃a b⦄, R a b → R b a -check symmetric +#check symmetric constant p : nat → nat → Prop -check symmetric p +#check symmetric p axiom H1 : symmetric p axiom H2 : p zero (succ zero) -check H1 -check H1 H2 +#check H1 +#check H1 H2 -print "------------" -print "using implicit arguments" +#print "------------" +#print "using implicit arguments" definition symmetric2 {A : Type} (R : A → A → Prop) := ∀ {a b}, R a b → R b a -check symmetric2 -check symmetric2 p +#check symmetric2 +#check symmetric2 p axiom H3 : symmetric2 p axiom H4 : p zero (succ zero) -check H3 -check H3 H4 +#check H3 +#check H3 H4 -print "-----------------" -print "using strict implicit arguments (ASCII notation)" +#print "-----------------" +#print "using strict implicit arguments (ASCII notation)" definition symmetric3 {A : Type} (R : A → A → Prop) := ∀ {{a b}}, R a b → R b a -check symmetric3 -check symmetric3 p +#check symmetric3 +#check symmetric3 p axiom H5 : symmetric3 p axiom H6 : p zero (succ zero) -check H5 -check H5 H6 +#check H5 +#check H5 H6 diff --git a/tests/lean/run/elab3.lean b/tests/lean/run/elab3.lean index 88608ec2b5..7363cc0a57 100644 --- a/tests/lean/run/elab3.lean +++ b/tests/lean/run/elab3.lean @@ -1,3 +1,3 @@ set_option pp.binder_types true axiom Sorry {A : Sort*} : A -check (Sorry : ∀ a, a > 0) +#check (Sorry : ∀ a, a > 0) diff --git a/tests/lean/run/elab4.lean b/tests/lean/run/elab4.lean index 4a4ea5c84c..941aba1c40 100644 --- a/tests/lean/run/elab4.lean +++ b/tests/lean/run/elab4.lean @@ -1,4 +1,4 @@ -check λ (A : Type) (a b c d : A) (H1 : a = b) (H2 : c = b) (H3 : d = c), +#check λ (A : Type) (a b c d : A) (H1 : a = b) (H2 : c = b) (H3 : d = c), calc a = b : H1 ... = c : eq.symm H2 ... = d : eq.symm H3 diff --git a/tests/lean/run/elab5.lean b/tests/lean/run/elab5.lean index 5cfa9673f4..dbc930e837 100644 --- a/tests/lean/run/elab5.lean +++ b/tests/lean/run/elab5.lean @@ -1,8 +1,8 @@ set_option pp.implicit true -check (λ a b : nat, (nat.rec_on a (λ b, b) (λ a' ih b, ih b + 1) b : nat)) +#check (λ a b : nat, (nat.rec_on a (λ b, b) (λ a' ih b, ih b + 1) b : nat)) -check (λ a b : nat, (nat.rec_on a (λ b, b) (λ a' ih b, ih b + 1) b : nat)) +#check (λ a b : nat, (nat.rec_on a (λ b, b) (λ a' ih b, ih b + 1) b : nat)) constants a b c : nat constant p : nat → nat → Prop @@ -11,9 +11,9 @@ axiom H1 : p (f a) (f a) axiom H2 : a = b axiom H3 : a = c -check (eq.subst H2 H1 : p (f a) (f b)) -check (eq.subst H2 (eq.subst H3 H1) : p (f c) (f b)) +#check (eq.subst H2 H1 : p (f a) (f b)) +#check (eq.subst H2 (eq.subst H3 H1) : p (f c) (f b)) axiom H4 : a + 1 = b axiom H5 : p (a + nat.succ nat.zero) a -check (eq.subst H4 H5 : p b a) +#check (eq.subst H4 H5 : p b a) diff --git a/tests/lean/run/elab6.lean b/tests/lean/run/elab6.lean index 305143e544..60a97a1263 100644 --- a/tests/lean/run/elab6.lean +++ b/tests/lean/run/elab6.lean @@ -2,4 +2,4 @@ constants a b : nat constant p : nat → Prop constant H1 : p (a + a + a) constant H2 : a = b -check (eq.subst H2 H1 : p (a + b + a)) +#check (eq.subst H2 H1 : p (a + b + a)) diff --git a/tests/lean/run/elab_bool.lean b/tests/lean/run/elab_bool.lean index 69ae3a0bf6..2267e9dc4a 100644 --- a/tests/lean/run/elab_bool.lean +++ b/tests/lean/run/elab_bool.lean @@ -1,7 +1,7 @@ variable b : bool -check if b then tt else ff +#check if b then tt else ff -check if b && b then tt else ff +#check if b && b then tt else ff -check if b ∧ b then tt else ff +#check if b ∧ b then tt else ff diff --git a/tests/lean/run/elab_meta1.lean b/tests/lean/run/elab_meta1.lean index 74eab02d97..451cf14647 100644 --- a/tests/lean/run/elab_meta1.lean +++ b/tests/lean/run/elab_meta1.lean @@ -7,5 +7,5 @@ meta definition g : nat × nat → nat | (a+1, b+1) := g (a/2 - 1, a + b) | (a+1, 0) := 2*a -vm_eval f 200 -vm_eval g (10, 20) +#eval f 200 +#eval g (10, 20) diff --git a/tests/lean/run/empty_eq.lean b/tests/lean/run/empty_eq.lean index d4a836f38d..68da9fbb3f 100644 --- a/tests/lean/run/empty_eq.lean +++ b/tests/lean/run/empty_eq.lean @@ -10,4 +10,4 @@ definition case0 {C : Fin 0 → Type} : Π (f : Fin 0), C f . -print definition case0 +#print definition case0 diff --git a/tests/lean/run/empty_match.lean b/tests/lean/run/empty_match.lean index 23147a1c42..51a5a9fe62 100644 --- a/tests/lean/run/empty_match.lean +++ b/tests/lean/run/empty_match.lean @@ -5,4 +5,4 @@ assume H : a < 0, match H with end -check _root_.not_lt_zero +#check _root_.not_lt_zero diff --git a/tests/lean/run/empty_set_inside_quotations.lean b/tests/lean/run/empty_set_inside_quotations.lean index 11d795796d..b052ecb871 100644 --- a/tests/lean/run/empty_set_inside_quotations.lean +++ b/tests/lean/run/empty_set_inside_quotations.lean @@ -1,6 +1,6 @@ import data.set -check ({} : set nat) +#check ({} : set nat) open tactic expr @@ -8,4 +8,4 @@ meta def is_assoc_bin_app : expr → tactic (expr × expr) | (app (app op a1) a2) := do h ← to_expr `(is_associative.assoc %%op), return (op, h) | _ := failed -run_command to_expr `(({} : set nat) ∪ {}) >>= is_assoc_bin_app >>= λ p, trace p.2 +run_cmd to_expr `(({} : set nat) ∪ {}) >>= is_assoc_bin_app >>= λ p, trace p.2 diff --git a/tests/lean/run/eq20.lean b/tests/lean/run/eq20.lean index 0649779aba..952639ac54 100644 --- a/tests/lean/run/eq20.lean +++ b/tests/lean/run/eq20.lean @@ -23,6 +23,6 @@ section (if_neg h : (if p a then a :: filter l else filter l) = filter l) ▸ filter_cons a l end -check @_root_.filter -check @_root_.filter_cons_of_pos -check @_root_.filter_cons_of_neg +#check @_root_.filter +#check @_root_.filter_cons_of_pos +#check @_root_.filter_cons_of_neg diff --git a/tests/lean/run/equation_with_values.lean b/tests/lean/run/equation_with_values.lean index 99cd5d4f94..14c3a5cd68 100644 --- a/tests/lean/run/equation_with_values.lean +++ b/tests/lean/run/equation_with_values.lean @@ -6,12 +6,12 @@ def f : char → nat | #"e" := 4 | _ := 5 -check f.equations._eqn_1 -check f.equations._eqn_2 -check f.equations._eqn_3 -check f.equations._eqn_4 -check f.equations._eqn_5 -check f.equations._eqn_6 +#check f.equations._eqn_1 +#check f.equations._eqn_2 +#check f.equations._eqn_3 +#check f.equations._eqn_4 +#check f.equations._eqn_5 +#check f.equations._eqn_6 def g : nat → nat | 100000 := 0 @@ -20,11 +20,11 @@ def g : nat → nat | 400000 := 3 | _ := 5 -check g.equations._eqn_1 -check g.equations._eqn_2 -check g.equations._eqn_3 -check g.equations._eqn_4 -check g.equations._eqn_5 +#check g.equations._eqn_1 +#check g.equations._eqn_2 +#check g.equations._eqn_3 +#check g.equations._eqn_4 +#check g.equations._eqn_5 def h : string → nat | "hello" := 0 @@ -33,19 +33,19 @@ def h : string → nat | "boo" := 3 | _ := 5 -check h.equations._eqn_1 -check h.equations._eqn_2 -check h.equations._eqn_3 -check h.equations._eqn_4 -check h.equations._eqn_5 +#check h.equations._eqn_1 +#check h.equations._eqn_2 +#check h.equations._eqn_3 +#check h.equations._eqn_4 +#check h.equations._eqn_5 def r : string × string → nat | ("hello", "world") := 0 | ("world", "hello") := 1 | _ := 2 -check r.equations._eqn_1 -check r.equations._eqn_2 -check r.equations._eqn_3 -check r.equations._eqn_4 -check r.equations._eqn_5 +#check r.equations._eqn_1 +#check r.equations._eqn_2 +#check r.equations._eqn_3 +#check r.equations._eqn_4 +#check r.equations._eqn_5 diff --git a/tests/lean/run/eval_attr_cache.lean b/tests/lean/run/eval_attr_cache.lean index aaf02f48a8..8ba58ebb7c 100644 --- a/tests/lean/run/eval_attr_cache.lean +++ b/tests/lean/run/eval_attr_cache.lean @@ -11,7 +11,7 @@ meta def my_attr : caching_user_attribute (name → bool) := dependencies := [] } -run_command attribute.register `my_attr +run_cmd attribute.register `my_attr meta def my_tac : tactic unit := do f ← caching_user_attribute.get_cache my_attr, @@ -19,8 +19,8 @@ do f ← caching_user_attribute.get_cache my_attr, return () @[my_attr] def bla := 10 -run_command my_tac +run_cmd my_tac @[my_attr] def foo := 10 -- Cache was invalided -run_command my_tac -- Add closure to the cache containing auxiliary function created by eval_expr -run_command my_tac -- Cache should be flushed since the auxiliary function is gone +run_cmd my_tac -- Add closure to the cache containing auxiliary function created by eval_expr +run_cmd my_tac -- Cache should be flushed since the auxiliary function is gone diff --git a/tests/lean/run/eval_constant.lean b/tests/lean/run/eval_constant.lean index b7f862dc6b..3a27af08d3 100644 --- a/tests/lean/run/eval_constant.lean +++ b/tests/lean/run/eval_constant.lean @@ -1,11 +1,11 @@ open tactic -run_command do +run_cmd do e ← to_expr `(nat.add), fn ← eval_expr (nat → nat → nat) e, trace (fn 10 20) -run_command do +run_cmd do e ← to_expr `(λ x y : nat, x + x + y), fn ← eval_expr (nat → nat → nat) e, trace (fn 10 20) diff --git a/tests/lean/run/eval_expr_bug.lean b/tests/lean/run/eval_expr_bug.lean index f58f437bf1..4002e3d6b0 100644 --- a/tests/lean/run/eval_expr_bug.lean +++ b/tests/lean/run/eval_expr_bug.lean @@ -2,5 +2,5 @@ open tactic meta def a : nat := 10 -run_command eval_expr nat (expr.const `a []) -run_command eval_expr nat (expr.const `a []) >>= trace +run_cmd eval_expr nat (expr.const `a []) +run_cmd eval_expr nat (expr.const `a []) >>= trace diff --git a/tests/lean/run/eval_expr_partial.lean b/tests/lean/run/eval_expr_partial.lean index 0d2a9f0f4b..bbdb4ea7b4 100644 --- a/tests/lean/run/eval_expr_partial.lean +++ b/tests/lean/run/eval_expr_partial.lean @@ -1,3 +1,3 @@ open tactic -run_command to_expr `(bit0 1) >>= eval_expr nat >>= tactic.trace +run_cmd to_expr `(bit0 1) >>= eval_expr nat >>= tactic.trace diff --git a/tests/lean/run/even_perf.lean b/tests/lean/run/even_perf.lean index 5914dea3f3..04a5f9a3d1 100644 --- a/tests/lean/run/even_perf.lean +++ b/tests/lean/run/even_perf.lean @@ -5,8 +5,8 @@ def even : nat → bool | (succ 0) := ff | (succ (succ n)) := even n -vm_eval even 0 -vm_eval even 1 -vm_eval even 2 -vm_eval even 10000 -vm_eval even 10001 +#eval even 0 +#eval even 1 +#eval even 2 +#eval even 10000 +#eval even 10001 diff --git a/tests/lean/run/ex.lean b/tests/lean/run/ex.lean index b79fabc8f6..3617ee53fc 100644 --- a/tests/lean/run/ex.lean +++ b/tests/lean/run/ex.lean @@ -1,3 +1,3 @@ set_option pp.implicit true -check ∃x, x = (0:num) -check ∃x:num, x = 0 +#check ∃x, x = (0:num) +#check ∃x:num, x = 0 diff --git a/tests/lean/run/export.lean b/tests/lean/run/export.lean index ffbe460323..b86c085248 100644 --- a/tests/lean/run/export.lean +++ b/tests/lean/run/export.lean @@ -2,10 +2,10 @@ constants a b : nat namespace boo export nat (rec add) - check a + b - check nat.add + #check a + b + #check nat.add end boo open boo -check a + b -check nat.rec +#check a + b +#check nat.rec diff --git a/tests/lean/run/fib_wrec.lean b/tests/lean/run/fib_wrec.lean index c0e0eca5e0..cdfeab70e6 100644 --- a/tests/lean/run/fib_wrec.lean +++ b/tests/lean/run/fib_wrec.lean @@ -35,6 +35,6 @@ example : fib 6 = 13 := rfl -/ -print "------------" -eval fib 10 -vm_eval fib 10 +#print "------------" +#reduce fib 10 +#eval fib 10 diff --git a/tests/lean/run/fingerprint.lean b/tests/lean/run/fingerprint.lean index 7d613f90d5..b7ace0832b 100644 --- a/tests/lean/run/fingerprint.lean +++ b/tests/lean/run/fingerprint.lean @@ -1,6 +1,6 @@ open tactic meta def nat.to_expr (n : nat) : tactic expr := to_expr (quote n) -run_command attribute.fingerprint `reducible >>= trace +run_cmd attribute.fingerprint `reducible >>= trace definition ex0 : nat := by attribute.fingerprint `reducible >>= nat.to_expr >>= exact @@ -8,21 +8,21 @@ by attribute.fingerprint `reducible >>= nat.to_expr >>= exact attribute [reducible] definition f : nat := 10 -run_command attribute.fingerprint `reducible >>= trace +run_cmd attribute.fingerprint `reducible >>= trace definition ex1 : nat := by attribute.fingerprint `reducible >>= nat.to_expr >>= exact -vm_eval ex1 +#eval ex1 definition g : nat := 20 -run_command attribute.fingerprint `reducible >>= trace +run_cmd attribute.fingerprint `reducible >>= trace definition ex2 : nat := by attribute.fingerprint `reducible >>= nat.to_expr >>= exact -vm_eval ex2 +#eval ex2 example : ex1 = ex2 := rfl diff --git a/tests/lean/run/fn_default.lean b/tests/lean/run/fn_default.lean index ec61be1831..a7036865aa 100644 --- a/tests/lean/run/fn_default.lean +++ b/tests/lean/run/fn_default.lean @@ -3,4 +3,4 @@ structure foo := (baz : Π {n : ℕ}, ℕ := id) (bat : Π n : ℕ, ℕ := λ n, n) -check {foo.} +#check {foo.} diff --git a/tests/lean/run/format.lean b/tests/lean/run/format.lean index d6f61cdbfd..4d02e0d295 100644 --- a/tests/lean/run/format.lean +++ b/tests/lean/run/format.lean @@ -1,6 +1,6 @@ import system.io open list -vm_eval pp ([["aaa", "bbb", "ccc", "dddd", "eeeeee", "ffffff"], ["aaa", "bbb", "ccc", "dddd", "eeeeee", "ffffff"], +#eval pp ([["aaa", "bbb", "ccc", "dddd", "eeeeee", "ffffff"], ["aaa", "bbb", "ccc", "dddd", "eeeeee", "ffffff"], ["aaa", "bbb", "ccc", "dddd", "eeeeee", "ffffff"], ["aaa", "bbb", "ccc", "dddd", "eeeeee", "ffffff"]], [(10:nat), 20, 30]) diff --git a/tests/lean/run/full.lean b/tests/lean/run/full.lean index 880dbc5ee7..dd6f1857d3 100644 --- a/tests/lean/run/full.lean +++ b/tests/lean/run/full.lean @@ -1,7 +1,7 @@ namespace foo constant x : num - check x - check x + #check x + #check x set_option pp.full_names true - check x + #check x end foo diff --git a/tests/lean/run/fun.lean b/tests/lean/run/fun.lean index 5f01923737..b39685269a 100644 --- a/tests/lean/run/fun.lean +++ b/tests/lean/run/fun.lean @@ -4,18 +4,18 @@ open function bool constant f : num → bool constant g : num → num -check f ∘ g ∘ g +#check f ∘ g ∘ g -check (id : num → num) +#check (id : num → num) constant h : num → bool → num -check swap h -check swap h ff num.zero +#check swap h +#check swap h ff num.zero -check (swap h ff num.zero : num) +#check (swap h ff num.zero : num) constant f1 : num → num → bool constant f2 : bool → num -check (f1 on f2) ff tt +#check (f1 on f2) ff tt diff --git a/tests/lean/run/hash_map1.lean b/tests/lean/run/hash_map1.lean index 4da19a44cb..9580a489ae 100644 --- a/tests/lean/run/hash_map1.lean +++ b/tests/lean/run/hash_map1.lean @@ -12,18 +12,18 @@ mk_nat2string^.insert 1 "hello" def m2 : nat2string := (m1^.insert 2 "world")^.insert 3 "test" -vm_eval m1^.contains 1 +#eval m1^.contains 1 -vm_eval m2 +#eval m2 -vm_eval m2^.insert 1 "foo" +#eval m2^.insert 1 "foo" -vm_eval m2^.size +#eval m2^.size -vm_eval m2^.find 1 +#eval m2^.find 1 -vm_eval m2^.find 10 +#eval m2^.find 10 -vm_eval m2^.erase 10 +#eval m2^.erase 10 -vm_eval m2^.erase 2 +#eval m2^.erase 2 diff --git a/tests/lean/run/have1.lean b/tests/lean/run/have1.lean index aae47af585..8f9ed54dac 100644 --- a/tests/lean/run/have1.lean +++ b/tests/lean/run/have1.lean @@ -4,6 +4,6 @@ constants a b c : Prop axiom Ha : a axiom Hb : b axiom Hc : c -check have H1 : a, from Ha, +#check have H1 : a, from Ha, have H2 : a, from H1, H2 diff --git a/tests/lean/run/have2.lean b/tests/lean/run/have2.lean index aae47af585..8f9ed54dac 100644 --- a/tests/lean/run/have2.lean +++ b/tests/lean/run/have2.lean @@ -4,6 +4,6 @@ constants a b c : Prop axiom Ha : a axiom Hb : b axiom Hc : c -check have H1 : a, from Ha, +#check have H1 : a, from Ha, have H2 : a, from H1, H2 diff --git a/tests/lean/run/have3.lean b/tests/lean/run/have3.lean index 20c9adcf6e..829f74a192 100644 --- a/tests/lean/run/have3.lean +++ b/tests/lean/run/have3.lean @@ -4,7 +4,7 @@ constants a b c : Prop axiom Ha : a axiom Hb : b axiom Hc : c -check have H1 : a, from Ha, +#check have H1 : a, from Ha, then have H2 : a, from H1, then have H3 : a, from H2, then have H4 : a, from H3, diff --git a/tests/lean/run/have4.lean b/tests/lean/run/have4.lean index 754df07132..9d3d899316 100644 --- a/tests/lean/run/have4.lean +++ b/tests/lean/run/have4.lean @@ -4,7 +4,7 @@ constants a b c : Prop axiom Ha : a axiom Hb : b axiom Hc : c -check have H1 : a, from Ha, +#check have H1 : a, from Ha, then have H2 : a, from H1, have H3 : a, from H2, then have H4 : a, from H3, diff --git a/tests/lean/run/have6.lean b/tests/lean/run/have6.lean index a0623ab631..277f5f43bd 100644 --- a/tests/lean/run/have6.lean +++ b/tests/lean/run/have6.lean @@ -7,7 +7,7 @@ constants a b c d : Prop axiom Ha : a axiom Hb : b axiom Hc : c -check +#check have a ∧ b, from and_intro a b Ha Hb, have b ∧ a, from and_intro b a Hb Ha, have H : a ∧ b, from and_intro a b Ha Hb, diff --git a/tests/lean/run/help_cmd.lean b/tests/lean/run/help_cmd.lean index 40e247fee6..202dc769f5 100644 --- a/tests/lean/run/help_cmd.lean +++ b/tests/lean/run/help_cmd.lean @@ -1,5 +1,5 @@ -help options +#help options -help commands +#help commands -print options +#print options diff --git a/tests/lean/run/hinst_lemmas1.lean b/tests/lean/run/hinst_lemmas1.lean index 42f5e2067d..d94d631e48 100644 --- a/tests/lean/run/hinst_lemmas1.lean +++ b/tests/lean/run/hinst_lemmas1.lean @@ -1,4 +1,4 @@ -run_command +run_cmd do tactic.trace "hinst_lemmas example:", hs ← return $ hinst_lemmas.mk, diff --git a/tests/lean/run/ho.lean b/tests/lean/run/ho.lean index d8b6edb42a..ac2740b444 100644 --- a/tests/lean/run/ho.lean +++ b/tests/lean/run/ho.lean @@ -2,8 +2,8 @@ inductive star : Type | z : star | s : (nat → star) → star -check @star.rec -check @star.cases_on +#check @star.rec +#check @star.cases_on example (f : nat → star) : ¬ star.z = star.s f := assume H, star.no_confusion H diff --git a/tests/lean/run/id.lean b/tests/lean/run/id.lean index 1b621eb9a2..d4f49f8434 100644 --- a/tests/lean/run/id.lean +++ b/tests/lean/run/id.lean @@ -1,10 +1,10 @@ -check id id +#check id id set_option pp.universes true -check id id -check id Prop -check id num -check @id.{0} -check @id.{1} -check id num.zero -check @eq -check eq eq +#check id id +#check id Prop +#check id num +#check @id.{0} +#check @id.{1} +#check id num.zero +#check @eq +#check eq eq diff --git a/tests/lean/run/if_dollar_prec.lean b/tests/lean/run/if_dollar_prec.lean index 768b6087ad..5a07d154da 100644 --- a/tests/lean/run/if_dollar_prec.lean +++ b/tests/lean/run/if_dollar_prec.lean @@ -1 +1 @@ -check if tt then tt else id $ ff +#check if tt then tt else id $ ff diff --git a/tests/lean/run/imp.lean b/tests/lean/run/imp.lean index a3027e742d..2bac495d15 100644 --- a/tests/lean/run/imp.lean +++ b/tests/lean/run/imp.lean @@ -2,11 +2,11 @@ constant N : Type.{1} constants a b c : N constant f : forall {a b : N}, N → N -check f -check @f -check @f a -check @f a b -check @f a b c +#check f +#check @f +#check @f a +#check @f a b +#check @f a b c noncomputable definition l1 : N → N → N → N := @f noncomputable definition l2 : N → N → N := @f a @@ -15,12 +15,12 @@ noncomputable definition l4 : N := @f a b c constant g : forall ⦃a b : N⦄, N → N -check g -check g a -check @g -check @g a -check @g a b -check @g a b c +#check g +#check g a +#check @g +#check @g a +#check @g a b +#check @g a b c noncomputable definition l5 : N → N → N → N := @g noncomputable definition l6 : N → N → N := @g a diff --git a/tests/lean/run/imp2.lean b/tests/lean/run/imp2.lean index 49a8c8362d..14b6b0bae3 100644 --- a/tests/lean/run/imp2.lean +++ b/tests/lean/run/imp2.lean @@ -1,4 +1,4 @@ -check (λ {A : Type} (a : A), a) (10:num) +#check (λ {A : Type} (a : A), a) (10:num) set_option trace.app_builder true -check (λ {A} (a : A), a) 10 -check (λ a, a) (10:num) +#check (λ {A} (a : A), a) 10 +#check (λ a, a) (10:num) diff --git a/tests/lean/run/imp3.lean b/tests/lean/run/imp3.lean index b8917e6eae..c77cda007b 100644 --- a/tests/lean/run/imp3.lean +++ b/tests/lean/run/imp3.lean @@ -1,12 +1,12 @@ structure [class] is_equiv {A B : Type} (f : A → B) := (inv : B → A) -check @is_equiv.inv +#check @is_equiv.inv namespace is_equiv section parameters A B : Type parameter f : A → B parameter c : is_equiv f - check inv f + #check inv f end end is_equiv diff --git a/tests/lean/run/implicit.lean b/tests/lean/run/implicit.lean index e0c2a6d908..cdd13ea843 100644 --- a/tests/lean/run/implicit.lean +++ b/tests/lean/run/implicit.lean @@ -4,4 +4,4 @@ definition f {A : Type} {B : Type} (f : A → B → Prop) ⦃C : Type⦄ {R : C constant g : Prop → Prop → Prop constant H : true ∧ true -check f g H +#check f g H diff --git a/tests/lean/run/ind0.lean b/tests/lean/run/ind0.lean index 2caef9b45c..2c5db4fb06 100644 --- a/tests/lean/run/ind0.lean +++ b/tests/lean/run/ind0.lean @@ -3,5 +3,5 @@ inductive nat : Type | zero : nat | succ : nat → nat -check nat -check nat.rec.{1} +#check nat +#check nat.rec.{1} diff --git a/tests/lean/run/ind1.lean b/tests/lean/run/ind1.lean index cc19630514..4325598a1f 100644 --- a/tests/lean/run/ind1.lean +++ b/tests/lean/run/ind1.lean @@ -2,6 +2,6 @@ inductive List (A : Sort*) : Sort* | nil : List | cons : A → List → List namespace List end List open List -check List.{1} -check cons.{1} -check List.rec.{1 1} +#check List.{1} +#check cons.{1} +#check List.rec.{1 1} diff --git a/tests/lean/run/ind2.lean b/tests/lean/run/ind2.lean index 133a3b65c6..9e0be79dec 100644 --- a/tests/lean/run/ind2.lean +++ b/tests/lean/run/ind2.lean @@ -8,7 +8,7 @@ inductive {u} vector (A : Type u) : nat → Type u | vnil : vector zero | vcons : Π {n : nat}, A → vector n → vector (succ n) namespace vector end vector open vector -check vector.{1} -check vnil.{1} -check vcons.{1} -check vector.rec.{1 1} +#check vector.{1} +#check vnil.{1} +#check vcons.{1} +#check vector.rec.{1 1} diff --git a/tests/lean/run/ind3.lean b/tests/lean/run/ind3.lean index be676f4d25..2850b28f25 100644 --- a/tests/lean/run/ind3.lean +++ b/tests/lean/run/ind3.lean @@ -1,4 +1,4 @@ -exit +#exit inductive tree (A : Type) : Type := | node : A → forest A → tree A with forest : Type := @@ -6,16 +6,16 @@ with forest : Type := | cons : tree A → forest A → forest A -check tree.{1} -check forest.{1} -check tree.rec.{1 1} -check forest.rec.{1 1} +#check tree.{1} +#check forest.{1} +#check tree.rec.{1 1} +#check forest.rec.{1 1} -print "===============" +#print "===============" inductive group : Type := mk_group : Π (carrier : Type) (mul : carrier → carrier → carrier) (one : carrier), group -check group.{1} -check group.{2} -check group.rec.{1 1} +#check group.{1} +#check group.{2} +#check group.rec.{1 1} diff --git a/tests/lean/run/ind5.lean b/tests/lean/run/ind5.lean index abf0251f52..6fc537c951 100644 --- a/tests/lean/run/ind5.lean +++ b/tests/lean/run/ind5.lean @@ -5,6 +5,6 @@ inductive or (A B : Prop) : Prop | intro_left : A → or | intro_right : B → or -check or -check or.intro_left -check or.rec +#check or +#check or.intro_left +#check or.rec diff --git a/tests/lean/run/ind6.lean b/tests/lean/run/ind6.lean index 52faaf33ef..ad1c594e99 100644 --- a/tests/lean/run/ind6.lean +++ b/tests/lean/run/ind6.lean @@ -1,11 +1,11 @@ -exit +#exit inductive tree.{u} (A : Type.{u}) : Type.{max u 1} := | node : A → forest.{u} A → tree.{u} A with forest : Type.{max u 1} := | nil : forest.{u} A | cons : tree.{u} A → forest.{u} A → forest.{u} A -check tree.{1} -check forest.{1} -check tree.rec.{1 1} -check forest.rec.{1 1} +#check tree.{1} +#check forest.{1} +#check tree.rec.{1 1} +#check forest.rec.{1 1} diff --git a/tests/lean/run/ind7.lean b/tests/lean/run/ind7.lean index 55414098d3..52f13c1b87 100644 --- a/tests/lean/run/ind7.lean +++ b/tests/lean/run/ind7.lean @@ -3,9 +3,9 @@ namespace list | nil : list | cons : A → list → list - check list.{1} - check list.cons.{1} - check list.rec.{1 1} + #check list.{1} + #check list.cons.{1} + #check list.rec.{1 1} end list -check list.list.{1} +#check list.list.{1} diff --git a/tests/lean/run/ind8.lean b/tests/lean/run/ind8.lean index 796817a303..fedeb032fa 100644 --- a/tests/lean/run/ind8.lean +++ b/tests/lean/run/ind8.lean @@ -1,18 +1,18 @@ inductive Pair1 (A B : Type) | mk ( ) : A → B → Pair1 -check Pair1.mk +#check Pair1.mk -check Pair1.mk Prop Prop true false +#check Pair1.mk Prop Prop true false inductive Pair2 {A : Type} (B : A → Type) | mk ( ) : Π (a : A), B a → Pair2 -check @Pair2.mk +#check @Pair2.mk -check Pair2.mk (λx, Prop) true false +#check Pair2.mk (λx, Prop) true false inductive Pair3 (A B : Type) | mk : A → B → Pair3 -check Pair3.mk true false +#check Pair3.mk true false diff --git a/tests/lean/run/ind_cnst_params.lean b/tests/lean/run/ind_cnst_params.lean index 73c691ee7c..86c745fd9d 100644 --- a/tests/lean/run/ind_cnst_params.lean +++ b/tests/lean/run/ind_cnst_params.lean @@ -1,9 +1,9 @@ inductive foo | mk (a : nat) (b : nat) : bool → foo -print foo.mk +#print foo.mk -check foo.mk 0 0 tt +#check foo.mk 0 0 tt universe variables u @@ -11,5 +11,5 @@ inductive List (α : Type u) | nil {} (a : nat) : List | cons (hd : α) (tail : List) : List -check List.cons "a" (List.nil 1) -check List.cons "a" (List.nil 2) +#check List.cons "a" (List.nil 1) +#check List.cons "a" (List.nil 2) diff --git a/tests/lean/run/ind_ns.lean b/tests/lean/run/ind_ns.lean index b00a3168db..2c963e0c4a 100644 --- a/tests/lean/run/ind_ns.lean +++ b/tests/lean/run/ind_ns.lean @@ -1,6 +1,6 @@ inductive day | monday | tuesday | wednesday | thursday | friday | saturday | sunday -check day.monday +#check day.monday open day -check monday +#check monday diff --git a/tests/lean/run/ind_tac1.lean b/tests/lean/run/ind_tac1.lean index 160bbad575..18220e2562 100644 --- a/tests/lean/run/ind_tac1.lean +++ b/tests/lean/run/ind_tac1.lean @@ -1,5 +1,5 @@ -check @heq.rec_on +#check @heq.rec_on attribute [recursor 6] heq.rec_on -print [recursor] heq.rec_on +#print [recursor] heq.rec_on diff --git a/tests/lean/run/induction_on.lean b/tests/lean/run/induction_on.lean index f8016f980f..13b9b645ec 100644 --- a/tests/lean/run/induction_on.lean +++ b/tests/lean/run/induction_on.lean @@ -3,9 +3,9 @@ set_option pp.all true structure p1 := (x : nat) -check @p1.induction_on +#check @p1.induction_on inductive p2 | mk : nat → p2 -check @p2.induction_on +#check @p2.induction_on diff --git a/tests/lean/run/inductive_nonrec_after_rec.lean b/tests/lean/run/inductive_nonrec_after_rec.lean index 3136f1f087..5068e98412 100644 --- a/tests/lean/run/inductive_nonrec_after_rec.lean +++ b/tests/lean/run/inductive_nonrec_after_rec.lean @@ -10,9 +10,9 @@ def tree.size {α : Type u} : tree α → nat | leaf := 0 | (node l a r) := tree.size l + tree.size r + 1 -vm_eval tree.size (@leaf nat) -vm_eval tree.size (tree.node leaf 1 leaf) -vm_eval tree.size (tree.node (tree.node leaf 1 leaf) 2 leaf) +#eval tree.size (@leaf nat) +#eval tree.size (tree.node leaf 1 leaf) +#eval tree.size (tree.node (tree.node leaf 1 leaf) 2 leaf) lemma ex1 : tree.size (tree.node (tree.node leaf 1 leaf) 2 leaf) = 2 := rfl @@ -27,7 +27,7 @@ def tree.elems_core {α : Type u} : tree α → list α → list α def tree.elems {α : Type u} (t : tree α) : list α := (tree.elems_core t [])^.reverse -vm_eval tree.elems (tree.node (tree.node (tree.node leaf 0 leaf) 1 leaf) 2 leaf) +#eval tree.elems (tree.node (tree.node (tree.node leaf 0 leaf) 1 leaf) 2 leaf) lemma ex2 : tree.elems (tree.node (tree.node (tree.node leaf 0 leaf) 1 leaf) 2 leaf) = [0, 1, 2] := rfl diff --git a/tests/lean/run/infix_paren.lean b/tests/lean/run/infix_paren.lean index 2b411957c6..0b71264bf1 100644 --- a/tests/lean/run/infix_paren.lean +++ b/tests/lean/run/infix_paren.lean @@ -1,8 +1,8 @@ open list -vm_eval filter (< 10) [20, 5, 10, 3, 2, 14, 1] -vm_eval qsort (<) [20, 5, 10, 3, 2, 14, 1] -vm_eval foldl (+) 0 [1, 2, 3] +#eval filter (< 10) [20, 5, 10, 3, 2, 14, 1] +#eval qsort (<) [20, 5, 10, 3, 2, 14, 1] +#eval foldl (+) 0 [1, 2, 3] example : foldl (+) 0 [3, 4, 1] = 8 := rfl @@ -10,7 +10,7 @@ rfl example : foldl (*) 2 [3, 4, 1] = 24 := rfl -check (+) 1 2 +#check (+) 1 2 example : (+) 1 2 = 3 := rfl diff --git a/tests/lean/run/injection1.lean b/tests/lean/run/injection1.lean index 9b4513e72e..3a19ed4ac4 100644 --- a/tests/lean/run/injection1.lean +++ b/tests/lean/run/injection1.lean @@ -20,7 +20,7 @@ by do trace_state, assumption -print "----------------" +#print "----------------" example (a b : nat) : succ a = succ b → a = b := by do diff --git a/tests/lean/run/inliner_bug.lean b/tests/lean/run/inliner_bug.lean index e939a2132b..88ca4122a7 100644 --- a/tests/lean/run/inliner_bug.lean +++ b/tests/lean/run/inliner_bug.lean @@ -1,4 +1,4 @@ @[inline] def g (n : nat) : nat := nat.rec_on n 0 (λ m r, r + 2) -vm_eval g 10 +#eval g 10 diff --git a/tests/lean/run/int_eq_num.lean b/tests/lean/run/int_eq_num.lean index 60acc02496..fcc01cafe0 100644 --- a/tests/lean/run/int_eq_num.lean +++ b/tests/lean/run/int_eq_num.lean @@ -4,7 +4,7 @@ def f : int → nat | 3 := 2 | _ := 4 -vm_eval f (-100) -vm_eval f 0 -vm_eval f 3 -vm_eval f 5 +#eval f (-100) +#eval f 0 +#eval f 3 +#eval f 5 diff --git a/tests/lean/run/io_state.lean b/tests/lean/run/io_state.lean index d148a30316..7798a38c7a 100644 --- a/tests/lean/run/io_state.lean +++ b/tests/lean/run/io_state.lean @@ -14,4 +14,4 @@ do x ← read, put_ln y, put_str "end of program" -vm_eval tst 5 +#eval tst 5 diff --git a/tests/lean/run/kcomp.lean b/tests/lean/run/kcomp.lean index bada12ea11..d86373cfff 100644 --- a/tests/lean/run/kcomp.lean +++ b/tests/lean/run/kcomp.lean @@ -6,19 +6,19 @@ constant H₁ : a = a constant H₂ : P a constant H₃ : a = b constant f {A : Type} (a : A) : a = a -eval (eq.rec H₂ (@f A a) : P a) -eval (eq.rec H₂ H₁ : P a) -eval (eq.rec H₂ H₃ : P b) -eval (eq.rec H₂ (@eq.refl A a) : P a) +#reduce (eq.rec H₂ (@f A a) : P a) +#reduce (eq.rec H₂ H₁ : P a) +#reduce (eq.rec H₂ H₃ : P b) +#reduce (eq.rec H₂ (@eq.refl A a) : P a) -- eval λ (A : Type) (a b : A) (H₁ : a = a) (P : A → Prop) (H₂ : P a) (H₃ : a = a) (c : A), eq.rec (eq.rec H₂ H₁) H₃ -check @eq.rec A a P H₂ a -check λ H : a = a, H₂ +#check @eq.rec A a P H₂ a +#check λ H : a = a, H₂ inductive to_type {B : Type} : B → Type | mk : Π (b : B), to_type b noncomputable definition tst1 : to_type (λ H : a = a, H₂) := to_type.mk (@eq.rec A a P H₂ a) -check to_type.mk(λ H : a = a, H₂) -check to_type.mk(@eq.rec A a P H₂ a) -check to_type.mk(λ H : a = a, H₂) = to_type.mk(@eq.rec A a P H₂ a) --- check to_type.mk(eq.rec H₂ H₁) = to_type.mk(H₂) --- check to_type.mk(eq.rec H₂ (f a)) = to_type.mk(H₂) +#check to_type.mk(λ H : a = a, H₂) +#check to_type.mk(@eq.rec A a P H₂ a) +#check to_type.mk(λ H : a = a, H₂) = to_type.mk(@eq.rec A a P H₂ a) +-- #check to_type.mk(eq.rec H₂ H₁) = to_type.mk(H₂) +-- #check to_type.mk(eq.rec H₂ (f a)) = to_type.mk(H₂) diff --git a/tests/lean/run/lambda_simp.lean b/tests/lean/run/lambda_simp.lean index f12fab9d06..280639ecf2 100644 --- a/tests/lean/run/lambda_simp.lean +++ b/tests/lean/run/lambda_simp.lean @@ -1,4 +1,4 @@ -print [simp] default +#print [simp] default constant addz (a : nat) : 0 + a = a attribute [simp] addz @@ -8,4 +8,4 @@ open tactic def ex : (λ a b : nat, 0 + a) = (λ a b, a) := by simp -print ex +#print ex diff --git a/tests/lean/run/let1.lean b/tests/lean/run/let1.lean index 3c7d3868e0..1ab0677883 100644 --- a/tests/lean/run/let1.lean +++ b/tests/lean/run/let1.lean @@ -1,4 +1,4 @@ -check +#check let f x y := x ∧ y, g x := f x x, a := g true diff --git a/tests/lean/run/let2.lean b/tests/lean/run/let2.lean index e37b9f9b4b..07535a5b05 100644 --- a/tests/lean/run/let2.lean +++ b/tests/lean/run/let2.lean @@ -18,4 +18,4 @@ definition b := a := a ∧ a in a -check b +#check b diff --git a/tests/lean/run/let3.lean b/tests/lean/run/let3.lean index 1987d9cd50..ac3e977f10 100644 --- a/tests/lean/run/let3.lean +++ b/tests/lean/run/let3.lean @@ -29,10 +29,10 @@ One limitation is that the expexted type of the let-expression must be known. TODO(Leo): improve visit_convoy in the elaborator, and remove this restriction. -/ -vm_eval +#eval (let (a, b, c) := p1 in a + b : nat) -- We have to provide the type. -vm_eval +#eval (let (a, b) := p1, (c, d) := b in c + d : nat) diff --git a/tests/lean/run/lift.lean b/tests/lean/run/lift.lean index 97e0c11eec..fc6c114ae7 100644 --- a/tests/lean/run/lift.lean +++ b/tests/lean/run/lift.lean @@ -18,8 +18,8 @@ lift.induction_on a' (λ a, rfl) end lift set_option pp.universes true -check nat -check lift nat +#check nat +#check lift nat open lift definition one1 : lift nat := up 1 end test diff --git a/tests/lean/run/lift2.lean b/tests/lean/run/lift2.lean index c045e507e9..3b89e45984 100644 --- a/tests/lean/run/lift2.lean +++ b/tests/lean/run/lift2.lean @@ -5,9 +5,9 @@ inductive {u₁ u₂} lift (A : Type u₁) : Type (max 1 u₁ u₂) set_option pp.universes true variables (A : Type 3) (B : Type 1) -check A = lift.{1 3} B +#check A = lift.{1 3} B universe variables u variables (C : Type (u+2)) (D : Type u) -check C = lift.{u u+2} D +#check C = lift.{u u+2} D end test diff --git a/tests/lean/run/lift_nested_rec.lean b/tests/lean/run/lift_nested_rec.lean index 3a59050642..32a3d7eca3 100644 --- a/tests/lean/run/lift_nested_rec.lean +++ b/tests/lean/run/lift_nested_rec.lean @@ -5,6 +5,6 @@ definition f : nat → (nat × nat) → nat | (a, b) := (f n (b, a + 1)) + (f n (a, b)) end -check @f._main.equations._eqn_1 -check @f._main.equations._eqn_2 -check @f._match_1.equations._eqn_1 +#check @f._main.equations._eqn_1 +#check @f._main.equations._eqn_2 +#check @f._match_1.equations._eqn_1 diff --git a/tests/lean/run/list_notation.lean b/tests/lean/run/list_notation.lean index 53994023f7..f8447b0794 100644 --- a/tests/lean/run/list_notation.lean +++ b/tests/lean/run/list_notation.lean @@ -1,27 +1,27 @@ open nat -vm_eval [1, 2, 3] +#eval [1, 2, 3] -vm_eval to_bool $ 1 ∈ [1, 2, 3] +#eval to_bool $ 1 ∈ [1, 2, 3] -vm_eval to_bool $ 4 ∈ [1, 2, 3] +#eval to_bool $ 4 ∈ [1, 2, 3] -vm_eval [1, 2, 3] ++ [3, 4] +#eval [1, 2, 3] ++ [3, 4] -vm_eval 2 :: [3, 4] +#eval 2 :: [3, 4] -vm_eval ([] : list nat) +#eval ([] : list nat) -vm_eval (∅ : list nat) +#eval (∅ : list nat) -vm_eval ({1, 3, 2, 2, 3, 1} : list nat) +#eval ({1, 3, 2, 2, 3, 1} : list nat) -vm_eval [1, 2, 3] ∪ [3, 4, 1, 5] +#eval [1, 2, 3] ∪ [3, 4, 1, 5] -vm_eval [1, 2, 3] ∩ [3, 4, 1, 5] +#eval [1, 2, 3] ∩ [3, 4, 1, 5] -vm_eval (mul 10) <$> [1, 2, 3] +#eval (mul 10) <$> [1, 2, 3] -check ({1, 2, 3} : list nat) +#check ({1, 2, 3} : list nat) -check ({1, 2, 3, 4} : set nat) +#check ({1, 2, 3, 4} : set nat) diff --git a/tests/lean/run/local_notation.lean b/tests/lean/run/local_notation.lean index 30e4d7dc18..810105ac27 100644 --- a/tests/lean/run/local_notation.lean +++ b/tests/lean/run/local_notation.lean @@ -4,6 +4,6 @@ section local infixl `+++`:10 := f variables a b c : A - check f a b - check a +++ b + #check f a b + #check a +++ b end diff --git a/tests/lean/run/match_expr2.lean b/tests/lean/run/match_expr2.lean index 84f1264d79..fb070f7352 100644 --- a/tests/lean/run/match_expr2.lean +++ b/tests/lean/run/match_expr2.lean @@ -1,4 +1,4 @@ -exit +#exit -- import algebra.ordered_ring open tactic axiom Sorry : ∀ {A:Type}, A diff --git a/tests/lean/run/meta2.lean b/tests/lean/run/meta2.lean index 5b7b1c7a33..632f0d06c0 100644 --- a/tests/lean/run/meta2.lean +++ b/tests/lean/run/meta2.lean @@ -3,7 +3,7 @@ open io meta definition foo : nat → nat | a := nat.cases_on a 1 (λ n, foo n + 2) -vm_eval (foo 10) +#eval (foo 10) meta definition loop : nat → io unit | a := do put_str ">> ", put a, put_str "\n", loop (a+1) diff --git a/tests/lean/run/meta3.lean b/tests/lean/run/meta3.lean index b0205afc05..4b49fc4a91 100644 --- a/tests/lean/run/meta3.lean +++ b/tests/lean/run/meta3.lean @@ -1,3 +1,3 @@ -check `foo.bla +#check `foo.bla -vm_eval mk_num_name (`foo.bla) 10 +#eval mk_num_name (`foo.bla) 10 diff --git a/tests/lean/run/meta_env1.lean b/tests/lean/run/meta_env1.lean index 8dfd7dc481..c1ed2743a2 100644 --- a/tests/lean/run/meta_env1.lean +++ b/tests/lean/run/meta_env1.lean @@ -4,9 +4,9 @@ meta definition e := environment.mk_std 0 definition hints := reducibility_hints.regular 10 tt -vm_eval environment.trust_lvl e +#eval environment.trust_lvl e -vm_eval (environment.add e (declaration.defn `foo [] +#eval (environment.add e (declaration.defn `foo [] (expr.sort (level.succ (level.zero))) (expr.sort (level.succ (level.zero))) hints tt) : exceptional environment) @@ -16,10 +16,10 @@ meta definition e1 := (environment.add e (declaration.defn `foo [] (expr.sort level.zero) hints tt) : exceptional environment) -print "-----------" +#print "-----------" open name -vm_eval do +#eval do e₁ ← environment.add e (declaration.defn `foo [] (expr.sort (level.succ (level.zero))) (expr.sort level.zero) diff --git a/tests/lean/run/meta_expr1.lean b/tests/lean/run/meta_expr1.lean index e2e7ca813c..4e59086b40 100644 --- a/tests/lean/run/meta_expr1.lean +++ b/tests/lean/run/meta_expr1.lean @@ -6,29 +6,29 @@ meta definition e1' := expr.app (expr.app (expr.const `f []) (expr.mk_var 1)) (e meta definition tst : e1 = e1' := rfl -vm_eval e1 +#eval e1 -vm_eval expr.fold e1 (0:nat) (λ e d n, n+1) +#eval expr.fold e1 (0:nat) (λ e d n, n+1) meta definition l1 := expr.lam `a binder_info.default (expr.sort level.zero) (expr.mk_var 0) meta definition l2 := expr.lam `b binder_info.default (expr.sort level.zero) (expr.mk_var 0) meta definition l3 := expr.lam `a binder_info.default (expr.const `nat []) (expr.mk_var 0) -vm_eval l1 -vm_eval l2 -vm_eval l3 -vm_eval decidable.to_bool (l1 = l2) -vm_eval decidable.to_bool (l1 =ₐ l2) +#eval l1 +#eval l2 +#eval l3 +#eval decidable.to_bool (l1 = l2) +#eval decidable.to_bool (l1 =ₐ l2) -vm_eval expr.lex_lt (expr.const `a []) (expr.const `b []) -vm_eval expr.lt (expr.const `a []) (expr.const `b []) +#eval expr.lex_lt (expr.const `a []) (expr.const `b []) +#eval expr.lt (expr.const `a []) (expr.const `b []) meta definition v1 := expr.app (expr.app (expr.const `f []) (expr.mk_var 0)) (expr.mk_var 1) -vm_eval v1 -vm_eval expr.instantiate_var v1 (expr.const `a []) +#eval v1 +#eval expr.instantiate_var v1 (expr.const `a []) -vm_eval expr.instantiate_vars v1 [expr.const `a [], expr.const `b []] +#eval expr.instantiate_vars v1 [expr.const `a [], expr.const `b []] meta definition fv1 := expr.app @@ -36,22 +36,22 @@ expr.app (expr.local_const `a `a binder_info.default (expr.sort level.zero))) (expr.local_const `b `b binder_info.default (expr.sort level.zero)) -vm_eval fv1 +#eval fv1 -vm_eval expr.abstract_local (expr.abstract_local fv1 `a) `b -vm_eval expr.abstract_locals fv1 [`a, `b] -vm_eval expr.abstract_locals fv1 [`b, `a] -vm_eval expr.lift_vars (expr.abstract_locals fv1 [`b, `a]) 1 1 -vm_eval expr.has_local fv1 -vm_eval expr.has_var fv1 -vm_eval expr.has_var (expr.abstract_locals fv1 [`b, `a]) +#eval expr.abstract_local (expr.abstract_local fv1 `a) `b +#eval expr.abstract_locals fv1 [`a, `b] +#eval expr.abstract_locals fv1 [`b, `a] +#eval expr.lift_vars (expr.abstract_locals fv1 [`b, `a]) 1 1 +#eval expr.has_local fv1 +#eval expr.has_var fv1 +#eval expr.has_var (expr.abstract_locals fv1 [`b, `a]) meta definition foo : nat → expr | 0 := expr.const `aa [level.zero, level.succ level.zero] | (n+1) := foo n /- -vm_eval match foo 10 with +#eval match foo 10 with | expr.const n ls := list.head (list.tail ls) | _ := level.zero end diff --git a/tests/lean/run/meta_level1.lean b/tests/lean/run/meta_level1.lean index 97c1cf4923..9f3e5fa001 100644 --- a/tests/lean/run/meta_level1.lean +++ b/tests/lean/run/meta_level1.lean @@ -1,21 +1,21 @@ import system.io open io -vm_eval do pp (level.max (level.succ level.zero) (level.param `foo)), put_str "\n" +#eval do pp (level.max (level.succ level.zero) (level.param `foo)), put_str "\n" -vm_eval level.normalize (level.succ (level.max (level.max level.zero (level.succ level.zero)) (level.param `l₁))) +#eval level.normalize (level.succ (level.max (level.max level.zero (level.succ level.zero)) (level.param `l₁))) -vm_eval level.imax (level.mvar `m) (level.of_nat 10) +#eval level.imax (level.mvar `m) (level.of_nat 10) -vm_eval if level.zero = level.zero then "eq" else "neq" +#eval if level.zero = level.zero then "eq" else "neq" -vm_eval level.occurs (level.param `l2) (level.max (level.param `l1) (level.param `l2)) +#eval level.occurs (level.param `l2) (level.max (level.param `l1) (level.param `l2)) -vm_eval level.occurs (level.param `l3) (level.max (level.param `l1) (level.param `l2)) +#eval level.occurs (level.param `l3) (level.max (level.param `l1) (level.param `l2)) -vm_eval level.eqv (level.max (level.param `l1) (level.param `l2)) (level.max (level.param `l2) (level.param `l1)) +#eval level.eqv (level.max (level.param `l1) (level.param `l2)) (level.max (level.param `l2) (level.param `l1)) -vm_eval level.eqv (level.max (level.param `l1) (level.param `l2)) (level.max (level.param `l2) (level.param `l2)) +#eval level.eqv (level.max (level.param `l1) (level.param `l2)) (level.max (level.param `l2) (level.param `l2)) -vm_eval level.has_param (level.max (level.param `l1) (level.param `l2)) `l1 -vm_eval level.has_param (level.max (level.param `l1) (level.param `l2)) `l2 -vm_eval level.has_param (level.max (level.param `l1) (level.param `l2)) `l3 +#eval level.has_param (level.max (level.param `l1) (level.param `l2)) `l1 +#eval level.has_param (level.max (level.param `l1) (level.param `l2)) `l2 +#eval level.has_param (level.max (level.param `l1) (level.param `l2)) `l3 diff --git a/tests/lean/run/meta_tac2.lean b/tests/lean/run/meta_tac2.lean index 5e2401a7d0..063f025fbf 100644 --- a/tests/lean/run/meta_tac2.lean +++ b/tests/lean/run/meta_tac2.lean @@ -21,7 +21,7 @@ by do trace_result, return () -print "=====================" +#print "=====================" example : ∀ (p : Prop), p → p → p := by do @@ -41,7 +41,7 @@ by do trace_result, return () -print "=====================" +#print "=====================" example : ∀ (p : Prop), p → p → p := by do diff --git a/tests/lean/run/meta_tac7.lean b/tests/lean/run/meta_tac7.lean index c6ff543b1d..a39b86eeb7 100644 --- a/tests/lean/run/meta_tac7.lean +++ b/tests/lean/run/meta_tac7.lean @@ -6,4 +6,4 @@ by do trace_state, assumption definition ex1 (a b c : Prop) : a → b → c → b := by do intros, assumption -print ex1 +#print ex1 diff --git a/tests/lean/run/mixed_tmp_non_tmp_universe_bug.lean b/tests/lean/run/mixed_tmp_non_tmp_universe_bug.lean index d21f0ea986..6b9da80154 100644 --- a/tests/lean/run/mixed_tmp_non_tmp_universe_bug.lean +++ b/tests/lean/run/mixed_tmp_non_tmp_universe_bug.lean @@ -1,2 +1,2 @@ -eval default (bool × unit × nat) -eval default (bool × bool × bool × bool) +#reduce default (bool × unit × nat) +#reduce default (bool × bool × bool × bool) diff --git a/tests/lean/run/mutual_inductive.lean b/tests/lean/run/mutual_inductive.lean index 2ffe525952..7a654501ba 100644 --- a/tests/lean/run/mutual_inductive.lean +++ b/tests/lean/run/mutual_inductive.lean @@ -6,12 +6,12 @@ with foo : Type with bar : Type | mk : bar -check @foo -check @bar -check @foo.rec -check @bar.rec -check @foo.has_sizeof_inst -check @bar.has_sizeof_inst +#check @foo +#check @bar +#check @foo.rec +#check @bar.rec +#check @foo.has_sizeof_inst +#check @bar.has_sizeof_inst end X1 namespace X2 @@ -22,12 +22,12 @@ with foo : Type with bar : Type | mk : foo -> bar -check @foo -check @bar -check @foo.rec -check @bar.rec -check @foo.has_sizeof_inst -check @bar.has_sizeof_inst +#check @foo +#check @bar +#check @foo.rec +#check @bar.rec +#check @foo.has_sizeof_inst +#check @bar.has_sizeof_inst end X2 namespace X3 @@ -38,12 +38,12 @@ with foo : bool -> Type with bar : Type | mk : foo tt -> bar -check @foo -check @bar -check @foo.rec -check @bar.rec -check @foo.has_sizeof_inst -check @bar.has_sizeof_inst +#check @foo +#check @bar +#check @foo.rec +#check @bar.rec +#check @foo.has_sizeof_inst +#check @bar.has_sizeof_inst end X3 namespace X4 @@ -56,15 +56,15 @@ with bar : bool -> Type with rig : Type | mk : foo tt tt -> bar tt -> rig -check @foo -check @bar -check @rig -check @foo.rec -check @bar.rec -check @rig.rec -check @foo.has_sizeof_inst -check @bar.has_sizeof_inst -check @rig.has_sizeof_inst +#check @foo +#check @bar +#check @rig +#check @foo.rec +#check @bar.rec +#check @rig.rec +#check @foo.has_sizeof_inst +#check @bar.has_sizeof_inst +#check @rig.has_sizeof_inst end X4 namespace X5 @@ -77,15 +77,15 @@ with rig : Type | mk : A -> foo tt rfl -> bar tt ff tt -> rig | put : A -> foo tt rfl -> bar tt ff tt -> rig -check @foo -check @bar -check @rig -check @foo.rec -check @bar.rec -check @rig.rec -check @foo.has_sizeof_inst -check @bar.has_sizeof_inst -check @rig.has_sizeof_inst +#check @foo +#check @bar +#check @rig +#check @foo.rec +#check @bar.rec +#check @rig.rec +#check @foo.has_sizeof_inst +#check @bar.has_sizeof_inst +#check @rig.has_sizeof_inst end X5 namespace X6 @@ -98,12 +98,12 @@ with bar : bool -> bool -> bool -> Type.{max l₁ l₂} with rig : Type.{max l₁ l₂} | mk : A -> B -> foo tt rfl -> bar tt ff tt -> rig -check @foo -check @bar -check @rig -check @foo.rec -check @bar.rec -check @rig.rec +#check @foo +#check @bar +#check @rig +#check @foo.rec +#check @bar.rec +#check @rig.rec end X6 namespace X7 @@ -116,11 +116,11 @@ with bar : bool -> bool -> bool -> Type.{max l₁ l₂ l₃} with rig : Type.{max l₁ l₂ l₃} | mk : A -> B -> (Pi x : A, x = a -> foo tt rfl) -> bar tt ff tt -> rig -check @foo -check @bar -check @rig -check @foo.rec -check @bar.rec -check @rig.rec +#check @foo +#check @bar +#check @rig +#check @foo.rec +#check @bar.rec +#check @rig.rec end X7 diff --git a/tests/lean/run/n3.lean b/tests/lean/run/n3.lean index f79b3b32c7..34cc76fb18 100644 --- a/tests/lean/run/n3.lean +++ b/tests/lean/run/n3.lean @@ -16,8 +16,8 @@ notation A ≤ B:prev ≤ C:prev := A ≤ B ∧ B ≤ C notation A ≤ B:prev < C:prev := A ≤ B ∧ B < C notation A < B:prev ≤ C:prev := A < B ∧ B ≤ C constants a b c d e : N -check a ≤ b ≤ f c + b ∧ a < b -check a ≤ d -check a < b ≤ c -check a ≤ b < c -check a < b +#check a ≤ b ≤ f c + b ∧ a < b +#check a ≤ d +#check a < b ≤ c +#check a ≤ b < c +#check a < b diff --git a/tests/lean/run/n5.lean b/tests/lean/run/n5.lean index 317c36c402..9956924d54 100644 --- a/tests/lean/run/n5.lean +++ b/tests/lean/run/n5.lean @@ -15,7 +15,7 @@ notation a * b | c * d:prev := s a b c d constants a b c d e : N -check a * b -check a * b | d -check a * b * c -check a * b | d * e +#check a * b +#check a * b | d +#check a * b * c +#check a * b | d * e diff --git a/tests/lean/run/nat_bug7.lean b/tests/lean/run/nat_bug7.lean index c0bcfb924c..0090342b1e 100644 --- a/tests/lean/run/nat_bug7.lean +++ b/tests/lean/run/nat_bug7.lean @@ -9,7 +9,7 @@ infixl `+` := add axiom add_right_comm (n m k : nat) : n + m + k = n + k + m open eq -print "===========================" +#print "===========================" theorem bug (a b c d : nat) : a + b + c + d = a + c + b + d := subst (add_right_comm a b c) (eq.refl (a + b + c + d)) end nat diff --git a/tests/lean/run/nested_common_subexpr_issue.lean b/tests/lean/run/nested_common_subexpr_issue.lean index a824c9ae64..a34bab4836 100644 --- a/tests/lean/run/nested_common_subexpr_issue.lean +++ b/tests/lean/run/nested_common_subexpr_issue.lean @@ -6,7 +6,7 @@ def fib_aux : ℕ → ℕ × ℕ def fib n := (fib_aux n).2 -vm_eval fib 10000 +#eval fib 10000 def fib_aux2 : ℕ → ℕ × ℕ | 0 := (0, 1) @@ -14,4 +14,4 @@ def fib_aux2 : ℕ → ℕ × ℕ def fib2 n := (fib_aux2 n).2 -vm_eval fib2 10000 +#eval fib2 10000 diff --git a/tests/lean/run/nested_inductive.lean b/tests/lean/run/nested_inductive.lean index 72fcb1ecee..b8f9231a56 100644 --- a/tests/lean/run/nested_inductive.lean +++ b/tests/lean/run/nested_inductive.lean @@ -6,56 +6,56 @@ inductive {u} vec (A : Type u) : nat -> Type u | vcons : Pi (n : nat), A -> vec n -> vec (n+1) namespace X1 -print "simple" +#print "simple" inductive foo : Type | mk : list foo -> foo end X1 namespace X2 -print "with param" +#print "with param" inductive {u} foo (A : Type u) : Type u | mk : A -> list foo -> foo end X2 namespace X3 -print "with indices" +#print "with indices" inductive {u} foo (A B : Type u) : Type u | mk : A -> B -> vec foo 0 -> foo end X3 namespace X4 -print "with locals in indices" +#print "with locals in indices" inductive {u} foo (A : Type u) : Type u | mk : Pi (n : nat), A -> vec foo n -> foo end X4 namespace X5 -print "nested-reflexive" +#print "nested-reflexive" inductive {u} foo (A : Type u) : Type u | mk : A -> (Pi (m : nat), vec foo m) -> foo end X5 namespace X6 -print "locals + nested-reflexive locals in indices" +#print "locals + nested-reflexive locals in indices" inductive {u} foo (A : Type u) : Type u | mk : Pi (n : nat), A -> (Pi (m : nat), vec foo (n + m)) -> foo end X6 namespace X7 -print "many different nestings" +#print "many different nestings" inductive {u} foo (A : Type u) : Type u | mk : Pi (n : nat), A -> list A -> prod A A -> (Pi (m : nat), vec foo (n + m)) -> vec foo n -> foo end X7 namespace X8 -print "many different nestings, some sharing" +#print "many different nestings, some sharing" inductive {u} foo (A : Type u) : Type u | mk₁ : Pi (n : nat), A -> (Pi (m : nat), vec (list foo) (n + m)) -> vec foo n -> foo | mk₂ : Pi (n : nat), A -> list A -> prod A A -> (Pi (m : nat), vec foo (n + m)) -> vec foo n -> foo @@ -63,7 +63,7 @@ inductive {u} foo (A : Type u) : Type u end X8 namespace X9b -print "mutual + nesting" +#print "mutual + nesting" mutual inductive {u} foo, bar with foo : Type u | mk : list (list foo) -> foo @@ -73,7 +73,7 @@ with bar : Type u end X9b namespace X10 -print "many layers of nesting nested inductive types" +#print "many layers of nesting nested inductive types" inductive wrap (A : Sort*) | mk : A -> wrap @@ -90,7 +90,7 @@ inductive bar end X10 namespace X11 -print "intro rule that introduces additional nesting" +#print "intro rule that introduces additional nesting" inductive {u} wrap (A : Type u) : Type u | mk : list A -> wrap @@ -101,7 +101,7 @@ inductive {u} foo : Type u end X11 namespace X12 -print "intro rule that introduces a lot of additional nesting" +#print "intro rule that introduces a lot of additional nesting" inductive wrap (A : Sort*) : Sort* | mk : list (list A) -> wrap @@ -112,7 +112,7 @@ inductive {u} box (A : Type u) : Type u end X12 namespace X13 -print "with reducible definitions" +#print "with reducible definitions" attribute [reducible] definition list' := @list @@ -127,7 +127,7 @@ inductive {u} foo (A : Type u) : Type u end X13 namespace X14 -print "with indices in original" +#print "with indices in original" inductive Foo : bool -> Type | mk : list (Foo ff) -> Foo tt @@ -135,7 +135,7 @@ inductive Foo : bool -> Type end X14 namespace X15 -print "nested inductive propositions eliminating to Prop" +#print "nested inductive propositions eliminating to Prop" universe variable l inductive plist (A : Sort l) : Sort l @@ -148,7 +148,7 @@ inductive foo (A : Type l) : ℕ → Prop end X15 namespace X16 -print "multiply nested inductive propositions" +#print "multiply nested inductive propositions" universe variable l inductive wrap (A : Sort l) : Sort l diff --git a/tests/lean/run/nested_inductive_code_gen.lean b/tests/lean/run/nested_inductive_code_gen.lean index 7fd6703e8b..ef330ff88a 100644 --- a/tests/lean/run/nested_inductive_code_gen.lean +++ b/tests/lean/run/nested_inductive_code_gen.lean @@ -20,4 +20,4 @@ def var_of : term → list term def tst : list term := var_of (term.app [term.var 0, term.var 1, term.var 2, term.app [term.cnst "x"]]) -vm_eval tst +#eval tst diff --git a/tests/lean/run/new_proj_notation.lean b/tests/lean/run/new_proj_notation.lean index 6bafe578e0..2805e97149 100644 --- a/tests/lean/run/new_proj_notation.lean +++ b/tests/lean/run/new_proj_notation.lean @@ -1,7 +1,7 @@ variable x : list nat -check x^.map (+1) +#check x^.map (+1) -check x^.foldl (+) 0 +#check x^.foldl (+) 0 -vm_eval [1, 2, 3]^.map (+3) +#eval [1, 2, 3]^.map (+3) diff --git a/tests/lean/run/not_bug1.lean b/tests/lean/run/not_bug1.lean index 03f173db51..7b0721cd2f 100644 --- a/tests/lean/run/not_bug1.lean +++ b/tests/lean/run/not_bug1.lean @@ -7,14 +7,14 @@ constant cons : bool → List → List infixr `::` := cons notation `[` l:(foldr `,` (h t, cons h t) nil `]`) := l -check [] -check [tt] -check [tt, ff] -check [tt, ff, ff] -check tt :: ff :: [tt, ff, ff] -check tt :: [] +#check [] +#check [tt] +#check [tt, ff] +#check [tt, ff, ff] +#check tt :: ff :: [tt, ff, ff] +#check tt :: [] constants a b c : bool -check a :: b :: nil -check [a, b] -check [a, b, c] -check [] +#check a :: b :: nil +#check [a, b] +#check [a, b, c] +#check [] diff --git a/tests/lean/run/ns.lean b/tests/lean/run/ns.lean index 61f088dd26..6182c360f1 100644 --- a/tests/lean/run/ns.lean +++ b/tests/lean/run/ns.lean @@ -7,12 +7,12 @@ namespace foo constant f : int → int constant a : nat constant i : int - check _root_.f a - check f i + #check _root_.f a + #check f i end foo open foo constants a : nat constants i : int -check f foo.a -check f foo.i +#check f foo.a +#check f foo.i diff --git a/tests/lean/run/ns1.lean b/tests/lean/run/ns1.lean index dc17ef8c9e..f1e40bb838 100644 --- a/tests/lean/run/ns1.lean +++ b/tests/lean/run/ns1.lean @@ -5,4 +5,4 @@ end boo end foo open foo -check boo.tst +#check boo.tst diff --git a/tests/lean/run/ns2.lean b/tests/lean/run/ns2.lean index e00d4ea83f..d1d55132e2 100644 --- a/tests/lean/run/ns2.lean +++ b/tests/lean/run/ns2.lean @@ -1,34 +1,34 @@ definition foo.id {A : Type} (a : A) := a constant foo.T : Type.{1} -check foo.id -check foo.T +#check foo.id +#check foo.T inductive foo.v.I | unit : foo.v.I -check foo.v.I -check foo.v.I.unit +#check foo.v.I +#check foo.v.I.unit namespace foo - check id - check T - check v.I + #check id + #check T + #check v.I end foo namespace bla definition vvv.pr {A : Type} (a b : A) := a - check vvv.pr + #check vvv.pr end bla -check bla.vvv.pr +#check bla.vvv.pr namespace bla namespace vvv - check pr + #check pr inductive my.empty : Type end vvv end bla -check bla.vvv.my.empty +#check bla.vvv.my.empty namespace foo.bla structure vvv.xyz := mk end foo.bla -check foo.bla.vvv.xyz.mk +#check foo.bla.vvv.xyz.mk diff --git a/tests/lean/run/num.lean b/tests/lean/run/num.lean index 85bb88d5ea..6c73dd7dc3 100644 --- a/tests/lean/run/num.lean +++ b/tests/lean/run/num.lean @@ -1,5 +1,5 @@ -check 14 -check 0 -check 3 -check 2 -check 4 +#check 14 +#check 0 +#check 3 +#check 2 +#check 4 diff --git a/tests/lean/run/one.lean b/tests/lean/run/one.lean index ab2fc15dab..026a7a41e9 100644 --- a/tests/lean/run/one.lean +++ b/tests/lean/run/one.lean @@ -2,12 +2,12 @@ inductive {u} one1 : Type (max 1 u) | unit : one1 set_option pp.universes true -check one1 +#check one1 inductive {u} one2 : Type (max 1 u) | unit : one2 -check one2 +#check one2 section foo universe u2 @@ -15,7 +15,7 @@ section foo inductive {u} wrapper : Type (max 1 u u2) | mk : A → wrapper - check wrapper + #check wrapper end foo -check wrapper +#check wrapper diff --git a/tests/lean/run/one2.lean b/tests/lean/run/one2.lean index 7732a91078..95a23f8d98 100644 --- a/tests/lean/run/one2.lean +++ b/tests/lean/run/one2.lean @@ -15,8 +15,8 @@ inductive {u} wrap2 (A : Type u) : Type (max 1 u) | mk : A → wrap2 set_option pp.universes true -check @one1.rec -check @pone.rec -check @two.rec -check @wrap.rec -check @wrap2.rec +#check @one1.rec +#check @pone.rec +#check @two.rec +#check @wrap.rec +#check @wrap2.rec diff --git a/tests/lean/run/opt1.lean b/tests/lean/run/opt1.lean index c036a55223..9d2a669aaa 100644 --- a/tests/lean/run/opt1.lean +++ b/tests/lean/run/opt1.lean @@ -1,6 +1,6 @@ -vm_eval options.get_string options.mk `opt1 "" -vm_eval options.get_string (options.set_string options.mk `opt1 "val1") `opt1 "" -vm_eval if (options.mk = options.mk) then bool.tt else bool.ff -vm_eval if (options.mk = (options.set_string options.mk `opt1 "val1")) then bool.tt else bool.ff -vm_eval options.get_nat (options.set_nat options.mk `opt1 10) `opt1 0 -vm_eval options.get_nat (options.set_nat options.mk `opt1 10) `opt2 0 +#eval options.get_string options.mk `opt1 "" +#eval options.get_string (options.set_string options.mk `opt1 "val1") `opt1 "" +#eval if (options.mk = options.mk) then bool.tt else bool.ff +#eval if (options.mk = (options.set_string options.mk `opt1 "val1")) then bool.tt else bool.ff +#eval options.get_nat (options.set_nat options.mk `opt1 10) `opt1 0 +#eval options.get_nat (options.set_nat options.mk `opt1 10) `opt2 0 diff --git a/tests/lean/run/opt_param_cc.lean b/tests/lean/run/opt_param_cc.lean index 1d1596b92b..22fdd09767 100644 --- a/tests/lean/run/opt_param_cc.lean +++ b/tests/lean/run/opt_param_cc.lean @@ -17,11 +17,11 @@ end open tactic -run_command do c ← mk_const `f, get_fun_info c >>= trace -run_command do c ← mk_const `eq, get_fun_info c >>= trace -run_command do c ← mk_const `id, get_fun_info c >>= trace +run_cmd do c ← mk_const `f, get_fun_info c >>= trace +run_cmd do c ← mk_const `eq, get_fun_info c >>= trace +run_cmd do c ← mk_const `id, get_fun_info c >>= trace set_option trace.congr_lemma true set_option trace.app_builder true -run_command do h ← mk_const `f, l ← mk_congr_lemma_simp h, trace l^.type +run_cmd do h ← mk_const `f, l ← mk_congr_lemma_simp h, trace l^.type diff --git a/tests/lean/run/overload2.lean b/tests/lean/run/overload2.lean index ce4c9fc867..633601e96c 100644 --- a/tests/lean/run/overload2.lean +++ b/tests/lean/run/overload2.lean @@ -17,8 +17,8 @@ end F2 open F2 nat -eval (1 : nat) + 1 -eval (1 : nat) + (1 : nat) +#reduce (1 : nat) + 1 +#reduce (1 : nat) + (1 : nat) example : true := begin diff --git a/tests/lean/run/pack_unpack1.lean b/tests/lean/run/pack_unpack1.lean index 4eab0c83f7..c5eb249d2d 100644 --- a/tests/lean/run/pack_unpack1.lean +++ b/tests/lean/run/pack_unpack1.lean @@ -65,8 +65,8 @@ noncomputable definition bla {A : Sort*} : ∀ n : tree A, P n | (tree.leaf a) := mk1 a | (tree.node l) := mk2 l -check bla._main.equations._eqn_1 -check bla._main.equations._eqn_2 +#check bla._main.equations._eqn_1 +#check bla._main.equations._eqn_2 definition foo {A : Sort*} : nat → tree A → nat | 0 _ := 0 @@ -74,7 +74,7 @@ definition foo {A : Sort*} : nat → tree A → nat | (n+1) (tree.node []) := foo n (tree.node []) | (n+1) (tree.node (x::xs)) := foo n x -check @foo._main.equations._eqn_1 -check @foo._main.equations._eqn_2 -check @foo._main.equations._eqn_3 -check @foo._main.equations._eqn_4 +#check @foo._main.equations._eqn_1 +#check @foo._main.equations._eqn_2 +#check @foo._main.equations._eqn_3 +#check @foo._main.equations._eqn_4 diff --git a/tests/lean/run/pack_unpack2.lean b/tests/lean/run/pack_unpack2.lean index 060a327117..43df2b3854 100644 --- a/tests/lean/run/pack_unpack2.lean +++ b/tests/lean/run/pack_unpack2.lean @@ -16,8 +16,8 @@ noncomputable definition bla {A : Type*} : ∀ n : tree A, P n | (tree.leaf a) := mk1 a | (tree.node l) := mk2 l -check bla._main.equations._eqn_1 -check bla._main.equations._eqn_2 +#check bla._main.equations._eqn_1 +#check bla._main.equations._eqn_2 definition foo {A : Type*} : nat → tree A → nat | 0 _ := sorry @@ -25,7 +25,7 @@ definition foo {A : Type*} : nat → tree A → nat | (n+1) (tree.node []) := foo n (tree.node []) | (n+1) (tree.node (x::xs)) := foo n x -check @foo._main.equations._eqn_1 -check @foo._main.equations._eqn_2 -check @foo._main.equations._eqn_3 -check @foo._main.equations._eqn_4 +#check @foo._main.equations._eqn_1 +#check @foo._main.equations._eqn_2 +#check @foo._main.equations._eqn_3 +#check @foo._main.equations._eqn_4 diff --git a/tests/lean/run/pack_unpack3.lean b/tests/lean/run/pack_unpack3.lean index 16a2b4da9b..1d7e15e8d2 100644 --- a/tests/lean/run/pack_unpack3.lean +++ b/tests/lean/run/pack_unpack3.lean @@ -16,14 +16,14 @@ noncomputable definition {u} bla {A : Type u} : ∀ n : tree A, P n | (tree.leaf a) := mk1 a | (tree.node n xs) := mk2 n xs -check bla._main.equations._eqn_1 -check bla._main.equations._eqn_2 +#check bla._main.equations._eqn_1 +#check bla._main.equations._eqn_2 definition {u} foo {A : Type u} : nat → tree A → nat | 0 _ := sorry | (n+1) (tree.leaf a) := 0 | (n+1) (tree.node m xs) := foo n (tree.node m xs) -check @foo._main.equations._eqn_1 -check @foo._main.equations._eqn_2 -check @foo._main.equations._eqn_3 +#check @foo._main.equations._eqn_1 +#check @foo._main.equations._eqn_2 +#check @foo._main.equations._eqn_3 diff --git a/tests/lean/run/partial_explicit.lean b/tests/lean/run/partial_explicit.lean index 468f217405..9fd9462c6c 100644 --- a/tests/lean/run/partial_explicit.lean +++ b/tests/lean/run/partial_explicit.lean @@ -12,6 +12,6 @@ variables (f : Π {T : Type} {a : T} {P : T → Prop}, P a → Π {b : T} {Q : T variables (T : Type) (a : T) (P : T → Prop) (pa : P a) variables (b : T) (Q : T → Prop) (qb : Q b) -check @f T a P pa b Q qb -- Prop -check f pa qb -- Prop +#check @f T a P pa b Q qb -- Prop +#check f pa qb -- Prop end diff --git a/tests/lean/run/period_after_eqns.lean b/tests/lean/run/period_after_eqns.lean index 921bb5753f..6d3985368d 100644 --- a/tests/lean/run/period_after_eqns.lean +++ b/tests/lean/run/period_after_eqns.lean @@ -3,4 +3,4 @@ def f : nat → nat | (a+1) := 1 . -check 10 +#check 10 diff --git a/tests/lean/run/pp_unit.lean b/tests/lean/run/pp_unit.lean index 7da0045fbd..5468cb6c8d 100644 --- a/tests/lean/run/pp_unit.lean +++ b/tests/lean/run/pp_unit.lean @@ -1,4 +1,4 @@ -check unit.star -check () +#check unit.star +#check () set_option pp.all true -check () +#check () diff --git a/tests/lean/run/pred_to_subtype_coercion.lean b/tests/lean/run/pred_to_subtype_coercion.lean index b6bfcb70bb..6d58bc18a5 100644 --- a/tests/lean/run/pred_to_subtype_coercion.lean +++ b/tests/lean/run/pred_to_subtype_coercion.lean @@ -7,7 +7,7 @@ definition pred2subtype {A : Type u} : has_coe_to_sort (A → Prop) := definition below (n : nat) : nat → Prop := λ i, i < n -check λ x : below 10, x +#check λ x : below 10, x definition f : below 10 → nat | ⟨a, h⟩ := a @@ -15,7 +15,7 @@ definition f : below 10 → nat lemma zlt10 : 0 < 10 := sorry -check f ⟨0, zlt10⟩ +#check f ⟨0, zlt10⟩ definition g (a : below 10) : nat := subtype.val a diff --git a/tests/lean/run/pred_using_structure_cmd.lean b/tests/lean/run/pred_using_structure_cmd.lean index 870fb0d376..cca0531778 100644 --- a/tests/lean/run/pred_using_structure_cmd.lean +++ b/tests/lean/run/pred_using_structure_cmd.lean @@ -7,7 +7,7 @@ structure is_equiv (R : A → A → Prop) extends has_refl R : Prop := (symm : ∀ a b, R a b → R b a) (trans : ∀ a b c, R a b → R b c → R a c) -check @is_equiv.refl -check @is_equiv.symm -check @is_equiv.trans -check @is_equiv.to_has_refl +#check @is_equiv.refl +#check @is_equiv.symm +#check @is_equiv.trans +#check @is_equiv.to_has_refl diff --git a/tests/lean/run/print_inductive.lean b/tests/lean/run/print_inductive.lean index 76cacb6df0..d5bcd043b1 100644 --- a/tests/lean/run/print_inductive.lean +++ b/tests/lean/run/print_inductive.lean @@ -1,3 +1,3 @@ -print inductive nat +#print inductive nat -print inductive list +#print inductive list diff --git a/tests/lean/run/print_poly.lean b/tests/lean/run/print_poly.lean index c7a0e18daa..ce32610e49 100644 --- a/tests/lean/run/print_poly.lean +++ b/tests/lean/run/print_poly.lean @@ -1,13 +1,13 @@ open nat -print pp.max_depth -print + -print - +#print pp.max_depth +#print + +#print - -print nat -print nat.zero -print nat.add -print nat.rec -print classical.em -print quot.lift -print nat.of_num +#print nat +#print nat.zero +#print nat.add +#print nat.rec +#print classical.em +#print quot.lift +#print nat.of_num diff --git a/tests/lean/run/protected.lean b/tests/lean/run/protected.lean index c7b4c27cc1..92c607ac36 100644 --- a/tests/lean/run/protected.lean +++ b/tests/lean/run/protected.lean @@ -4,5 +4,5 @@ namespace foo end foo open foo -check foo.C -check D +#check foo.C +#check D diff --git a/tests/lean/run/ptst.lean b/tests/lean/run/ptst.lean index 19f0b0920d..44f2cf2911 100644 --- a/tests/lean/run/ptst.lean +++ b/tests/lean/run/ptst.lean @@ -1,4 +1,4 @@ open prod nat -- Test tuple notation -check ((3:nat), false, (1:num), true) +#check ((3:nat), false, (1:num), true) diff --git a/tests/lean/run/qexpr1.lean b/tests/lean/run/qexpr1.lean index 7d489543bc..bfeb5881b4 100644 --- a/tests/lean/run/qexpr1.lean +++ b/tests/lean/run/qexpr1.lean @@ -1,6 +1,6 @@ open tactic -check +#check λ (A : Type) (a b c d : A) (H1 : a = b) (H2 : c = b) (H3 : d = c), have Hac : a = c, by do { h ← get_local `H2, diff --git a/tests/lean/run/quote1.lean b/tests/lean/run/quote1.lean index e4b633f552..d13b11bf40 100644 --- a/tests/lean/run/quote1.lean +++ b/tests/lean/run/quote1.lean @@ -13,4 +13,4 @@ by do exact r private def f := unit -check ``f +#check ``f diff --git a/tests/lean/run/rb_map1.lean b/tests/lean/run/rb_map1.lean index ed61da7d40..ecd76da2c6 100644 --- a/tests/lean/run/rb_map1.lean +++ b/tests/lean/run/rb_map1.lean @@ -3,27 +3,27 @@ open io section open nat_map -vm_eval size (insert (insert (mk nat) 10 20) 10 21) +#eval size (insert (insert (mk nat) 10 20) 10 21) meta definition m := (insert (insert (insert (mk nat) 10 20) 5 50) 10 21) -vm_eval find m 10 -vm_eval find m 5 -vm_eval find m 8 -vm_eval contains m 5 -vm_eval contains m 8 +#eval find m 10 +#eval find m 5 +#eval find m 8 +#eval contains m 5 +#eval contains m 8 open list meta definition m2 := of_list [((1:nat), "one"), (2, "two"), (3, "three")] -vm_eval size m2 -vm_eval find m2 1 -vm_eval find m2 4 -vm_eval find m2 3 +#eval size m2 +#eval find m2 1 +#eval find m2 4 +#eval find m2 3 -vm_eval do pp m2, put_str "\n" -vm_eval m2 +#eval do pp m2, put_str "\n" +#eval m2 end @@ -32,9 +32,9 @@ open rb_map -- Mapping from (nat × nat) → nat meta definition m3 := insert (insert (mk (nat × nat) nat) (1, 2) 3) (2, 2) 4 -vm_eval find m3 (1, 2) -vm_eval find m3 (2, 1) -vm_eval find m3 (2, 2) +#eval find m3 (1, 2) +#eval find m3 (2, 1) +#eval find m3 (2, 2) -vm_eval pp m3 +#eval pp m3 end diff --git a/tests/lean/run/record1.lean b/tests/lean/run/record1.lean index 60a622adf0..63a3cbb718 100644 --- a/tests/lean/run/record1.lean +++ b/tests/lean/run/record1.lean @@ -1,14 +1,14 @@ structure point (A : Type) (B : Type) := mk :: (x : A) (y : B) -check point -check @ point.rec -check point.mk -check point.x -check point.y -check point.rec_on -check point.induction_on -check point.destruct +#check point +#check @ point.rec +#check point.mk +#check point.x +#check point.y +#check point.rec_on +#check point.induction_on +#check point.destruct inductive color | red | green | blue @@ -16,9 +16,9 @@ inductive color structure color_point (A : Type) (B : Type) extends point A B := mk :: (c : color) -check @color_point.rec_on -check color_point.rec_on -check color_point.to_point +#check @color_point.rec_on +#check color_point.rec_on +#check color_point.to_point section variables a b : num diff --git a/tests/lean/run/record10.lean b/tests/lean/run/record10.lean index dc833a745d..bd97747ef0 100644 --- a/tests/lean/run/record10.lean +++ b/tests/lean/run/record10.lean @@ -1,13 +1,13 @@ -print prefix semigroup +#print prefix semigroup -print "=======================" +#print "=======================" structure [class] has_two_muls (A : Type) extends has_mul A renaming mul→mul1, private has_mul A renaming mul→mul2 -print prefix has_two_muls +#print prefix has_two_muls -print "=======================" +#print "=======================" structure [class] another_two_muls (A : Type) extends has_mul A renaming mul→mul1, has_mul A renaming mul→mul2 diff --git a/tests/lean/run/record2.lean b/tests/lean/run/record2.lean index 4cbc4f816c..3956718703 100644 --- a/tests/lean/run/record2.lean +++ b/tests/lean/run/record2.lean @@ -9,12 +9,12 @@ section structure point := mk :: (x : A) (y : B) - check point - check point.mk - check point.x + #check point + #check point.mk + #check point.x end - check point - check point.mk - check point.x + #check point + #check point.mk + #check point.x end diff --git a/tests/lean/run/record7.lean b/tests/lean/run/record7.lean index 64fdd497ba..74270828d3 100644 --- a/tests/lean/run/record7.lean +++ b/tests/lean/run/record7.lean @@ -4,4 +4,4 @@ mk :: (x : A) (y : B) structure point2 (A : Type) (B : Type) extends point A B := make -print prefix point2 +#print prefix point2 diff --git a/tests/lean/run/record8.lean b/tests/lean/run/record8.lean index c059693400..d8f7471f51 100644 --- a/tests/lean/run/record8.lean +++ b/tests/lean/run/record8.lean @@ -1,4 +1,4 @@ structure point := (x y : nat) -check point.x +#check point.x diff --git a/tests/lean/run/record9.lean b/tests/lean/run/record9.lean index c32c2d56ea..5c126635ec 100644 --- a/tests/lean/run/record9.lean +++ b/tests/lean/run/record9.lean @@ -3,4 +3,4 @@ constant {u} fibrant : Type u → Prop structure {u} Fib : Type (u+1) := {type : Type u} (pred : fibrant type) -check Fib.mk +#check Fib.mk diff --git a/tests/lean/run/rel_tac1.lean b/tests/lean/run/rel_tac1.lean index 781ba3d405..c562fd82e3 100644 --- a/tests/lean/run/rel_tac1.lean +++ b/tests/lean/run/rel_tac1.lean @@ -6,7 +6,7 @@ by reflexivity example (a : nat) (b : bool) : a == b → b == a := by do intros, symmetry, trace_state, assumption -print "-----------" +#print "-----------" example (a : nat) (b : bool) (c : string) : a == b → b == c → a == c := by do diff --git a/tests/lean/run/reserve.lean b/tests/lean/run/reserve.lean index 143a2b57a0..7ee6a52e16 100644 --- a/tests/lean/run/reserve.lean +++ b/tests/lean/run/reserve.lean @@ -5,4 +5,4 @@ notation a `=?=` b := eq a b notation a `&&&` b := and a b set_option pp.notation false -check λ a b : num, a =?= b &&& b =?= a +#check λ a b : num, a =?= b &&& b =?= a diff --git a/tests/lean/run/root.lean b/tests/lean/run/root.lean index b1397de2d5..ffa6be13b5 100644 --- a/tests/lean/run/root.lean +++ b/tests/lean/run/root.lean @@ -2,13 +2,13 @@ constant foo : Prop namespace N1 constant foo : Prop - check N1.foo - check _root_.foo + #check N1.foo + #check _root_.foo namespace N2 constant foo : Prop - check N1.foo - check N1.N2.foo - print raw foo - print raw _root_.foo + #check N1.foo + #check N1.N2.foo + #print raw foo + #print raw _root_.foo end N2 end N1 diff --git a/tests/lean/run/run_tactic1.lean b/tests/lean/run/run_tactic1.lean index 28ce9885da..041314a4b3 100644 --- a/tests/lean/run/run_tactic1.lean +++ b/tests/lean/run/run_tactic1.lean @@ -1,13 +1,13 @@ open tactic -run_command tactic.trace "hello world" +run_cmd tactic.trace "hello world" -run_command do +run_cmd do N ← to_expr `(nat), v ← to_expr `(10), add_decl (declaration.defn `val10 [] N v reducibility_hints.opaque tt) -vm_eval val10 +#eval val10 example : val10 = 10 := rfl @@ -19,7 +19,7 @@ meta definition mk_defs : nat → command add_decl (declaration.defn (name.append_after `val n) [] N v reducibility_hints.opaque tt), mk_defs n -run_command mk_defs 10 +run_cmd mk_defs 10 example : val_1 = 1 := rfl example : val_2 = 2 := rfl diff --git a/tests/lean/run/rw_set1.lean b/tests/lean/run/rw_set1.lean index d94265eab6..c3bc458368 100644 --- a/tests/lean/run/rw_set1.lean +++ b/tests/lean/run/rw_set1.lean @@ -1,14 +1,14 @@ namespace foo attribute [simp] nat.add_assoc - print nat.add_assoc + #print nat.add_assoc end foo -print nat.add_assoc +#print nat.add_assoc namespace foo - print nat.add_assoc + #print nat.add_assoc attribute [simp] nat.add_comm open nat - print "---------" - print [simp] default + #print "---------" + #print [simp] default end foo diff --git a/tests/lean/run/rw_set3.lean b/tests/lean/run/rw_set3.lean index e96522db7f..1d6cda167f 100644 --- a/tests/lean/run/rw_set3.lean +++ b/tests/lean/run/rw_set3.lean @@ -9,6 +9,6 @@ axiom bla : ∀ x, f x = 2 attribute [simp] foo attribute [simp] bla -print [simp] default +#print [simp] default example : f 5 = 2 := by simp diff --git a/tests/lean/run/rw_set4.lean b/tests/lean/run/rw_set4.lean index 52a4f66040..274962455f 100644 --- a/tests/lean/run/rw_set4.lean +++ b/tests/lean/run/rw_set4.lean @@ -5,7 +5,7 @@ theorem forall_congr_prop_eq {P₁ P₂ Q₁ Q₂ : Prop} : P₁ = P₂ → (P₂ → Q₁ = Q₂) → (P₁ → Q₁) = (P₂ → Q₂) := sorry -print [congr] default +#print [congr] default example (A : Type) (a b c : A) : (a = b) → (a = c) → a = b := by simp {contextual := tt} example (A : Type) (a b c : A) : (a = c) → (a = b) → a = b := by simp {contextual := tt} diff --git a/tests/lean/run/sec_bug.lean b/tests/lean/run/sec_bug.lean index e84e2e3d09..25faf4ef67 100644 --- a/tests/lean/run/sec_bug.lean +++ b/tests/lean/run/sec_bug.lean @@ -4,4 +4,4 @@ section bla end bla end foo -check foo.tst +#check foo.tst diff --git a/tests/lean/run/sec_notation.lean b/tests/lean/run/sec_notation.lean index 91bc2f7cf4..8e037eaac3 100644 --- a/tests/lean/run/sec_notation.lean +++ b/tests/lean/run/sec_notation.lean @@ -8,7 +8,7 @@ section postfix `+.2`:100 := add2 - eval 3 +.2 + #reduce 3 +.2 end example : 3 +.2 = 5 := diff --git a/tests/lean/run/sec_var.lean b/tests/lean/run/sec_var.lean index 885f1b10c7..a292628e0e 100644 --- a/tests/lean/run/sec_var.lean +++ b/tests/lean/run/sec_var.lean @@ -5,12 +5,12 @@ section variable a : A set_option pp.implicit true - check foo (eq.refl a) - check foo - check foo = (λ (a b : A) (H : a = b), H) + #check foo (eq.refl a) + #check foo + #check foo = (λ (a b : A) (H : a = b), H) end -check foo = (λ (A : Type) (a b : A) (H : a = b), H) +#check foo = (λ (A : Type) (a b : A) (H : a = b), H) section variable A : Type @@ -19,7 +19,7 @@ section variable a : A set_option pp.implicit true - check foo2 A (eq.refl a) - check foo2 - check foo2 A = (λ (a b : A) (H : a = b), H) + #check foo2 A (eq.refl a) + #check foo2 + #check foo2 A = (λ (a b : A) (H : a = b), H) end diff --git a/tests/lean/run/seclvl.lean b/tests/lean/run/seclvl.lean index d89eb84bba..d0e6df26f6 100644 --- a/tests/lean/run/seclvl.lean +++ b/tests/lean/run/seclvl.lean @@ -2,21 +2,21 @@ section variables (A B C : Type) definition foo := A → B - check foo A B - check foo B C - check foo A A + #check foo A B + #check foo B C + #check foo A A end constants A B C : Type -check foo A B -check foo B C -check foo A A +#check foo A B +#check foo B C +#check foo A A section variables (A B C : Type) definition foo2 := A → B - check foo2 A B - check foo2 B C - check foo2 A A + #check foo2 A B + #check foo2 B C + #check foo2 A A end diff --git a/tests/lean/run/secnot.lean b/tests/lean/run/secnot.lean index 40e96f6c0a..b400854e65 100644 --- a/tests/lean/run/secnot.lean +++ b/tests/lean/run/secnot.lean @@ -3,7 +3,7 @@ variable {A : Type} definition f (a b : A) := a infixl ` ◀ `:65 := f variables a b : A -check a ◀ b +#check a ◀ b end inductive List (T : Type) : Type @@ -14,10 +14,10 @@ namespace List section variable {T : Type} notation `[` l:(foldr `,` (h t, cons h t) nil) `]` := l -check [(10:num), 20, 30] +#check [(10:num), 20, 30] end end List open List -check [(10:num), 20, 40] -check (10:num) ◀ 20 +#check [(10:num), 20, 40] +#check (10:num) ◀ 20 diff --git a/tests/lean/run/section1.lean b/tests/lean/run/section1.lean index 5f34e4f246..850f1c9d47 100644 --- a/tests/lean/run/section1.lean +++ b/tests/lean/run/section1.lean @@ -7,7 +7,7 @@ section variables {a b : A} variable H : a = b variables H1 H2 : b = a - check H1 - check H - check H2 + #check H1 + #check H + #check H2 end diff --git a/tests/lean/run/section2.lean b/tests/lean/run/section2.lean index 2bca632448..b3bb04eb1f 100644 --- a/tests/lean/run/section2.lean +++ b/tests/lean/run/section2.lean @@ -8,6 +8,6 @@ section foo variable A : Type definition id (a : A) := a variable a : nat - check n1.id _ a + #check n1.id _ a end foo end n1 diff --git a/tests/lean/run/section4.lean b/tests/lean/run/section4.lean index 5cb4da3b24..8151d02224 100644 --- a/tests/lean/run/section4.lean +++ b/tests/lean/run/section4.lean @@ -14,8 +14,8 @@ section inductive mypair | mk : A → B → mypair - print mypair.rec - check mypair.mk + #print mypair.rec + #check mypair.mk definition pr1' : mypair → A | (mypair.mk a b) := a @@ -24,9 +24,9 @@ section | (mypair.mk a b) := b end - check mypair.rec + #check mypair.rec variable a : A - check foo num a 0 + #check foo num a 0 definition pr1 : mypair num → A | (mypair.mk a b) := a diff --git a/tests/lean/run/section5.lean b/tests/lean/run/section5.lean index dd5575a007..fa6873b9ec 100644 --- a/tests/lean/run/section5.lean +++ b/tests/lean/run/section5.lean @@ -3,17 +3,17 @@ section foo variable a : A definition foo := a - check foo + #check foo structure [class] point := (x : A) (y : A) end foo -check foo +#check foo attribute [instance] definition point_nat : point nat := point.mk nat.zero nat.zero -print classes -check point +#print classes +#check point diff --git a/tests/lean/run/simp_attr_eqns.lean b/tests/lean/run/simp_attr_eqns.lean index 4f534781ee..e25063963b 100644 --- a/tests/lean/run/simp_attr_eqns.lean +++ b/tests/lean/run/simp_attr_eqns.lean @@ -49,7 +49,7 @@ begin reflexivity end -run_command mk_simp_attr `mysimp +run_cmd mk_simp_attr `mysimp attribute [mysimp] f diff --git a/tests/lean/run/simple.lean b/tests/lean/run/simple.lean index 666ff26305..3c6233398a 100644 --- a/tests/lean/run/simple.lean +++ b/tests/lean/run/simple.lean @@ -19,7 +19,7 @@ section := subst (λ x : A, Eq a x) b c H2 H1 end -check subst.{1} -check refl.{1} -check symm.{1} -check trans.{1} +#check subst.{1} +#check refl.{1} +#check symm.{1} +#check trans.{1} diff --git a/tests/lean/run/simplifier_custom_relations.lean b/tests/lean/run/simplifier_custom_relations.lean index 0590d0234d..c28999fdcf 100644 --- a/tests/lean/run/simplifier_custom_relations.lean +++ b/tests/lean/run/simplifier_custom_relations.lean @@ -20,8 +20,8 @@ constants (x y z : A) (f g h : A → A) attribute [simp] H₁ H₂ attribute [congr] Hf Hg Hh -print [simp] default -print [congr] default +#print [simp] default +#print [congr] default meta definition relsimp_core (e : expr) : tactic (expr × expr) := do S ← simp_lemmas.mk_default, diff --git a/tests/lean/run/sizeof2.lean b/tests/lean/run/sizeof2.lean index c6a0b88a5d..d5e9ee4021 100644 --- a/tests/lean/run/sizeof2.lean +++ b/tests/lean/run/sizeof2.lean @@ -23,6 +23,6 @@ rfl set_option pp.implicit true -check sizeof Prop -check sizeof [tt, ff, tt] -check λ (A : Type) (a b : A), sizeof [a, b] +#check sizeof Prop +#check sizeof [tt, ff, tt] +#check λ (A : Type) (a b : A), sizeof [a, b] diff --git a/tests/lean/run/smt_not_exists.lean b/tests/lean/run/smt_not_exists.lean index b010b91074..dadc141dae 100644 --- a/tests/lean/run/smt_not_exists.lean +++ b/tests/lean/run/smt_not_exists.lean @@ -8,7 +8,7 @@ begin [smt] ematch end -print ex +#print ex lemma ex2 (p q : nat → nat → Prop) (h : ∃ x, p x x ∧ q x x) : ∃ x, p x x := begin [smt] diff --git a/tests/lean/run/struc_names.lean b/tests/lean/run/struc_names.lean index feaa79d0fc..97e9d4889e 100644 --- a/tests/lean/run/struc_names.lean +++ b/tests/lean/run/struc_names.lean @@ -6,7 +6,7 @@ namespace foo structure [class] structB extends structA := mk :: (b : nat) - check @structA.a - check @structB.to_structA + #check @structA.a + #check @structB.to_structA end foo diff --git a/tests/lean/run/struct_bug1.lean b/tests/lean/run/struct_bug1.lean index ce00ef133d..a78e263d56 100644 --- a/tests/lean/run/struct_bug1.lean +++ b/tests/lean/run/struct_bug1.lean @@ -9,7 +9,7 @@ section structure foo2 (b : B) := (eqpr : b = b) - check foo2 + #check foo2 definition tst : B → Type := foo2 end diff --git a/tests/lean/run/struct_inst_exprs2.lean b/tests/lean/run/struct_inst_exprs2.lean index f636c99719..15d123f48f 100644 --- a/tests/lean/run/struct_inst_exprs2.lean +++ b/tests/lean/run/struct_inst_exprs2.lean @@ -1,4 +1,4 @@ -exit +#exit -- import data.nat.basic open nat diff --git a/tests/lean/run/struct_value.lean b/tests/lean/run/struct_value.lean index 477a77ce4c..f9e3675f50 100644 --- a/tests/lean/run/struct_value.lean +++ b/tests/lean/run/struct_value.lean @@ -1,21 +1,21 @@ -check { prod . fst := 10, snd := 20 } +#check { prod . fst := 10, snd := 20 } -check ({ fst := 10, snd := 20 } : nat × nat) +#check ({ fst := 10, snd := 20 } : nat × nat) definition p : nat × nat := { snd := 20, fst := 10 } -print p +#print p definition attr : user_attribute := { name := `foo, descr := "hello world" } -print attr +#print attr definition p2 := { p with fst := 20 } -print p2 +#print p2 structure point := (x : nat) (y : nat) @@ -27,17 +27,17 @@ definition p1 : point := { x := 1, y := 1 } definition p3 : point3d := { p1 with z := 10 } -print p3 +#print p3 -check { point3d . x := 1, y := 2, z := 3 } +#check { point3d . x := 1, y := 2, z := 3 } -check (⟨10, rfl⟩ : Σ' x : nat, x = x) +#check (⟨10, rfl⟩ : Σ' x : nat, x = x) -check ((| 10, rfl |) : Σ' x : nat, x = x) +#check ((| 10, rfl |) : Σ' x : nat, x = x) -check ({ fst := 10, snd := rfl } : Σ' x : nat, x = x) +#check ({ fst := 10, snd := rfl } : Σ' x : nat, x = x) definition f (a : nat) : Σ' x : nat, x = x := { fst := a, snd := rfl } -print f +#print f diff --git a/tests/lean/run/structure_result_universe.lean b/tests/lean/run/structure_result_universe.lean index 534288ebfb..daeed723d1 100644 --- a/tests/lean/run/structure_result_universe.lean +++ b/tests/lean/run/structure_result_universe.lean @@ -12,7 +12,7 @@ universe variable u structure foo4 (A : Type u) : Type (max u 1) := (val : A) -check foo1 -check foo2 -check foo3 -check foo4 +#check foo1 +#check foo2 +#check foo3 +#check foo4 diff --git a/tests/lean/run/structure_test.lean b/tests/lean/run/structure_test.lean index 2be178523e..97a68959fe 100644 --- a/tests/lean/run/structure_test.lean +++ b/tests/lean/run/structure_test.lean @@ -20,9 +20,9 @@ section structure point3d_color (B C : Type*) (D : B → Type*) extends point (foo A) B, sigma D renaming fst→y snd→w := mk :: (c : color) (H : x == y) - check point3d_color.c + #check point3d_color.c - check point3d_color.to_point + #check point3d_color.to_point end section diff --git a/tests/lean/run/sub.lean b/tests/lean/run/sub.lean index 27c58e054d..8f9fb20950 100644 --- a/tests/lean/run/sub.lean +++ b/tests/lean/run/sub.lean @@ -1,2 +1,2 @@ -check { x : nat // x > 0 } -check { x : nat → nat // true } +#check { x : nat // x > 0 } +#check { x : nat → nat // true } diff --git a/tests/lean/run/sub_bug.lean b/tests/lean/run/sub_bug.lean index 98a6978c1b..c2d8664ea6 100644 --- a/tests/lean/run/sub_bug.lean +++ b/tests/lean/run/sub_bug.lean @@ -1,2 +1,2 @@ open nat subtype -check { x : nat // x > 0} +#check { x : nat // x > 0} diff --git a/tests/lean/run/subst_tac1.lean b/tests/lean/run/subst_tac1.lean index 22a681465c..c0bad7e897 100644 --- a/tests/lean/run/subst_tac1.lean +++ b/tests/lean/run/subst_tac1.lean @@ -8,7 +8,7 @@ by do intro `H1, intro `H2, trace_state, assumption -print ex +#print ex example (a b c : nat) (H : p c) : a = b → p a → p b := by do intros, diff --git a/tests/lean/run/super.lean b/tests/lean/run/super.lean index 0226943fa2..91ed12d571 100644 --- a/tests/lean/run/super.lean +++ b/tests/lean/run/super.lean @@ -1,4 +1,4 @@ constant f : nat → nat notation a `²` := f a variable a : nat -check a² +#check a² diff --git a/tests/lean/run/t1.lean b/tests/lean/run/t1.lean index 3b8b79674f..eccdc97f3a 100644 --- a/tests/lean/run/t1.lean +++ b/tests/lean/run/t1.lean @@ -1,10 +1,10 @@ prelude definition Prop : Type.{1} := Type.{0} -print raw ((Prop)) -print raw Prop -print raw fun (x y : Prop), x x -print raw fun (x y : Prop) {z : Prop}, x y -print raw λ [x : Prop] [y : Prop] {z : Prop}, x z -print raw Pi (x y : Prop) {z : Prop}, x -print raw ∀ (x y : Prop) {z : Prop}, x -print raw forall {x y : Prop} w {z : Prop}, x +#print raw ((Prop)) +#print raw Prop +#print raw fun (x y : Prop), x x +#print raw fun (x y : Prop) {z : Prop}, x y +#print raw λ [x : Prop] [y : Prop] {z : Prop}, x z +#print raw Pi (x y : Prop) {z : Prop}, x +#print raw ∀ (x y : Prop) {z : Prop}, x +#print raw forall {x y : Prop} w {z : Prop}, x diff --git a/tests/lean/run/t10.lean b/tests/lean/run/t10.lean index 5b0b3ab86e..10f2c3b7a8 100644 --- a/tests/lean/run/t10.lean +++ b/tests/lean/run/t10.lean @@ -1,5 +1,5 @@ set_option pp.colors true set_option pp.unicode false -print options +#print options set_option pp.unicode true -print options +#print options diff --git a/tests/lean/run/t11.lean b/tests/lean/run/t11.lean index 0ff8574ae0..90e224390b 100644 --- a/tests/lean/run/t11.lean +++ b/tests/lean/run/t11.lean @@ -1,15 +1,15 @@ constant A : Type constants a b c : A constant f : A → A → A -check f a b +#check f a b section universe variables u v parameters A B : Type u parameters {C D : Type v} parameters [e : A] [d : A] - check A - check B + #check A + #check B definition g (a : A) (b : B) (c : C) : A := e end -check g.{2 1} +#check g.{2 1} constants x y : A diff --git a/tests/lean/run/t2.lean b/tests/lean/run/t2.lean index 9cc3da13a5..96ed6e5903 100644 --- a/tests/lean/run/t2.lean +++ b/tests/lean/run/t2.lean @@ -1,9 +1,9 @@ universe variable l universe variable u -print raw Type -print raw Type.{1} -print raw Type.{2} -print raw Type.{l+1} -print raw Type.{max l u 1} -print raw Type.{imax l+1 u 1} -print raw Type.{imax l+1 l u} +#print raw Type +#print raw Type.{1} +#print raw Type.{2} +#print raw Type.{l+1} +#print raw Type.{max l u 1} +#print raw Type.{imax l+1 u 1} +#print raw Type.{imax l+1 l u} diff --git a/tests/lean/run/t3.lean b/tests/lean/run/t3.lean index cec25fd9db..4c151017ab 100644 --- a/tests/lean/run/t3.lean +++ b/tests/lean/run/t3.lean @@ -14,10 +14,10 @@ open int nat constants a b : int -check plus a b +#check plus a b constant f : int → int → int constant g : nat → nat → int notation A `+`:65 B:65 := f A (g B B) constant n : nat -check a + n +#check a + n diff --git a/tests/lean/run/t4.lean b/tests/lean/run/t4.lean index 4723a37fcd..cf33aa2fea 100644 --- a/tests/lean/run/t4.lean +++ b/tests/lean/run/t4.lean @@ -1,12 +1,12 @@ namespace foo definition {u} f (A : Type u) : Type u := A - check f.{1} + #check f.{1} end foo constant N : Type section variable A : Type* definition g (a : A) (B : Type*) : A := a - check g.{_ 2} + #check g.{_ 2} end -check g.{2 3} +#check g.{2 3} diff --git a/tests/lean/run/t5.lean b/tests/lean/run/t5.lean index 0c801acd1d..904967a813 100644 --- a/tests/lean/run/t5.lean +++ b/tests/lean/run/t5.lean @@ -3,17 +3,17 @@ namespace foo constant N : Type.{2} namespace tst constant N : Type.{3} - print raw N + #print raw N end tst end foo -print raw N +#print raw N namespace foo - print raw N + #print raw N namespace tst - print raw N N -> N + #print raw N N -> N section variable N : Type.{4} -- Shadow previous ones. - print raw N + #print raw N end end tst end foo diff --git a/tests/lean/run/t6.lean b/tests/lean/run/t6.lean index 07dc09eed6..ee7ff2b9d5 100644 --- a/tests/lean/run/t6.lean +++ b/tests/lean/run/t6.lean @@ -4,7 +4,7 @@ precedence `++` : 100 constant N : Type.{1} constant f : N → N → N constant a : N -check +#check let g x y := f x y, infix + := g, b : N := a+a, diff --git a/tests/lean/run/t7.lean b/tests/lean/run/t7.lean index 8ed803eeda..278eb1a8b0 100644 --- a/tests/lean/run/t7.lean +++ b/tests/lean/run/t7.lean @@ -1,3 +1,3 @@ constant A : Type.{1} constant f : A → A → A -print raw f _ (f _ _) +#print raw f _ (f _ _) diff --git a/tests/lean/run/tc_inout1.lean b/tests/lean/run/tc_inout1.lean index b74616b3ed..858511ce0d 100644 --- a/tests/lean/run/tc_inout1.lean +++ b/tests/lean/run/tc_inout1.lean @@ -31,7 +31,7 @@ instance int_mul_monoid : is_monoid int int.mul 1 := sorry open tactic -run_command do +run_cmd do M ← to_expr `(is_monoid nat), m₁ ← mk_mvar, m₂ ← mk_mvar, @@ -41,7 +41,7 @@ run_command do instantiate_mvars (M m₁ m₂) >>= trace -run_command do +run_cmd do M ← to_expr `(is_monoid nat nat.add), m₁ ← mk_mvar, i ← mk_instance (M m₁), @@ -69,8 +69,8 @@ local infix ∈ := mem2 instance (α : Type u) : has_mem2 α (list α) := ⟨list.mem⟩ -check λ a (s : list nat), a ∈ s +#check λ a (s : list nat), a ∈ s set_option pp.notation false -check ∀ a ∈ [1, 2, 3], a > 0 +#check ∀ a ∈ [1, 2, 3], a > 0 end diff --git a/tests/lean/run/tc_loop.lean b/tests/lean/run/tc_loop.lean index acccff54f6..3bec3c7196 100644 --- a/tests/lean/run/tc_loop.lean +++ b/tests/lean/run/tc_loop.lean @@ -1,8 +1,8 @@ open tactic -check (do { trace "foo", trace_state } : tactic unit) +#check (do { trace "foo", trace_state } : tactic unit) axiom Sorry {A : Sort*} : A -check +#check λ (A : Sort*) (a b c d : A) (H₁ : a = b) (H₂ : c = b) (H₃ : d = c), have a = c, by do { trace "have-expr...", trace_state, transitivity, assumption, symmetry, assumption }, show a = d, from Sorry diff --git a/tests/lean/run/test_perm_ac1.lean b/tests/lean/run/test_perm_ac1.lean index 2a9cd0049b..135fc17d7e 100644 --- a/tests/lean/run/test_perm_ac1.lean +++ b/tests/lean/run/test_perm_ac1.lean @@ -1,4 +1,4 @@ -exit +#exit open expr decidable tactic nat diff --git a/tests/lean/run/tick_id.lean b/tests/lean/run/tick_id.lean index 4282ff86bd..5443e46a22 100644 --- a/tests/lean/run/tick_id.lean +++ b/tests/lean/run/tick_id.lean @@ -4,6 +4,6 @@ def id₂ {α : Type} (a : α) : α := a def id₃ {β : Type} (b : β) : β := b -check λ (α β : Type) (f : α → β) (a : α), f a +#check λ (α β : Type) (f : α → β) (a : α), f a -check λ ('a 'b : Type) (f : 'a → 'b) (a : 'a), f a +#check λ ('a 'b : Type) (f : 'a → 'b) (a : 'a), f a diff --git a/tests/lean/run/trace_call_stack_segfault.lean b/tests/lean/run/trace_call_stack_segfault.lean index 154993cd36..a8eae4e5b6 100644 --- a/tests/lean/run/trace_call_stack_segfault.lean +++ b/tests/lean/run/trace_call_stack_segfault.lean @@ -1,3 +1,3 @@ open tactic -run_command trace_call_stack +run_cmd trace_call_stack diff --git a/tests/lean/run/trace_tst.lean b/tests/lean/run/trace_tst.lean index 8dc56d59e3..ac604522d1 100644 --- a/tests/lean/run/trace_tst.lean +++ b/tests/lean/run/trace_tst.lean @@ -1,3 +1,3 @@ open nat -vm_eval trace "step1" (trace "hello" (succ 3)) +#eval trace "step1" (trace "hello" (succ 3)) diff --git a/tests/lean/run/try_for1.lean b/tests/lean/run/try_for1.lean index 11ceab09ad..d78f076f8f 100644 --- a/tests/lean/run/try_for1.lean +++ b/tests/lean/run/try_for1.lean @@ -1,9 +1,9 @@ meta def f : nat → nat | n := f (n + 1) -vm_eval try_for 100 (f 10) +#eval try_for 100 (f 10) -vm_eval try_for 1000 (f 10) +#eval try_for 1000 (f 10) meta def mk : nat → list nat | 0 := [] diff --git a/tests/lean/run/unicode.lean b/tests/lean/run/unicode.lean index 637479edff..0b91f068c7 100644 --- a/tests/lean/run/unicode.lean +++ b/tests/lean/run/unicode.lean @@ -1,8 +1,8 @@ constant N : Type constant α : N constant β₁ : N -check β₁ +#check β₁ constant δ : N -check δ +#check δ constant δ₁₁ : N -check δ₁₁ +#check δ₁₁ diff --git a/tests/lean/run/unification_hints.lean b/tests/lean/run/unification_hints.lean index 72e145b05a..76147e6ef7 100644 --- a/tests/lean/run/unification_hints.lean +++ b/tests/lean/run/unification_hints.lean @@ -17,7 +17,7 @@ set_option trace.type_context.unification_hint true definition ex1 (a : A) (H : g x y = a) : f z = a := by do {trace_state, assumption} -print ex1 +#print ex1 end toy namespace add @@ -34,6 +34,6 @@ definition add_zero_hint (m n : ℕ) [has_add ℕ] [has_one ℕ] [has_zero ℕ] definition ex2 (H : n + 1 = 0) : succ n = 0 := by assumption -print ex2 +#print ex2 end add diff --git a/tests/lean/run/unify_fo_approx_bug1.lean b/tests/lean/run/unify_fo_approx_bug1.lean index 98e1eb7a10..18ed175445 100644 --- a/tests/lean/run/unify_fo_approx_bug1.lean +++ b/tests/lean/run/unify_fo_approx_bug1.lean @@ -1,4 +1,4 @@ -check ( return (1, 1) : list (nat × nat) ) +#check ( return (1, 1) : list (nat × nat) ) constant A : Type constant B : Type @@ -6,6 +6,6 @@ constant B : Type set_option pp.binder_types true set_option pp.universes true -check λ (A : Type) (B : Type) (a : A) (b : B), (return (a, b) : list (A × B)) +#check λ (A : Type) (B : Type) (a : A) (b : B), (return (a, b) : list (A × B)) -check λ (A : Type) (B : Type) (C : Type) (a : A) (b : B) (c : C), (return (a, b, a, c) : list (A × B × A × C)) +#check λ (A : Type) (B : Type) (C : Type) (a : A) (b : B) (c : C), (return (a, b, a, c) : list (A × B × A × C)) diff --git a/tests/lean/run/user_simp_attributes.lean b/tests/lean/run/user_simp_attributes.lean index 4715576ec9..bdeaaaf3f3 100644 --- a/tests/lean/run/user_simp_attributes.lean +++ b/tests/lean/run/user_simp_attributes.lean @@ -1,5 +1,5 @@ -run_command mk_simp_attr `boo -run_command mk_simp_attr `bla +run_cmd mk_simp_attr `boo +run_cmd mk_simp_attr `bla constant f : nat → nat @@ -11,12 +11,12 @@ sorry example : f 0 = 1 := by simp with boo -print "----" +#print "----" example : f 2 = 1 := by simp with boo -print "----" +#print "----" constant g : nat → nat @@ -31,7 +31,7 @@ sorry example : f 2 = g 1 := by simp with boo -print "-------" +#print "-------" example : f 2 = h (g 1) := by simp with boo bla diff --git a/tests/lean/run/vars_anywhere.lean b/tests/lean/run/vars_anywhere.lean index 8b1206012e..e3529b2599 100644 --- a/tests/lean/run/vars_anywhere.lean +++ b/tests/lean/run/vars_anywhere.lean @@ -1,9 +1,9 @@ variable {A : Type} -check @id +#check @id inductive List | nil : List | cons : A → List → List -check @List.cons +#check @List.cons diff --git a/tests/lean/run/vm_check_bug.lean b/tests/lean/run/vm_check_bug.lean index 76f112b309..129047de9d 100644 --- a/tests/lean/run/vm_check_bug.lean +++ b/tests/lean/run/vm_check_bug.lean @@ -4,4 +4,4 @@ def f : nat → nat → nat | 0 (y+1) := 1 | 0 0 := 1 -vm_eval f 1 1000 +#eval f 1 1000 diff --git a/tests/lean/run/vm_eval1.lean b/tests/lean/run/vm_eval1.lean index 2bf479fd82..6b37423aeb 100644 --- a/tests/lean/run/vm_eval1.lean +++ b/tests/lean/run/vm_eval1.lean @@ -19,16 +19,16 @@ definition x : nat := 20 definition tst (b : bool) (a : nat) : foo b := bool.cases_on b (λ n : nat, n * a) a -eval bla ff (λ n : nat, n+10) -eval bla tt x -eval boo 11 x -eval boo 9 (λ n : nat, n+20) -eval tst ff 4 10 -eval tst tt 3 -print "---------" -vm_eval bla ff (λ n : nat, n+10) -vm_eval bla tt x -vm_eval boo 11 x -vm_eval boo 9 (λ n : nat, n+20) -vm_eval tst ff 4 10 -vm_eval tst tt 3 +#reduce bla ff (λ n : nat, n+10) +#reduce bla tt x +#reduce boo 11 x +#reduce boo 9 (λ n : nat, n+20) +#reduce tst ff 4 10 +#reduce tst tt 3 +#print "---------" +#eval bla ff (λ n : nat, n+10) +#eval bla tt x +#eval boo 11 x +#eval boo 9 (λ n : nat, n+20) +#eval tst ff 4 10 +#eval tst tt 3 diff --git a/tests/lean/run/whenIO.lean b/tests/lean/run/whenIO.lean index c71389e271..008f01b00a 100644 --- a/tests/lean/run/whenIO.lean +++ b/tests/lean/run/whenIO.lean @@ -3,5 +3,5 @@ open io def iowhen (b : bool) (a : io unit) : io unit := if b = tt then a else return () -vm_eval iowhen tt (put_str "hello\n") -vm_eval iowhen ff (put_str "error\n") +#eval iowhen tt (put_str "hello\n") +#eval iowhen ff (put_str "error\n") diff --git a/tests/lean/sec3.lean b/tests/lean/sec3.lean index b5920481a8..e378680522 100644 --- a/tests/lean/sec3.lean +++ b/tests/lean/sec3.lean @@ -2,5 +2,5 @@ section parameter A : Type definition tst (a : A) := a set_option pp.universes true - check tst.{1} + #check tst.{1} end diff --git a/tests/lean/sec3.lean.expected.out b/tests/lean/sec3.lean.expected.out index e51c5eb84a..07749811f8 100644 --- a/tests/lean/sec3.lean.expected.out +++ b/tests/lean/sec3.lean.expected.out @@ -1 +1 @@ -sec3.lean:5:8: error: invalid use of explicit universe parameter, identifier is a variable, parameter or a constant bound to parameters in a section +sec3.lean:5:9: error: invalid use of explicit universe parameter, identifier is a variable, parameter or a constant bound to parameters in a section diff --git a/tests/lean/sec_param_pp.lean b/tests/lean/sec_param_pp.lean index 6e6b75f822..bb7555f718 100644 --- a/tests/lean/sec_param_pp.lean +++ b/tests/lean/sec_param_pp.lean @@ -3,18 +3,18 @@ section variable f : A → A → A definition id2 : A := a - check id2 + #check id2 definition pr (b : A) : A := f a b - check pr f id2 + #check pr f id2 set_option pp.universes true - check pr f id2 + #check pr f id2 definition pr2 (B : Type*) (b : B) : A := a - check pr2 num 10 + #check pr2 num 10 end diff --git a/tests/lean/sec_param_pp2.lean b/tests/lean/sec_param_pp2.lean index a16e2df108..770b29f4d9 100644 --- a/tests/lean/sec_param_pp2.lean +++ b/tests/lean/sec_param_pp2.lean @@ -8,10 +8,10 @@ section definition id2 := f a b - check id2 + #check id2 set_option pp.universes true - check id2 + #check id2 end - check id2 + #check id2 end -check id2 +#check id2 diff --git a/tests/lean/set_of.lean b/tests/lean/set_of.lean index 4a5b295f36..213e3220ac 100644 --- a/tests/lean/set_of.lean +++ b/tests/lean/set_of.lean @@ -1,9 +1,9 @@ -check {x : nat | x > 0} -check {x | x > 0} -check {p : nat × nat | p.1 > p.2 } +#check {x : nat | x > 0} +#check {x | x > 0} +#check {p : nat × nat | p.1 > p.2 } set_option pp.binder_types false -check {x : nat | x > 0} -check {x | x > 0} -check {p : nat × nat | p.1 > p.2 } +#check {x : nat | x > 0} +#check {x | x > 0} +#check {p : nat × nat | p.1 > p.2 } diff --git a/tests/lean/set_opt_tac.lean b/tests/lean/set_opt_tac.lean index 1ee88da502..39f7231ca5 100644 --- a/tests/lean/set_opt_tac.lean +++ b/tests/lean/set_opt_tac.lean @@ -11,5 +11,5 @@ by do rfl ← mk_const `rfl, apply rfl -print "set_bool_option tactic does not affect other commands" -check (0:nat) + 1 +#print "set_bool_option tactic does not affect other commands" +#check (0:nat) + 1 diff --git a/tests/lean/slow_error.lean b/tests/lean/slow_error.lean index 33ecb47ddc..6f160ad4c1 100644 --- a/tests/lean/slow_error.lean +++ b/tests/lean/slow_error.lean @@ -1,4 +1,4 @@ variable a : caching_user_attribute string variable b : string -check a = b +#check a = b diff --git a/tests/lean/slow_error.lean.expected.out b/tests/lean/slow_error.lean.expected.out index 59352ca9a3..b02aaeafbc 100644 --- a/tests/lean/slow_error.lean.expected.out +++ b/tests/lean/slow_error.lean.expected.out @@ -1,4 +1,4 @@ -slow_error.lean:4:8: error: type mismatch at application +slow_error.lean:4:9: error: type mismatch at application a = b term b diff --git a/tests/lean/struct_class.lean b/tests/lean/struct_class.lean index 3b9d0ca652..d25ab280d8 100644 --- a/tests/lean/struct_class.lean +++ b/tests/lean/struct_class.lean @@ -4,9 +4,9 @@ import init.core structure [class] point (A : Type*) (B : Type*) := mk :: (x : A) (y : B) -print classes +#print classes structure point2 (A : Type*) (B : Type*) := mk :: (x : A) (y : B) -print classes +#print classes diff --git a/tests/lean/subpp.lean b/tests/lean/subpp.lean index 5f130a344d..156f0fd92b 100644 --- a/tests/lean/subpp.lean +++ b/tests/lean/subpp.lean @@ -1,2 +1,2 @@ -- -check {x : nat // x > 0 } +#check {x : nat // x > 0 } diff --git a/tests/lean/t10.lean b/tests/lean/t10.lean index 274b28fc00..568ebc8ea9 100644 --- a/tests/lean/t10.lean +++ b/tests/lean/t10.lean @@ -10,14 +10,14 @@ constant y : N constant z : N infixr ` ∧ `:25 := and notation `if` c `then` t:45 `else` e:45 := ite c t e -check if p ∧ q then f x else y -check if p ∧ q then q else y +#check if p ∧ q then f x else y +#check if p ∧ q then q else y constant list : Type.{1} constant nil : list constant cons : N → list → list -- Non empty lists notation `[` l:(foldr `, ` (h t, cons h t) nil) `]` := l -check [x, y, z, x, y, y] -check [x] +#check [x, y, z, x, y, y] +#check [x] notation `[` `]` := nil -check [] +#check [] diff --git a/tests/lean/t10.lean.expected.out b/tests/lean/t10.lean.expected.out index 8aeaff243b..b637a3ddb3 100644 --- a/tests/lean/t10.lean.expected.out +++ b/tests/lean/t10.lean.expected.out @@ -1,5 +1,5 @@ if p ∧ q then f x else y : N -t10.lean:14:6: error: type mismatch at application +t10.lean:14:7: error: type mismatch at application ite (p ∧ q) q term q diff --git a/tests/lean/t11.lean b/tests/lean/t11.lean index f0e5ef7cfe..d7a077f619 100644 --- a/tests/lean/t11.lean +++ b/tests/lean/t11.lean @@ -5,7 +5,7 @@ notation `exists` binders `, ` b:(scoped b, Exists b) := b notation `∃` binders `, ` b:(scoped b, Exists b) := b constant p : A → bool constant q : A → A → bool -check exists x : A, p x -check ∃ x y : A, q x y +#check exists x : A, p x +#check ∃ x y : A, q x y notation `{` binder `|` b:scoped `}` := b -check {x : A | x} +#check {x : A | x} diff --git a/tests/lean/t12.lean b/tests/lean/t12.lean index f79c621421..4e10e26ad3 100644 --- a/tests/lean/t12.lean +++ b/tests/lean/t12.lean @@ -1,7 +1,7 @@ prelude precedence `+` : 65 precedence `*` : 75 constant N : Type.{1} -check λ (f : N -> N -> N) (g : N → N → N) (infix + := f) (infix * := g) (x y : N), x+x*y +#check λ (f : N -> N -> N) (g : N → N → N) (infix + := f) (infix * := g) (x y : N), x+x*y constant f : N → N → N constant a : N -check a+a -- + notation is not available anymore +#check a+a -- + notation is not available anymore diff --git a/tests/lean/t12.lean.expected.out b/tests/lean/t12.lean.expected.out index 0d908e7008..8afbc19627 100644 --- a/tests/lean/t12.lean.expected.out +++ b/tests/lean/t12.lean.expected.out @@ -1,2 +1,2 @@ λ (f g : N → N → N) (x y : N), f x (g x y) : (N → N → N) → (N → N → N) → N → N → N -t12.lean:7:7: error: invalid expression +t12.lean:7:8: error: invalid expression diff --git a/tests/lean/t13.lean b/tests/lean/t13.lean index cef8024b67..70c7ac4113 100644 --- a/tests/lean/t13.lean +++ b/tests/lean/t13.lean @@ -6,7 +6,7 @@ infixl + := f infixl + := g constant a : A constant b : A -print raw a+b -- + is overloaded -check fun (h : A → A → A) +#print raw a+b -- + is overloaded +#check fun (h : A → A → A) (infixl + := h), -- Like local declarations, local notation "shadows" global one. a+b diff --git a/tests/lean/t14.lean b/tests/lean/t14.lean index fcd38314cb..b2f114d2c2 100644 --- a/tests/lean/t14.lean +++ b/tests/lean/t14.lean @@ -7,16 +7,16 @@ end foo section open foo (renaming a->b x->y) (hiding c) - check b - check y - check c -- Error + #check b + #check y + #check c -- Error end section open foo (a x) - check a - check x - check c -- Error + #check a + #check x + #check c -- Error end section @@ -25,9 +25,9 @@ end section open foo - check a - check c - check A + #check a + #check c + #check A end namespace foo @@ -37,5 +37,5 @@ end foo section open foo - check a * c + #check a * c end diff --git a/tests/lean/t14.lean.expected.out b/tests/lean/t14.lean.expected.out index 8931575b6a..ed667f6e60 100644 --- a/tests/lean/t14.lean.expected.out +++ b/tests/lean/t14.lean.expected.out @@ -1,9 +1,9 @@ b : A y : A -t14.lean:12:8: error: unknown identifier 'c' +t14.lean:12:9: error: unknown identifier 'c' a : foo.A x : foo.A -t14.lean:19:8: error: unknown identifier 'c' +t14.lean:19:9: error: unknown identifier 'c' t14.lean:23:26: error: invalid 'open/export' command option, mixing explicit and implicit 'open/export' options a : A c : A diff --git a/tests/lean/t2.lean b/tests/lean/t2.lean index 19f8e82c64..fb21d6e8b1 100644 --- a/tests/lean/t2.lean +++ b/tests/lean/t2.lean @@ -1,2 +1,2 @@ -print "hello world" -print "testing" +#print "hello world" +#print "testing" diff --git a/tests/lean/t5.lean b/tests/lean/t5.lean index 750632b64f..d72a271d41 100644 --- a/tests/lean/t5.lean +++ b/tests/lean/t5.lean @@ -2,12 +2,12 @@ constant N : Type.{1} constant f : N → N constant a : N noncomputable definition g (a : N) : N := f a -check g +#check g namespace foo noncomputable definition h : N := f a - check h + #check h private noncomputable definition q : N := f a - check q + #check q end foo -check foo.h -check q -- Error q is now hidden +#check foo.h +#check q -- Error q is now hidden diff --git a/tests/lean/t5.lean.expected.out b/tests/lean/t5.lean.expected.out index 479afd3739..47bcf06573 100644 --- a/tests/lean/t5.lean.expected.out +++ b/tests/lean/t5.lean.expected.out @@ -2,4 +2,4 @@ g : N → N h : N q : N foo.h : N -t5.lean:13:6: error: unknown identifier 'q' +t5.lean:13:7: error: unknown identifier 'q' diff --git a/tests/lean/t6.lean b/tests/lean/t6.lean index 03ce609546..0b1666df00 100644 --- a/tests/lean/t6.lean +++ b/tests/lean/t6.lean @@ -6,6 +6,6 @@ section definition refl : Prop := forall (a : A), R a a definition symm : Prop := forall (a b : A), R a b -> R b a end -check id.{2} -check refl.{1} -check symm.{1} +#check id.{2} +#check refl.{1} +#check symm.{1} diff --git a/tests/lean/task.lean b/tests/lean/task.lean index 29d986ac5f..1e304b70e2 100644 --- a/tests/lean/task.lean +++ b/tests/lean/task.lean @@ -1,6 +1,6 @@ import data.vector -run_command tactic.run_async (tactic.trace +run_cmd tactic.run_async (tactic.trace "trace message from a different task") def {u} foo {α : Type u} {n : ℕ} : vector α (0+n) → vector α n := @@ -9,4 +9,4 @@ if n = 0 then else λ v, cast (by async { simp }) v -print foo +#print foo diff --git a/tests/lean/trace1.lean b/tests/lean/trace1.lean index d1d140930d..43c8a36d3d 100644 --- a/tests/lean/trace1.lean +++ b/tests/lean/trace1.lean @@ -8,7 +8,7 @@ by do constructor set_option trace.app_builder true -print "------------" +#print "------------" example : true := by do diff --git a/tests/lean/trace2.lean b/tests/lean/trace2.lean index 44b26f45fd..e0d20eded7 100644 --- a/tests/lean/trace2.lean +++ b/tests/lean/trace2.lean @@ -10,7 +10,7 @@ by do constructor set_option trace.foo.bla true -print "------------" +#print "------------" example : true := by do diff --git a/tests/lean/trust0/t1.lean b/tests/lean/trust0/t1.lean index f99dc4ae77..efdea881cd 100644 --- a/tests/lean/trust0/t1.lean +++ b/tests/lean/trust0/t1.lean @@ -1,2 +1,2 @@ import standard -print trust +#print trust diff --git a/tests/lean/tuple.lean b/tests/lean/tuple.lean index 8bd35a027b..b84936f53a 100644 --- a/tests/lean/tuple.lean +++ b/tests/lean/tuple.lean @@ -5,4 +5,4 @@ set_option pp.universes true definition {u} tuple (A : Type (u+1)) (n : nat) : Type (u+1) := nat.rec_on n A (λ n r, r × A) -check @tuple +#check @tuple diff --git a/tests/lean/type_class_bug.lean b/tests/lean/type_class_bug.lean index e7d06a706e..c554779e99 100644 --- a/tests/lean/type_class_bug.lean +++ b/tests/lean/type_class_bug.lean @@ -1,10 +1,10 @@ set_option pp.all true -check +#check (do { a : nat ← [1], return a } : list nat ) -check +#check (do { a : nat ← [1, 2, 3], b : nat ← [3, 4], diff --git a/tests/lean/type_error_at_eval_expr.lean b/tests/lean/type_error_at_eval_expr.lean index 5783f8c27d..bea4b567a8 100644 --- a/tests/lean/type_error_at_eval_expr.lean +++ b/tests/lean/type_error_at_eval_expr.lean @@ -1,6 +1,6 @@ open tactic -run_command do +run_cmd do e ← to_expr `([5] : list ℕ), eval_expr ℕ e, return () diff --git a/tests/lean/uni_bug1.lean b/tests/lean/uni_bug1.lean index 7e57480434..ca00c51ee8 100644 --- a/tests/lean/uni_bug1.lean +++ b/tests/lean/uni_bug1.lean @@ -6,4 +6,4 @@ constant f (a b : nat) (H : R a b) : nat axiom Rtrue (a b : nat) : R a b -check f 1 0 (Rtrue (fst (prod.mk 1 (0:nat))) 0) +#check f 1 0 (Rtrue (fst (prod.mk 1 (0:nat))) 0) diff --git a/tests/lean/unification_hints1.lean b/tests/lean/unification_hints1.lean index 2ee01fab04..de6a69e5ea 100644 --- a/tests/lean/unification_hints1.lean +++ b/tests/lean/unification_hints1.lean @@ -14,7 +14,7 @@ noncomputable definition toy_hint (x y : A) : unification_hint := constraints := [] } #unify (g x y), (f z) -print [unify] +#print [unify] end toy @@ -30,7 +30,7 @@ definition add_zero_hint (m n : ℕ) [has_add ℕ] [has_one ℕ] [has_zero ℕ] constraints := [m ≟ n] } #unify (n + 1), (succ n) -print [unify] +#print [unify] end add @@ -56,6 +56,6 @@ noncomputable definition Canonical_hint (C : Canonical) : unification_hint := -- the default_type_context does not recognize the elaborator metavariables as metavariables, -- and so cannot perform the assignment. #unify (Canonical.carrier A_canonical), A -print [unify] +#print [unify] end canonical diff --git a/tests/lean/univ.lean b/tests/lean/univ.lean index 883f3082c2..fe8d74e814 100644 --- a/tests/lean/univ.lean +++ b/tests/lean/univ.lean @@ -2,19 +2,19 @@ definition id2 (A : Type*) (a : A) := a -check id2 Type* num +#check id2 Type* num -check id2 Type* num +#check id2 Type* num -check id2 Type num +#check id2 Type num -check id2 _ num +#check id2 _ num -check id2 (Sort (_+1)) num +#check id2 (Sort (_+1)) num -check id2 (Sort (0+1)) num +#check id2 (Sort (0+1)) num -check id2 Type* (Type 1) +#check id2 Type* (Type 1) -check id2 (Type*) (Type 1) +#check id2 (Type*) (Type 1) diff --git a/tests/lean/univ_vars.lean b/tests/lean/univ_vars.lean index ceb61b9c7f..4ea3ba217a 100644 --- a/tests/lean/univ_vars.lean +++ b/tests/lean/univ_vars.lean @@ -5,24 +5,24 @@ universe variable u variable A : Type.{u} definition id1 (a : A) : A := a -check @id1 +#check @id1 variable B : Type definition id2 (a : B) : B := a -check @id2 +#check @id2 universe variable k variable C : Type.{k} definition id3 (a : C) := a -check @id3 +#check @id3 universe variables l m variable A₁ : Type.{l} variable A₂ : Type.{l} definition foo (a₁ : A₁) (a₂ : A₂) := a₁ == a₂ -check @foo +#check @foo -check Type.{m} +#check Type.{m} diff --git a/tests/lean/user_attribute.lean b/tests/lean/user_attribute.lean index bf10dcbab9..814be4a07a 100644 --- a/tests/lean/user_attribute.lean +++ b/tests/lean/user_attribute.lean @@ -1,36 +1,36 @@ definition foo_attr : user_attribute := { name := `foo, descr := "bar" } -run_command attribute.register `foo_attr +run_cmd attribute.register `foo_attr attribute [foo] eq.refl -print [foo] -print eq.refl -run_command attribute.get_instances `foo >>= tactic.pp >>= tactic.trace -print "---" +#print [foo] +#print eq.refl +run_cmd attribute.get_instances `foo >>= tactic.pp >>= tactic.trace +#print "---" -- compound names definition foo_baz_attr : user_attribute := ⟨`foo.baz, "bar"⟩ -run_command attribute.register `foo_baz_attr +run_cmd attribute.register `foo_baz_attr attribute [foo.baz] eq.refl -print [foo.baz] -print eq.refl -run_command attribute.get_instances `foo.baz >>= tactic.pp >>= tactic.trace +#print [foo.baz] +#print eq.refl +run_cmd attribute.get_instances `foo.baz >>= tactic.pp >>= tactic.trace -- can't redeclare attributes definition duplicate : user_attribute := ⟨`reducible, "bar"⟩ -run_command attribute.register `duplicate +run_cmd attribute.register `duplicate -- wrong type definition bar := "bar" -run_command attribute.register `bar +run_cmd attribute.register `bar section variable x : string definition baz_attr : user_attribute := ⟨`baz, x⟩ - run_command attribute.register `baz_attr + run_cmd attribute.register `baz_attr end diff --git a/tests/lean/utf8.lean b/tests/lean/utf8.lean index 89c5f39565..8455ee9cac 100644 --- a/tests/lean/utf8.lean +++ b/tests/lean/utf8.lean @@ -1,9 +1,9 @@ open list -vm_eval length "α₁" -vm_eval length "α₁ → β₁" -vm_eval length "∀ α : nat → nat, α 0 ≥ 0" -print "------------" -vm_eval utf8_length "α₁" -vm_eval utf8_length "α₁ → β₁" -vm_eval utf8_length "∀ α : nat → nat, α 0 ≥ 0" +#eval length "α₁" +#eval length "α₁ → β₁" +#eval length "∀ α : nat → nat, α 0 ≥ 0" +#print "------------" +#eval utf8_length "α₁" +#eval utf8_length "α₁ → β₁" +#eval utf8_length "∀ α : nat → nat, α 0 ≥ 0" diff --git a/tests/lean/var2.lean b/tests/lean/var2.lean index 8dff452c12..9eec24b472 100644 --- a/tests/lean/var2.lean +++ b/tests/lean/var2.lean @@ -11,4 +11,4 @@ section definition foo := fun (H : A = B), cast H a = b end -check foo +#check foo diff --git a/tests/lean/vm_eval_crash.lean b/tests/lean/vm_eval_crash.lean index 34f90d1da4..2e2d009e4e 100644 --- a/tests/lean/vm_eval_crash.lean +++ b/tests/lean/vm_eval_crash.lean @@ -1 +1 @@ -vm_eval 10 +#eval 10 diff --git a/tests/lean/vm_let_expr.lean b/tests/lean/vm_let_expr.lean index 8aa36a99a8..08d3c86012 100644 --- a/tests/lean/vm_let_expr.lean +++ b/tests/lean/vm_let_expr.lean @@ -5,7 +5,7 @@ meta def mk_fn (sz : nat) : nat → nat := let n := mk_value sz in λ x, x + n -vm_eval let f := mk_fn 10 in f 1 + f 2 + f 3 + f 4 +#eval let f := mk_fn 10 in f 1 + f 2 + f 3 + f 4 -vm_eval ((let x := mk_value 10 in mk_fn x) 10) +#eval ((let x := mk_value 10 in mk_fn x) 10) diff --git a/tests/lean/vm_sorry.lean b/tests/lean/vm_sorry.lean index 5a3d508d1e..68ed3e2440 100644 --- a/tests/lean/vm_sorry.lean +++ b/tests/lean/vm_sorry.lean @@ -2,17 +2,17 @@ def half_baked : bool → ℕ | tt := 42 | ff := sorry -vm_eval (half_baked tt) -vm_eval (half_baked ff) +#eval (half_baked tt) +#eval (half_baked ff) meta def my_partial_fun : bool → ℕ | tt := 42 | ff := undefined -vm_eval (my_partial_fun ff) +#eval (my_partial_fun ff) open expr tactic -run_command (do v ← to_expr `(half_baked ff) >>= whnf, +run_cmd (do v ← to_expr `(half_baked ff) >>= whnf, trace $ to_string v^.is_sorry) example : 0 = 1 := by admit diff --git a/tests/lean/whnf.lean b/tests/lean/whnf.lean index 87cc585ac1..f8f27ad3c1 100644 --- a/tests/lean/whnf.lean +++ b/tests/lean/whnf.lean @@ -1,8 +1,8 @@ open nat -eval [whnf] (fun x, x + 1) (2:nat) -eval (fun x, x + 1) (2:nat) +#reduce [whnf] (fun x, x + 1) (2:nat) +#reduce (fun x, x + 1) (2:nat) variable a : nat -eval [whnf] a + succ nat.zero -eval a + succ nat.zero +#reduce [whnf] a + succ nat.zero +#reduce a + succ nat.zero