isabelle update -u control_cartouches;
authorwenzelm
Fri Jan 04 23:22:53 2019 +0100 (4 months ago)
changeset 695933dda49e08b9d
parent 69592 a80d8ec6c998
child 69594 1d340f7f8dce
isabelle update -u control_cartouches;
src/CCL/CCL.thy
src/CCL/Term.thy
src/CCL/Type.thy
src/CCL/Wfd.thy
src/CCL/ex/Stream.thy
src/CTT/CTT.thy
src/CTT/ex/Elimination.thy
src/CTT/ex/Equality.thy
src/CTT/ex/Synthesis.thy
src/Cube/Cube.thy
src/Doc/Isar_Ref/First_Order_Logic.thy
src/Doc/Logics_ZF/IFOL_examples.thy
src/Doc/Logics_ZF/ZF_Isar.thy
src/Doc/System/Environment.thy
src/Doc/System/Server.thy
src/Doc/System/Sessions.thy
src/Doc/antiquote_setup.ML
src/FOL/FOL.thy
src/FOL/IFOL.thy
src/FOL/ex/Intuitionistic.thy
src/FOL/ex/Locale_Test/Locale_Test1.thy
src/FOL/ex/Miniscope.thy
src/FOL/ex/Prolog.thy
src/FOL/ex/Propositional_Cla.thy
src/FOL/ex/Propositional_Int.thy
src/FOL/ex/Quantifiers_Int.thy
src/FOL/fologic.ML
src/FOL/simpdata.ML
src/FOLP/FOLP.thy
src/FOLP/IFOLP.thy
src/FOLP/ex/Classical.thy
src/FOLP/ex/If.thy
src/FOLP/ex/Intro.thy
src/FOLP/ex/Intuitionistic.thy
src/FOLP/ex/Nat.thy
src/FOLP/ex/Propositional_Cla.thy
src/FOLP/ex/Propositional_Int.thy
src/FOLP/ex/Quantifiers_Cla.thy
src/FOLP/ex/Quantifiers_Int.thy
src/FOLP/hypsubst.ML
src/FOLP/simp.ML
src/FOLP/simpdata.ML
src/HOL/BNF_Wellorder_Relation.thy
src/HOL/Binomial.thy
src/HOL/Code_Numeral.thy
src/HOL/Complete_Lattices.thy
src/HOL/Complete_Partial_Order.thy
src/HOL/Conditionally_Complete_Lattices.thy
src/HOL/Deriv.thy
src/HOL/Divides.thy
src/HOL/Eisbach/Eisbach_Tools.thy
src/HOL/Eisbach/eisbach_rule_insts.ML
src/HOL/Eisbach/match_method.ML
src/HOL/Eisbach/method_closure.ML
src/HOL/Enum.thy
src/HOL/Euclidean_Division.thy
src/HOL/Extraction.thy
src/HOL/Fields.thy
src/HOL/Filter.thy
src/HOL/Finite_Set.thy
src/HOL/Fun.thy
src/HOL/GCD.thy
src/HOL/Groebner_Basis.thy
src/HOL/Groups.thy
src/HOL/Groups_Big.thy
src/HOL/Groups_List.thy
src/HOL/HOL.thy
src/HOL/Hilbert_Choice.thy
src/HOL/Inductive.thy
src/HOL/Int.thy
src/HOL/Isar_Examples/Higher_Order_Logic.thy
src/HOL/Lattices.thy
src/HOL/Lattices_Big.thy
src/HOL/Library/AList.thy
src/HOL/Library/Bit.thy
src/HOL/Library/Cancellation/cancel.ML
src/HOL/Library/Cancellation/cancel_data.ML
src/HOL/Library/Cancellation/cancel_simprocs.ML
src/HOL/Library/Cardinality.thy
src/HOL/Library/Code_Abstract_Nat.thy
src/HOL/Library/Code_Binary_Nat.thy
src/HOL/Library/Code_Lazy.thy
src/HOL/Library/Code_Prolog.thy
src/HOL/Library/Code_Target_Nat.thy
src/HOL/Library/Code_Test.thy
src/HOL/Library/Complete_Partial_Order2.thy
src/HOL/Library/Countable.thy
src/HOL/Library/Countable_Set_Type.thy
src/HOL/Library/DAList_Multiset.thy
src/HOL/Library/Disjoint_Sets.thy
src/HOL/Library/Dlist.thy
src/HOL/Library/Extended_Nat.thy
src/HOL/Library/Extended_Nonnegative_Real.thy
src/HOL/Library/Extended_Real.thy
src/HOL/Library/FSet.thy
src/HOL/Library/Finite_Lattice.thy
src/HOL/Library/Finite_Map.thy
src/HOL/Library/Float.thy
src/HOL/Library/FuncSet.thy
src/HOL/Library/Function_Division.thy
src/HOL/Library/Going_To_Filter.thy
src/HOL/Library/IArray.thy
src/HOL/Library/Infinite_Set.thy
src/HOL/Library/LaTeXsugar.thy
src/HOL/Library/Lub_Glb.thy
src/HOL/Library/Monad_Syntax.thy
src/HOL/Library/Multiset.thy
src/HOL/Library/Nat_Bijection.thy
src/HOL/Library/Nonpos_Ints.thy
src/HOL/Library/Numeral_Type.thy
src/HOL/Library/Open_State_Syntax.thy
src/HOL/Library/Pattern_Aliases.thy
src/HOL/Library/Periodic_Fun.thy
src/HOL/Library/Phantom_Type.thy
src/HOL/Library/Predicate_Compile_Alternative_Defs.thy
src/HOL/Library/Quotient_Type.thy
src/HOL/Library/RBT_Impl.thy
src/HOL/Library/RBT_Mapping.thy
src/HOL/Library/Ramsey.thy
src/HOL/Library/Sum_of_Squares/sos_wrapper.ML
src/HOL/Library/Tree.thy
src/HOL/Library/Tree_Multiset.thy
src/HOL/Library/Tree_Real.thy
src/HOL/Library/Type_Length.thy
src/HOL/Library/While_Combinator.thy
src/HOL/Library/adhoc_overloading.ML
src/HOL/Library/case_converter.ML
src/HOL/Library/cconv.ML
src/HOL/Library/code_lazy.ML
src/HOL/Library/code_test.ML
src/HOL/Library/conditional_parametricity.ML
src/HOL/Library/datatype_records.ML
src/HOL/Library/multiset_simprocs.ML
src/HOL/Library/old_recdef.ML
src/HOL/Library/positivstellensatz.ML
src/HOL/Library/refute.ML
src/HOL/Library/rewrite.ML
src/HOL/Library/simps_case_conv.ML
src/HOL/Limits.thy
src/HOL/List.thy
src/HOL/Map.thy
src/HOL/Meson.thy
src/HOL/Nat.thy
src/HOL/Nitpick.thy
src/HOL/Num.thy
src/HOL/Numeral_Simprocs.thy
src/HOL/Orderings.thy
src/HOL/Parity.thy
src/HOL/Partial_Function.thy
src/HOL/Power.thy
src/HOL/Predicate_Compile.thy
src/HOL/Presburger.thy
src/HOL/Product_Type.thy
src/HOL/Quickcheck_Narrowing.thy
src/HOL/Quickcheck_Random.thy
src/HOL/Rat.thy
src/HOL/Real.thy
src/HOL/Real_Vector_Spaces.thy
src/HOL/Relation.thy
src/HOL/Rings.thy
src/HOL/Semiring_Normalization.thy
src/HOL/Series.thy
src/HOL/Set.thy
src/HOL/Set_Interval.thy
src/HOL/String.thy
src/HOL/TPTP/TPTP_Parser/tptp_syntax.ML
src/HOL/Tools/ATP/atp_problem_generate.ML
src/HOL/Tools/ATP/atp_proof_reconstruct.ML
src/HOL/Tools/ATP/atp_satallax.ML
src/HOL/Tools/ATP/atp_systems.ML
src/HOL/Tools/ATP/atp_util.ML
src/HOL/Tools/ATP/atp_waldmeister.ML
src/HOL/Tools/BNF/bnf_axiomatization.ML
src/HOL/Tools/BNF/bnf_comp.ML
src/HOL/Tools/BNF/bnf_def.ML
src/HOL/Tools/BNF/bnf_fp_def_sugar.ML
src/HOL/Tools/BNF/bnf_fp_def_sugar_tactics.ML
src/HOL/Tools/BNF/bnf_fp_n2m.ML
src/HOL/Tools/BNF/bnf_fp_n2m_sugar.ML
src/HOL/Tools/BNF/bnf_fp_rec_sugar_transfer.ML
src/HOL/Tools/BNF/bnf_fp_rec_sugar_util.ML
src/HOL/Tools/BNF/bnf_fp_util.ML
src/HOL/Tools/BNF/bnf_gfp.ML
src/HOL/Tools/BNF/bnf_gfp_grec.ML
src/HOL/Tools/BNF/bnf_gfp_grec_sugar.ML
src/HOL/Tools/BNF/bnf_gfp_grec_sugar_tactics.ML
src/HOL/Tools/BNF/bnf_gfp_grec_sugar_util.ML
src/HOL/Tools/BNF/bnf_gfp_grec_tactics.ML
src/HOL/Tools/BNF/bnf_gfp_grec_unique_sugar.ML
src/HOL/Tools/BNF/bnf_gfp_rec_sugar.ML
src/HOL/Tools/BNF/bnf_gfp_rec_sugar_tactics.ML
src/HOL/Tools/BNF/bnf_gfp_util.ML
src/HOL/Tools/BNF/bnf_lfp.ML
src/HOL/Tools/BNF/bnf_lfp_basic_sugar.ML
src/HOL/Tools/BNF/bnf_lfp_compat.ML
src/HOL/Tools/BNF/bnf_lfp_countable.ML
src/HOL/Tools/BNF/bnf_lfp_rec_sugar.ML
src/HOL/Tools/BNF/bnf_lfp_rec_sugar_more.ML
src/HOL/Tools/BNF/bnf_lfp_size.ML
src/HOL/Tools/BNF/bnf_lfp_util.ML
src/HOL/Tools/BNF/bnf_lift.ML
src/HOL/Tools/BNF/bnf_tactics.ML
src/HOL/Tools/BNF/bnf_util.ML
src/HOL/Tools/Ctr_Sugar/case_translation.ML
src/HOL/Tools/Ctr_Sugar/ctr_sugar.ML
src/HOL/Tools/Ctr_Sugar/ctr_sugar_code.ML
src/HOL/Tools/Ctr_Sugar/ctr_sugar_util.ML
src/HOL/Tools/Function/function_lib.ML
src/HOL/Tools/Function/lexicographic_order.ML
src/HOL/Tools/Function/partial_function.ML
src/HOL/Tools/Function/scnp_reconstruct.ML
src/HOL/Tools/Function/sum_tree.ML
src/HOL/Tools/Lifting/lifting_bnf.ML
src/HOL/Tools/Lifting/lifting_def.ML
src/HOL/Tools/Lifting/lifting_def_code_dt.ML
src/HOL/Tools/Lifting/lifting_info.ML
src/HOL/Tools/Lifting/lifting_setup.ML
src/HOL/Tools/Lifting/lifting_term.ML
src/HOL/Tools/Lifting/lifting_util.ML
src/HOL/Tools/Meson/meson.ML
src/HOL/Tools/Meson/meson_clausify.ML
src/HOL/Tools/Metis/metis_generate.ML
src/HOL/Tools/Metis/metis_reconstruct.ML
src/HOL/Tools/Metis/metis_tactic.ML
src/HOL/Tools/Nitpick/nitpick.ML
src/HOL/Tools/Nitpick/nitpick_commands.ML
src/HOL/Tools/Nitpick/nitpick_hol.ML
src/HOL/Tools/Nitpick/nitpick_kodkod.ML
src/HOL/Tools/Nitpick/nitpick_model.ML
src/HOL/Tools/Nitpick/nitpick_mono.ML
src/HOL/Tools/Nitpick/nitpick_nut.ML
src/HOL/Tools/Nitpick/nitpick_preproc.ML
src/HOL/Tools/Nitpick/nitpick_rep.ML
src/HOL/Tools/Nitpick/nitpick_scope.ML
src/HOL/Tools/Nitpick/nitpick_tests.ML
src/HOL/Tools/Nitpick/nitpick_util.ML
src/HOL/Tools/Nunchaku/nunchaku.ML
src/HOL/Tools/Nunchaku/nunchaku_collect.ML
src/HOL/Tools/Nunchaku/nunchaku_commands.ML
src/HOL/Tools/Nunchaku/nunchaku_reconstruct.ML
src/HOL/Tools/Nunchaku/nunchaku_translate.ML
src/HOL/Tools/Nunchaku/nunchaku_util.ML
src/HOL/Tools/Old_Datatype/old_datatype_aux.ML
src/HOL/Tools/Old_Datatype/old_datatype_data.ML
src/HOL/Tools/Old_Datatype/old_datatype_prop.ML
src/HOL/Tools/Old_Datatype/old_primrec.ML
src/HOL/Tools/Old_Datatype/old_rep_datatype.ML
src/HOL/Tools/Predicate_Compile/code_prolog.ML
src/HOL/Tools/Predicate_Compile/core_data.ML
src/HOL/Tools/Predicate_Compile/mode_inference.ML
src/HOL/Tools/Predicate_Compile/predicate_compile.ML
src/HOL/Tools/Predicate_Compile/predicate_compile_aux.ML
src/HOL/Tools/Predicate_Compile/predicate_compile_compilations.ML
src/HOL/Tools/Predicate_Compile/predicate_compile_core.ML
src/HOL/Tools/Predicate_Compile/predicate_compile_data.ML
src/HOL/Tools/Predicate_Compile/predicate_compile_fun.ML
src/HOL/Tools/Predicate_Compile/predicate_compile_pred.ML
src/HOL/Tools/Predicate_Compile/predicate_compile_proof.ML
src/HOL/Tools/Predicate_Compile/predicate_compile_quickcheck.ML
src/HOL/Tools/Predicate_Compile/predicate_compile_specialisation.ML
src/HOL/Tools/Qelim/cooper.ML
src/HOL/Tools/Qelim/qelim.ML
src/HOL/Tools/Quickcheck/random_generators.ML
src/HOL/Tools/Quotient/quotient_def.ML
src/HOL/Tools/Quotient/quotient_info.ML
src/HOL/Tools/Quotient/quotient_tacs.ML
src/HOL/Tools/Quotient/quotient_term.ML
src/HOL/Tools/Quotient/quotient_type.ML
src/HOL/Tools/SMT/conj_disj_perm.ML
src/HOL/Tools/SMT/smt_normalize.ML
src/HOL/Tools/SMT/smt_real.ML
src/HOL/Tools/SMT/smt_replay.ML
src/HOL/Tools/SMT/smt_replay_methods.ML
src/HOL/Tools/SMT/smt_solver.ML
src/HOL/Tools/SMT/smt_systems.ML
src/HOL/Tools/SMT/smt_util.ML
src/HOL/Tools/SMT/smtlib_interface.ML
src/HOL/Tools/SMT/smtlib_proof.ML
src/HOL/Tools/SMT/verit_proof.ML
src/HOL/Tools/SMT/verit_replay.ML
src/HOL/Tools/SMT/verit_replay_methods.ML
src/HOL/Tools/SMT/z3_interface.ML
src/HOL/Tools/SMT/z3_isar.ML
src/HOL/Tools/SMT/z3_proof.ML
src/HOL/Tools/SMT/z3_real.ML
src/HOL/Tools/SMT/z3_replay.ML
src/HOL/Tools/SMT/z3_replay_methods.ML
src/HOL/Tools/Sledgehammer/sledgehammer_commands.ML
src/HOL/Tools/Sledgehammer/sledgehammer_fact.ML
src/HOL/Tools/Sledgehammer/sledgehammer_isar.ML
src/HOL/Tools/Sledgehammer/sledgehammer_isar_preplay.ML
src/HOL/Tools/Sledgehammer/sledgehammer_mash.ML
src/HOL/Tools/Sledgehammer/sledgehammer_mepo.ML
src/HOL/Tools/Sledgehammer/sledgehammer_prover_atp.ML
src/HOL/Tools/Sledgehammer/sledgehammer_prover_minimize.ML
src/HOL/Tools/Sledgehammer/sledgehammer_prover_smt.ML
src/HOL/Tools/Transfer/transfer.ML
src/HOL/Tools/Transfer/transfer_bnf.ML
src/HOL/Tools/datatype_realizer.ML
src/HOL/Tools/functor.ML
src/HOL/Tools/groebner.ML
src/HOL/Tools/hologic.ML
src/HOL/Tools/inductive.ML
src/HOL/Tools/inductive_realizer.ML
src/HOL/Tools/inductive_set.ML
src/HOL/Tools/int_arith.ML
src/HOL/Tools/lambda_lifting.ML
src/HOL/Tools/lin_arith.ML
src/HOL/Tools/literal.ML
src/HOL/Tools/nat_numeral_simprocs.ML
src/HOL/Tools/numeral.ML
src/HOL/Tools/numeral_simprocs.ML
src/HOL/Tools/prop_logic.ML
src/HOL/Tools/record.ML
src/HOL/Tools/reflection.ML
src/HOL/Tools/reification.ML
src/HOL/Tools/rewrite_hol_proof.ML
src/HOL/Tools/sat.ML
src/HOL/Tools/semiring_normalizer.ML
src/HOL/Tools/set_comprehension_pointfree.ML
src/HOL/Tools/simpdata.ML
src/HOL/Tools/string_syntax.ML
src/HOL/Tools/try0.ML
src/HOL/Topological_Spaces.thy
src/HOL/Transcendental.thy
src/HOL/Transfer.thy
src/HOL/Transitive_Closure.thy
src/HOL/Typerep.thy
src/HOL/Vector_Spaces.thy
src/HOL/Wellfounded.thy
src/HOL/Wfrec.thy
src/HOL/Zorn.thy
src/Provers/Arith/cancel_div_mod.ML
src/Provers/blast.ML
src/Provers/clasimp.ML
src/Provers/classical.ML
src/Provers/hypsubst.ML
src/Provers/splitter.ML
src/Sequents/ILL.thy
src/Sequents/LK.thy
src/Sequents/LK0.thy
src/Sequents/Modal0.thy
src/Sequents/S43.thy
src/Sequents/Sequents.thy
src/Sequents/modal.ML
src/Sequents/prover.ML
src/Sequents/simpdata.ML
src/Tools/Code/code_haskell.ML
src/Tools/Code/code_preproc.ML
src/Tools/Code/code_printer.ML
src/Tools/Code/code_runtime.ML
src/Tools/Code/code_simp.ML
src/Tools/Code/code_target.ML
src/Tools/Code/code_thingol.ML
src/Tools/Spec_Check/Examples.thy
src/Tools/Spec_Check/spec_check.ML
src/Tools/induct.ML
src/Tools/misc_legacy.ML
src/Tools/nbe.ML
src/Tools/solve_direct.ML
src/Tools/try.ML
src/ZF/Arith.thy
src/ZF/ArithSimp.thy
src/ZF/Bin.thy
src/ZF/Cardinal.thy
src/ZF/CardinalArith.thy
src/ZF/Cardinal_AC.thy
src/ZF/Constructible/AC_in_L.thy
src/ZF/Constructible/DPow_absolute.thy
src/ZF/Constructible/Datatype_absolute.thy
src/ZF/Constructible/Formula.thy
src/ZF/Constructible/Internalize.thy
src/ZF/Constructible/L_axioms.thy
src/ZF/Constructible/Normal.thy
src/ZF/Constructible/Rank.thy
src/ZF/Constructible/Rank_Separation.thy
src/ZF/Constructible/Rec_Separation.thy
src/ZF/Constructible/Reflection.thy
src/ZF/Constructible/Relative.thy
src/ZF/Constructible/Satisfies_absolute.thy
src/ZF/Constructible/Separation.thy
src/ZF/Constructible/WF_absolute.thy
src/ZF/Constructible/WFrec.thy
src/ZF/Constructible/Wellorderings.thy
src/ZF/Datatype.thy
src/ZF/Epsilon.thy
src/ZF/EquivClass.thy
src/ZF/Fixedpt.thy
src/ZF/Induct/Acc.thy
src/ZF/Induct/Binary_Trees.thy
src/ZF/Induct/Comb.thy
src/ZF/Induct/Datatypes.thy
src/ZF/Induct/FoldSet.thy
src/ZF/Induct/Multiset.thy
src/ZF/Induct/Ntree.thy
src/ZF/Induct/Primrec.thy
src/ZF/Induct/PropLog.thy
src/ZF/Induct/Term.thy
src/ZF/Induct/Tree_Forest.thy
src/ZF/Inductive.thy
src/ZF/Int.thy
src/ZF/IntDiv.thy
src/ZF/Nat.thy
src/ZF/OrdQuant.thy
src/ZF/OrderArith.thy
src/ZF/OrderType.thy
src/ZF/Ordinal.thy
src/ZF/Perm.thy
src/ZF/Sum.thy
src/ZF/Tools/cartprod.ML
src/ZF/Tools/datatype_package.ML
src/ZF/Tools/ind_cases.ML
src/ZF/Tools/induct_tacs.ML
src/ZF/Tools/inductive_package.ML
src/ZF/Tools/numeral_syntax.ML
src/ZF/Tools/primrec_package.ML
src/ZF/Tools/typechk.ML
src/ZF/UNITY/AllocBase.thy
src/ZF/UNITY/AllocImpl.thy
src/ZF/UNITY/Constrains.thy
src/ZF/UNITY/SubstAx.thy
src/ZF/UNITY/UNITY.thy
src/ZF/Univ.thy
src/ZF/WF.thy
src/ZF/ZF.thy
src/ZF/ZF_Base.thy
src/ZF/Zorn.thy
src/ZF/arith_data.ML
src/ZF/equalities.thy
src/ZF/ex/CoUnit.thy
src/ZF/ex/Group.thy
src/ZF/ex/Primes.thy
src/ZF/func.thy
src/ZF/ind_syntax.ML
src/ZF/int_arith.ML
src/ZF/pair.thy
src/ZF/simpdata.ML
src/ZF/upair.thy
     1.1 --- a/src/CCL/CCL.thy	Fri Jan 04 21:49:06 2019 +0100
     1.2 +++ b/src/CCL/CCL.thy	Fri Jan 04 23:22:53 2019 +0100
     1.3 @@ -267,10 +267,10 @@
     1.4  val ccl_dstncts =
     1.5    let
     1.6      fun mk_raw_dstnct_thm rls s =
     1.7 -      Goal.prove_global @{theory} [] [] (Syntax.read_prop_global @{theory} s)
     1.8 +      Goal.prove_global \<^theory> [] [] (Syntax.read_prop_global \<^theory> s)
     1.9          (fn {context = ctxt, ...} => resolve_tac ctxt @{thms notI} 1 THEN eresolve_tac ctxt rls 1)
    1.10    in map (mk_raw_dstnct_thm caseB_lemmas)
    1.11 -    (mk_dstnct_rls @{theory} ["bot","true","false","pair","lambda"]) end
    1.12 +    (mk_dstnct_rls \<^theory> ["bot","true","false","pair","lambda"]) end
    1.13  
    1.14  fun mk_dstnct_thms ctxt defs inj_rls xs =
    1.15    let
     2.1 --- a/src/CCL/Term.thy	Fri Jan 04 21:49:06 2019 +0100
     2.2 +++ b/src/CCL/Term.thy	Fri Jan 04 23:22:53 2019 +0100
     2.3 @@ -79,30 +79,30 @@
     2.4  (* FIXME does not handle "_idtdummy" *)
     2.5  (* FIXME should use Syntax_Trans.mark_bound, Syntax_Trans.variant_abs' *)
     2.6  
     2.7 -fun let_tr [Free x, a, b] = Const(@{const_syntax let},dummyT) $ a $ absfree x b;
     2.8 +fun let_tr [Free x, a, b] = Const(\<^const_syntax>\<open>let\<close>,dummyT) $ a $ absfree x b;
     2.9  fun let_tr' [a,Abs(id,T,b)] =
    2.10       let val (id',b') = Syntax_Trans.variant_abs(id,T,b)
    2.11 -     in Const(@{syntax_const "_let"},dummyT) $ Free(id',T) $ a $ b' end;
    2.12 +     in Const(\<^syntax_const>\<open>_let\<close>,dummyT) $ Free(id',T) $ a $ b' end;
    2.13  
    2.14  fun letrec_tr [Free f, Free x, a, b] =
    2.15 -      Const(@{const_syntax letrec}, dummyT) $ absfree x (absfree f a) $ absfree f b;
    2.16 +      Const(\<^const_syntax>\<open>letrec\<close>, dummyT) $ absfree x (absfree f a) $ absfree f b;
    2.17  fun letrec2_tr [Free f, Free x, Free y, a, b] =
    2.18 -      Const(@{const_syntax letrec2}, dummyT) $ absfree x (absfree y (absfree f a)) $ absfree f b;
    2.19 +      Const(\<^const_syntax>\<open>letrec2\<close>, dummyT) $ absfree x (absfree y (absfree f a)) $ absfree f b;
    2.20  fun letrec3_tr [Free f, Free x, Free y, Free z, a, b] =
    2.21 -      Const(@{const_syntax letrec3}, dummyT) $
    2.22 +      Const(\<^const_syntax>\<open>letrec3\<close>, dummyT) $
    2.23          absfree x (absfree y (absfree z (absfree f a))) $ absfree f b;
    2.24  
    2.25  fun letrec_tr' [Abs(x,T,Abs(f,S,a)),Abs(ff,SS,b)] =
    2.26       let val (f',b') = Syntax_Trans.variant_abs(ff,SS,b)
    2.27           val (_,a'') = Syntax_Trans.variant_abs(f,S,a)
    2.28           val (x',a') = Syntax_Trans.variant_abs(x,T,a'')
    2.29 -     in Const(@{syntax_const "_letrec"},dummyT) $ Free(f',SS) $ Free(x',T) $ a' $ b' end;
    2.30 +     in Const(\<^syntax_const>\<open>_letrec\<close>,dummyT) $ Free(f',SS) $ Free(x',T) $ a' $ b' end;
    2.31  fun letrec2_tr' [Abs(x,T,Abs(y,U,Abs(f,S,a))),Abs(ff,SS,b)] =
    2.32       let val (f',b') = Syntax_Trans.variant_abs(ff,SS,b)
    2.33           val ( _,a1) = Syntax_Trans.variant_abs(f,S,a)
    2.34           val (y',a2) = Syntax_Trans.variant_abs(y,U,a1)
    2.35           val (x',a') = Syntax_Trans.variant_abs(x,T,a2)
    2.36 -     in Const(@{syntax_const "_letrec2"},dummyT) $ Free(f',SS) $ Free(x',T) $ Free(y',U) $ a' $ b'
    2.37 +     in Const(\<^syntax_const>\<open>_letrec2\<close>,dummyT) $ Free(f',SS) $ Free(x',T) $ Free(y',U) $ a' $ b'
    2.38        end;
    2.39  fun letrec3_tr' [Abs(x,T,Abs(y,U,Abs(z,V,Abs(f,S,a)))),Abs(ff,SS,b)] =
    2.40       let val (f',b') = Syntax_Trans.variant_abs(ff,SS,b)
    2.41 @@ -110,22 +110,22 @@
    2.42           val (z',a2) = Syntax_Trans.variant_abs(z,V,a1)
    2.43           val (y',a3) = Syntax_Trans.variant_abs(y,U,a2)
    2.44           val (x',a') = Syntax_Trans.variant_abs(x,T,a3)
    2.45 -     in Const(@{syntax_const "_letrec3"},dummyT) $ Free(f',SS) $ Free(x',T) $ Free(y',U) $ Free(z',V) $ a' $ b'
    2.46 +     in Const(\<^syntax_const>\<open>_letrec3\<close>,dummyT) $ Free(f',SS) $ Free(x',T) $ Free(y',U) $ Free(z',V) $ a' $ b'
    2.47        end;
    2.48  \<close>
    2.49  
    2.50  parse_translation \<open>
    2.51 - [(@{syntax_const "_let"}, K let_tr),
    2.52 -  (@{syntax_const "_letrec"}, K letrec_tr),
    2.53 -  (@{syntax_const "_letrec2"}, K letrec2_tr),
    2.54 -  (@{syntax_const "_letrec3"}, K letrec3_tr)]
    2.55 + [(\<^syntax_const>\<open>_let\<close>, K let_tr),
    2.56 +  (\<^syntax_const>\<open>_letrec\<close>, K letrec_tr),
    2.57 +  (\<^syntax_const>\<open>_letrec2\<close>, K letrec2_tr),
    2.58 +  (\<^syntax_const>\<open>_letrec3\<close>, K letrec3_tr)]
    2.59  \<close>
    2.60  
    2.61  print_translation \<open>
    2.62 - [(@{const_syntax let}, K let_tr'),
    2.63 -  (@{const_syntax letrec}, K letrec_tr'),
    2.64 -  (@{const_syntax letrec2}, K letrec2_tr'),
    2.65 -  (@{const_syntax letrec3}, K letrec3_tr')]
    2.66 + [(\<^const_syntax>\<open>let\<close>, K let_tr'),
    2.67 +  (\<^const_syntax>\<open>letrec\<close>, K letrec_tr'),
    2.68 +  (\<^const_syntax>\<open>letrec2\<close>, K letrec2_tr'),
    2.69 +  (\<^const_syntax>\<open>letrec3\<close>, K letrec3_tr')]
    2.70  \<close>
    2.71  
    2.72  
    2.73 @@ -289,7 +289,7 @@
    2.74  
    2.75  ML \<open>
    2.76  ML_Thms.bind_thms ("term_dstncts",
    2.77 -  mkall_dstnct_thms @{context} @{thms data_defs} (@{thms ccl_injs} @ @{thms term_injs})
    2.78 +  mkall_dstnct_thms \<^context> @{thms data_defs} (@{thms ccl_injs} @ @{thms term_injs})
    2.79      [["bot","inl","inr"], ["bot","zero","succ"], ["bot","nil","cons"]]);
    2.80  \<close>
    2.81  
     3.1 --- a/src/CCL/Type.thy	Fri Jan 04 21:49:06 2019 +0100
     3.2 +++ b/src/CCL/Type.thy	Fri Jan 04 23:22:53 2019 +0100
     3.3 @@ -43,10 +43,10 @@
     3.4    "SUM x:A. B" \<rightharpoonup> "CONST Sigma(A, \<lambda>x. B)"
     3.5    "A * B" \<rightharpoonup> "CONST Sigma(A, \<lambda>_. B)"
     3.6  print_translation \<open>
     3.7 - [(@{const_syntax Pi},
     3.8 -    fn _ => Syntax_Trans.dependent_tr' (@{syntax_const "_Pi"}, @{syntax_const "_arrow"})),
     3.9 -  (@{const_syntax Sigma},
    3.10 -    fn _ => Syntax_Trans.dependent_tr' (@{syntax_const "_Sigma"}, @{syntax_const "_star"}))]
    3.11 + [(\<^const_syntax>\<open>Pi\<close>,
    3.12 +    fn _ => Syntax_Trans.dependent_tr' (\<^syntax_const>\<open>_Pi\<close>, \<^syntax_const>\<open>_arrow\<close>)),
    3.13 +  (\<^const_syntax>\<open>Sigma\<close>,
    3.14 +    fn _ => Syntax_Trans.dependent_tr' (\<^syntax_const>\<open>_Sigma\<close>, \<^syntax_const>\<open>_star\<close>))]
    3.15  \<close>
    3.16  
    3.17  definition Nat :: "i set"
     4.1 --- a/src/CCL/Wfd.thy	Fri Jan 04 21:49:06 2019 +0100
     4.2 +++ b/src/CCL/Wfd.thy	Fri Jan 04 23:22:53 2019 +0100
     4.3 @@ -413,13 +413,13 @@
     4.4    @{thms canTs} @ @{thms icanTs} @ @{thms applyT2} @ @{thms ncanTs} @ @{thms incanTs} @
     4.5    @{thms precTs} @ @{thms letrecTs} @ @{thms letT} @ @{thms Subtype_canTs};
     4.6  
     4.7 -fun bvars (Const(@{const_name Pure.all},_) $ Abs(s,_,t)) l = bvars t (s::l)
     4.8 +fun bvars (Const(\<^const_name>\<open>Pure.all\<close>,_) $ Abs(s,_,t)) l = bvars t (s::l)
     4.9    | bvars _ l = l
    4.10  
    4.11 -fun get_bno l n (Const(@{const_name Pure.all},_) $ Abs(s,_,t)) = get_bno (s::l) n t
    4.12 -  | get_bno l n (Const(@{const_name Trueprop},_) $ t) = get_bno l n t
    4.13 -  | get_bno l n (Const(@{const_name Ball},_) $ _ $ Abs(s,_,t)) = get_bno (s::l) (n+1) t
    4.14 -  | get_bno l n (Const(@{const_name mem},_) $ t $ _) = get_bno l n t
    4.15 +fun get_bno l n (Const(\<^const_name>\<open>Pure.all\<close>,_) $ Abs(s,_,t)) = get_bno (s::l) n t
    4.16 +  | get_bno l n (Const(\<^const_name>\<open>Trueprop\<close>,_) $ t) = get_bno l n t
    4.17 +  | get_bno l n (Const(\<^const_name>\<open>Ball\<close>,_) $ _ $ Abs(s,_,t)) = get_bno (s::l) (n+1) t
    4.18 +  | get_bno l n (Const(\<^const_name>\<open>mem\<close>,_) $ t $ _) = get_bno l n t
    4.19    | get_bno l n (t $ s) = get_bno l n t
    4.20    | get_bno l n (Bound m) = (m-length(l),n)
    4.21  
    4.22 @@ -441,7 +441,7 @@
    4.23  
    4.24  fun is_rigid_prog t =
    4.25    (case (Logic.strip_assums_concl t) of
    4.26 -    (Const(@{const_name Trueprop},_) $ (Const(@{const_name mem},_) $ a $ _)) =>
    4.27 +    (Const(\<^const_name>\<open>Trueprop\<close>,_) $ (Const(\<^const_name>\<open>mem\<close>,_) $ a $ _)) =>
    4.28        null (Term.add_vars a [])
    4.29    | _ => false)
    4.30  
    4.31 @@ -500,7 +500,7 @@
    4.32  ML \<open>
    4.33  fun eval_tac ths =
    4.34    Subgoal.FOCUS_PREMS (fn {context = ctxt, prems, ...} =>
    4.35 -    let val eval_rules = Named_Theorems.get ctxt @{named_theorems eval}
    4.36 +    let val eval_rules = Named_Theorems.get ctxt \<^named_theorems>\<open>eval\<close>
    4.37      in DEPTH_SOLVE_1 (resolve_tac ctxt (ths @ prems @ rev eval_rules) 1) end)
    4.38  \<close>
    4.39  
    4.40 @@ -524,8 +524,8 @@
    4.41    apply (unfold let_def)
    4.42    apply (rule 1 [THEN canonical])
    4.43    apply (tactic \<open>
    4.44 -    REPEAT (DEPTH_SOLVE_1 (resolve_tac @{context} (@{thms assms} @ @{thms eval_rls}) 1 ORELSE
    4.45 -      eresolve_tac @{context} @{thms substitute} 1))\<close>)
    4.46 +    REPEAT (DEPTH_SOLVE_1 (resolve_tac \<^context> (@{thms assms} @ @{thms eval_rls}) 1 ORELSE
    4.47 +      eresolve_tac \<^context> @{thms substitute} 1))\<close>)
    4.48    done
    4.49  
    4.50  lemma fixV: "f(fix(f)) \<longlongrightarrow> c \<Longrightarrow> fix(f) \<longlongrightarrow> c"
     5.1 --- a/src/CCL/ex/Stream.thy	Fri Jan 04 21:49:06 2019 +0100
     5.2 +++ b/src/CCL/ex/Stream.thy	Fri Jan 04 23:22:53 2019 +0100
     5.3 @@ -82,8 +82,8 @@
     5.4    apply EQgen
     5.5     prefer 2
     5.6     apply blast
     5.7 -  apply (tactic \<open>DEPTH_SOLVE (eresolve_tac @{context} [XH_to_E @{thm ListsXH}] 1
     5.8 -    THEN EQgen_tac @{context} [] 1)\<close>)
     5.9 +  apply (tactic \<open>DEPTH_SOLVE (eresolve_tac \<^context> [XH_to_E @{thm ListsXH}] 1
    5.10 +    THEN EQgen_tac \<^context> [] 1)\<close>)
    5.11    done
    5.12  
    5.13  
     6.1 --- a/src/CTT/CTT.thy	Fri Jan 04 21:49:06 2019 +0100
     6.2 +++ b/src/CTT/CTT.thy	Fri Jan 04 23:22:53 2019 +0100
     6.3 @@ -304,9 +304,9 @@
     6.4  ML \<open>
     6.5  local
     6.6  
     6.7 -fun is_rigid_elem (Const(@{const_name Elem},_) $ a $ _) = not(is_Var (head_of a))
     6.8 -  | is_rigid_elem (Const(@{const_name Eqelem},_) $ a $ _ $ _) = not(is_Var (head_of a))
     6.9 -  | is_rigid_elem (Const(@{const_name Type},_) $ a) = not(is_Var (head_of a))
    6.10 +fun is_rigid_elem (Const(\<^const_name>\<open>Elem\<close>,_) $ a $ _) = not(is_Var (head_of a))
    6.11 +  | is_rigid_elem (Const(\<^const_name>\<open>Eqelem\<close>,_) $ a $ _ $ _) = not(is_Var (head_of a))
    6.12 +  | is_rigid_elem (Const(\<^const_name>\<open>Type\<close>,_) $ a) = not(is_Var (head_of a))
    6.13    | is_rigid_elem _ = false
    6.14  
    6.15  in
     7.1 --- a/src/CTT/ex/Elimination.thy	Fri Jan 04 21:49:06 2019 +0100
     7.2 +++ b/src/CTT/ex/Elimination.thy	Fri Jan 04 23:22:53 2019 +0100
     7.3 @@ -180,7 +180,7 @@
     7.4      and "\<And>z. z:A \<times> B \<Longrightarrow> C(z) type"
     7.5    shows "?a : (\<Sum>z:A \<times> B. C(z)) \<longrightarrow> (\<Sum>u:A. \<Sum>v:B. C(<u,v>))"
     7.6  apply (rule intr_rls)
     7.7 -apply (tactic \<open>biresolve_tac @{context} safe_brls 2\<close>)
     7.8 +apply (tactic \<open>biresolve_tac \<^context> safe_brls 2\<close>)
     7.9  (*Now must convert assumption C(z) into antecedent C(<kd,ke>) *)
    7.10  apply (rule_tac [2] a = "y" in ProdE)
    7.11  apply (typechk assms)
     8.1 --- a/src/CTT/ex/Equality.thy	Fri Jan 04 21:49:06 2019 +0100
     8.2 +++ b/src/CTT/ex/Equality.thy	Fri Jan 04 23:22:53 2019 +0100
     8.3 @@ -47,7 +47,7 @@
     8.4  lemma "p : Sum(A,B) \<Longrightarrow> <split(p,\<lambda>x y. x), split(p,\<lambda>x y. y)> = p : Sum(A,B)"
     8.5  apply (rule EqE)
     8.6  apply (rule elim_rls, assumption)
     8.7 -apply (tactic \<open>DEPTH_SOLVE_1 (rew_tac @{context} [])\<close>) (*!!!!!!!*)
     8.8 +apply (tactic \<open>DEPTH_SOLVE_1 (rew_tac \<^context> [])\<close>) (*!!!!!!!*)
     8.9  done
    8.10  
    8.11  lemma "\<lbrakk>a : A; b : B\<rbrakk> \<Longrightarrow> (\<^bold>\<lambda>u. split(u, \<lambda>v w.<w,v>)) ` <a,b> = <b,a> : \<Sum>x:B. A"
     9.1 --- a/src/CTT/ex/Synthesis.thy	Fri Jan 04 21:49:06 2019 +0100
     9.2 +++ b/src/CTT/ex/Synthesis.thy	Fri Jan 04 23:22:53 2019 +0100
     9.3 @@ -91,10 +91,10 @@
     9.4                  \<times>  (\<Prod>y:N. Eq(N, plus`succ(y)`x, succ(plus`y`x)))"
     9.5  apply intr
     9.6  apply eqintr
     9.7 -apply (tactic "resolve_tac @{context} [TSimp.split_eqn] 3")
     9.8 -apply (tactic "SELECT_GOAL (rew_tac @{context} []) 4")
     9.9 -apply (tactic "resolve_tac @{context} [TSimp.split_eqn] 3")
    9.10 -apply (tactic "SELECT_GOAL (rew_tac @{context} []) 4")
    9.11 +apply (tactic "resolve_tac \<^context> [TSimp.split_eqn] 3")
    9.12 +apply (tactic "SELECT_GOAL (rew_tac \<^context> []) 4")
    9.13 +apply (tactic "resolve_tac \<^context> [TSimp.split_eqn] 3")
    9.14 +apply (tactic "SELECT_GOAL (rew_tac \<^context> []) 4")
    9.15  apply (rule_tac [3] p = "y" in NC_succ)
    9.16    (**  by (resolve_tac @{context} comp_rls 3);  caused excessive branching  **)
    9.17  apply rew
    10.1 --- a/src/Cube/Cube.thy	Fri Jan 04 21:49:06 2019 +0100
    10.2 +++ b/src/Cube/Cube.thy	Fri Jan 04 23:22:53 2019 +0100
    10.3 @@ -49,8 +49,8 @@
    10.4    "\<Prod>x:A. B" \<rightharpoonup> "CONST Prod(A, \<lambda>x. B)"
    10.5    "A \<rightarrow> B" \<rightharpoonup> "CONST Prod(A, \<lambda>_. B)"
    10.6  print_translation \<open>
    10.7 -  [(@{const_syntax Prod},
    10.8 -    fn _ => Syntax_Trans.dependent_tr' (@{syntax_const "_Pi"}, @{syntax_const "_arrow"}))]
    10.9 +  [(\<^const_syntax>\<open>Prod\<close>,
   10.10 +    fn _ => Syntax_Trans.dependent_tr' (\<^syntax_const>\<open>_Pi\<close>, \<^syntax_const>\<open>_arrow\<close>))]
   10.11  \<close>
   10.12  
   10.13  axiomatization where
    11.1 --- a/src/Doc/Isar_Ref/First_Order_Logic.thy	Fri Jan 04 21:49:06 2019 +0100
    11.2 +++ b/src/Doc/Isar_Ref/First_Order_Logic.thy	Fri Jan 04 23:22:53 2019 +0100
    11.3 @@ -20,8 +20,8 @@
    11.4  
    11.5  text \<open>
    11.6    Note that the object-logic judgment is implicit in the syntax: writing
    11.7 -  @{prop A} produces @{term "Trueprop A"} internally. From the Pure
    11.8 -  perspective this means ``@{prop A} is derivable in the object-logic''.
    11.9 +  \<^prop>\<open>A\<close> produces \<^term>\<open>Trueprop A\<close> internally. From the Pure
   11.10 +  perspective this means ``\<^prop>\<open>A\<close> is derivable in the object-logic''.
   11.11  \<close>
   11.12  
   11.13  
   11.14 @@ -41,7 +41,7 @@
   11.15  
   11.16  text \<open>
   11.17    Substitution is very powerful, but also hard to control in full generality.
   11.18 -  We derive some common symmetry~/ transitivity schemes of @{term equal} as
   11.19 +  We derive some common symmetry~/ transitivity schemes of \<^term>\<open>equal\<close> as
   11.20    particular consequences.
   11.21  \<close>
   11.22  
   11.23 @@ -182,10 +182,9 @@
   11.24      and conjD\<^sub>2: "A \<and> B \<Longrightarrow> B"
   11.25  
   11.26  text \<open>
   11.27 -  The conjunctive destructions have the disadvantage that decomposing @{prop
   11.28 -  "A \<and> B"} involves an immediate decision which component should be projected.
   11.29 -  The more convenient simultaneous elimination @{prop "A \<and> B \<Longrightarrow> (A \<Longrightarrow> B \<Longrightarrow> C) \<Longrightarrow>
   11.30 -  C"} can be derived as follows:
   11.31 +  The conjunctive destructions have the disadvantage that decomposing \<^prop>\<open>A \<and> B\<close> involves an immediate decision which component should be projected.
   11.32 +  The more convenient simultaneous elimination \<^prop>\<open>A \<and> B \<Longrightarrow> (A \<Longrightarrow> B \<Longrightarrow> C) \<Longrightarrow>
   11.33 +  C\<close> can be derived as follows:
   11.34  \<close>
   11.35  
   11.36  theorem conjE [elim]:
   11.37 @@ -300,8 +299,8 @@
   11.38    These examples illustrate both classical reasoning and non-trivial
   11.39    propositional proofs in general. All three rules characterize classical
   11.40    logic independently, but the original rule is already the most convenient to
   11.41 -  use, because it leaves the conclusion unchanged. Note that @{prop "(\<not> C \<Longrightarrow> C)
   11.42 -  \<Longrightarrow> C"} fits again into our format for eliminations, despite the additional
   11.43 +  use, because it leaves the conclusion unchanged. Note that \<^prop>\<open>(\<not> C \<Longrightarrow> C)
   11.44 +  \<Longrightarrow> C\<close> fits again into our format for eliminations, despite the additional
   11.45    twist that the context refers to the main conclusion. So we may write @{thm
   11.46    classical} as the Isar statement ``\<^theory_text>\<open>obtains \<not> thesis\<close>''. This also explains
   11.47    nicely how classical reasoning really works: whatever the main \<open>thesis\<close>
   11.48 @@ -317,7 +316,7 @@
   11.49    Representing quantifiers is easy, thanks to the higher-order nature of the
   11.50    underlying framework. According to the well-known technique introduced by
   11.51    Church @{cite "church40"}, quantifiers are operators on predicates, which
   11.52 -  are syntactically represented as \<open>\<lambda>\<close>-terms of type @{typ "i \<Rightarrow> o"}. Binder
   11.53 +  are syntactically represented as \<open>\<lambda>\<close>-terms of type \<^typ>\<open>i \<Rightarrow> o\<close>. Binder
   11.54    notation turns \<open>All (\<lambda>x. B x)\<close> into \<open>\<forall>x. B x\<close> etc.
   11.55  \<close>
   11.56  
    12.1 --- a/src/Doc/Logics_ZF/IFOL_examples.thy	Fri Jan 04 21:49:06 2019 +0100
    12.2 +++ b/src/Doc/Logics_ZF/IFOL_examples.thy	Fri Jan 04 23:22:53 2019 +0100
    12.3 @@ -36,7 +36,7 @@
    12.4  done
    12.5  
    12.6  lemma "(EX y. ALL x. Q(x,y)) -->  (ALL x. EX y. Q(x,y))"
    12.7 -by (tactic \<open>IntPr.fast_tac @{context} 1\<close>)
    12.8 +by (tactic \<open>IntPr.fast_tac \<^context> 1\<close>)
    12.9  
   12.10  text\<open>Example of Dyckhoff's method\<close>
   12.11  lemma "~ ~ ((P-->Q) | (Q-->P))"
    13.1 --- a/src/Doc/Logics_ZF/ZF_Isar.thy	Fri Jan 04 21:49:06 2019 +0100
    13.2 +++ b/src/Doc/Logics_ZF/ZF_Isar.thy	Fri Jan 04 23:22:53 2019 +0100
    13.3 @@ -23,9 +23,9 @@
    13.4      @{attribute_def (ZF) TC} & : & \<open>attribute\<close> \\
    13.5    \end{matharray}
    13.6  
    13.7 -  @{rail \<open>
    13.8 +  \<^rail>\<open>
    13.9      @@{attribute (ZF) TC} (() | 'add' | 'del')
   13.10 -  \<close>}
   13.11 +  \<close>
   13.12  
   13.13    \begin{description}
   13.14    
   13.15 @@ -58,7 +58,7 @@
   13.16      @{command_def (ZF) "codatatype"} & : & \<open>theory \<rightarrow> theory\<close> \\
   13.17    \end{matharray}
   13.18  
   13.19 -  @{rail \<open>
   13.20 +  \<^rail>\<open>
   13.21      (@@{command (ZF) inductive} | @@{command (ZF) coinductive}) domains intros hints
   13.22      ;
   13.23  
   13.24 @@ -76,11 +76,11 @@
   13.25      @{syntax_def (ZF) typeintros}: @'type_intros' @{syntax thms}
   13.26      ;
   13.27      @{syntax_def (ZF) typeelims}: @'type_elims' @{syntax thms}
   13.28 -  \<close>}
   13.29 +  \<close>
   13.30  
   13.31    In the following syntax specification \<open>monos\<close>, \<open>typeintros\<close>, and \<open>typeelims\<close> are the same as above.
   13.32  
   13.33 -  @{rail \<open>
   13.34 +  \<^rail>\<open>
   13.35      (@@{command (ZF) datatype} | @@{command (ZF) codatatype}) domain? (dtspec + @'and') hints
   13.36      ;
   13.37  
   13.38 @@ -91,7 +91,7 @@
   13.39      con: @{syntax name} ('(' (@{syntax term} ',' +) ')')?
   13.40      ;
   13.41      hints: @{syntax (ZF) "monos"}? @{syntax (ZF) typeintros}? @{syntax (ZF) typeelims}?
   13.42 -  \<close>}
   13.43 +  \<close>
   13.44  
   13.45    See @{cite "isabelle-ZF"} for further information on inductive
   13.46    definitions in ZF, but note that this covers the old-style theory
   13.47 @@ -106,9 +106,9 @@
   13.48      @{command_def (ZF) "primrec"} & : & \<open>theory \<rightarrow> theory\<close> \\
   13.49    \end{matharray}
   13.50  
   13.51 -  @{rail \<open>
   13.52 +  \<^rail>\<open>
   13.53      @@{command (ZF) primrec} (@{syntax thmdecl}? @{syntax prop} +)
   13.54 -  \<close>}
   13.55 +  \<close>
   13.56  \<close>
   13.57  
   13.58  
   13.59 @@ -125,13 +125,13 @@
   13.60      @{command_def (ZF) "inductive_cases"} & : & \<open>theory \<rightarrow> theory\<close> \\
   13.61    \end{matharray}
   13.62  
   13.63 -  @{rail \<open>
   13.64 +  \<^rail>\<open>
   13.65      (@@{method (ZF) case_tac} | @@{method (ZF) induct_tac}) @{syntax goal_spec}? @{syntax name}
   13.66      ;
   13.67      @@{method (ZF) ind_cases} (@{syntax prop} +)
   13.68      ;
   13.69      @@{command (ZF) inductive_cases} (@{syntax thmdecl}? (@{syntax prop} +) + @'and')
   13.70 -  \<close>}
   13.71 +  \<close>
   13.72  \<close>
   13.73  
   13.74  end
    14.1 --- a/src/Doc/System/Environment.thy	Fri Jan 04 21:49:06 2019 +0100
    14.2 +++ b/src/Doc/System/Environment.thy	Fri Jan 04 23:22:53 2019 +0100
    14.3 @@ -55,7 +55,7 @@
    14.4      variables. When installing the system, only a few of these may have to be
    14.5      adapted (probably @{setting ML_SYSTEM} etc.).
    14.6  
    14.7 -    \<^enum> The file @{path "$ISABELLE_HOME_USER/etc/settings"} (if it
    14.8 +    \<^enum> The file \<^path>\<open>$ISABELLE_HOME_USER/etc/settings\<close> (if it
    14.9      exists) is run in the same way as the site default settings. Note that the
   14.10      variable @{setting ISABELLE_HOME_USER} has already been set before ---
   14.11      usually to something like \<^verbatim>\<open>$USER_HOME/.isabelle/Isabelle2018\<close>.
   14.12 @@ -95,7 +95,7 @@
   14.13    On Unix systems this is usually the same as @{setting HOME}, but on Windows
   14.14    it is the regular home directory of the user, not the one of within the
   14.15    Cygwin root file-system.\<^footnote>\<open>Cygwin itself offers another choice whether its
   14.16 -  HOME should point to the @{path "/home"} directory tree or the Windows user
   14.17 +  HOME should point to the \<^path>\<open>/home\<close> directory tree or the Windows user
   14.18    home.\<close>
   14.19  
   14.20    \<^descr>[@{setting_def ISABELLE_HOME}\<open>\<^sup>*\<close>] is the location of the top-level
   14.21 @@ -104,8 +104,7 @@
   14.22    ISABELLE_HOME} yourself from the shell!
   14.23  
   14.24    \<^descr>[@{setting_def ISABELLE_HOME_USER}] is the user-specific counterpart of
   14.25 -  @{setting ISABELLE_HOME}. The default value is relative to @{path
   14.26 -  "$USER_HOME/.isabelle"}, under rare circumstances this may be changed in the
   14.27 +  @{setting ISABELLE_HOME}. The default value is relative to \<^path>\<open>$USER_HOME/.isabelle\<close>, under rare circumstances this may be changed in the
   14.28    global setting file. Typically, the @{setting ISABELLE_HOME_USER} directory
   14.29    mimics @{setting ISABELLE_HOME} to some extend. In particular, site-wide
   14.30    defaults may be overridden by a private \<^verbatim>\<open>$ISABELLE_HOME_USER/etc/settings\<close>.
   14.31 @@ -177,15 +176,14 @@
   14.32  
   14.33    \<^descr>[@{setting_def ISABELLE_BROWSER_INFO}] is the directory where HTML and PDF
   14.34    browser information is stored (see also \secref{sec:info}); its default is
   14.35 -  @{path "$ISABELLE_HOME_USER/browser_info"}. For ``system build mode'' (see
   14.36 +  \<^path>\<open>$ISABELLE_HOME_USER/browser_info\<close>. For ``system build mode'' (see
   14.37    \secref{sec:tool-build}), @{setting_def ISABELLE_BROWSER_INFO_SYSTEM} is
   14.38 -  used instead; its default is @{path "$ISABELLE_HOME/browser_info"}.
   14.39 +  used instead; its default is \<^path>\<open>$ISABELLE_HOME/browser_info\<close>.
   14.40  
   14.41    \<^descr>[@{setting_def ISABELLE_HEAPS}] is the directory where session heap images,
   14.42 -  log files, and build databases are stored; its default is @{path
   14.43 -  "$ISABELLE_HOME_USER/heaps"}. For ``system build mode'' (see
   14.44 +  log files, and build databases are stored; its default is \<^path>\<open>$ISABELLE_HOME_USER/heaps\<close>. For ``system build mode'' (see
   14.45    \secref{sec:tool-build}), @{setting_def ISABELLE_HEAPS_SYSTEM} is used
   14.46 -  instead; its default is @{path "$ISABELLE_HOME/heaps"}.
   14.47 +  instead; its default is \<^path>\<open>$ISABELLE_HOME/heaps\<close>.
   14.48  
   14.49    \<^descr>[@{setting_def ISABELLE_LOGIC}] specifies the default logic to load if none
   14.50    is given explicitely by the user. The default value is \<^verbatim>\<open>HOL\<close>.
   14.51 @@ -249,8 +247,7 @@
   14.52    The root of component initialization is @{setting ISABELLE_HOME} itself.
   14.53    After initializing all of its sub-components recursively, @{setting
   14.54    ISABELLE_HOME_USER} is included in the same manner (if that directory
   14.55 -  exists). This allows to install private components via @{path
   14.56 -  "$ISABELLE_HOME_USER/etc/components"}, although it is often more convenient
   14.57 +  exists). This allows to install private components via \<^path>\<open>$ISABELLE_HOME_USER/etc/components\<close>, although it is often more convenient
   14.58    to do that programmatically via the \<^verbatim>\<open>init_component\<close> shell function in the
   14.59    \<^verbatim>\<open>etc/settings\<close> script of \<^verbatim>\<open>$ISABELLE_HOME_USER\<close> (or any other component
   14.60    directory). For example:
   14.61 @@ -361,7 +358,7 @@
   14.62  
   14.63    \<^medskip>
   14.64    Option \<^verbatim>\<open>-T\<close> loads a specified theory file. This is a wrapper for \<^verbatim>\<open>-e\<close> with
   14.65 -  a suitable @{ML use_thy} invocation.
   14.66 +  a suitable \<^ML>\<open>use_thy\<close> invocation.
   14.67  
   14.68    \<^medskip>
   14.69    Option \<^verbatim>\<open>-l\<close> specifies the logic session name. Option \<^verbatim>\<open>-d\<close> specifies
   14.70 @@ -443,8 +440,8 @@
   14.71  
   14.72    The user is connected to the raw ML toplevel loop: this is neither
   14.73    Isabelle/Isar nor Isabelle/ML within the usual formal context. The most
   14.74 -  relevant ML commands at this stage are @{ML use} (for ML files) and
   14.75 -  @{ML use_thy} (for theory files).
   14.76 +  relevant ML commands at this stage are \<^ML>\<open>use\<close> (for ML files) and
   14.77 +  \<^ML>\<open>use_thy\<close> (for theory files).
   14.78  \<close>
   14.79  
   14.80  
    15.1 --- a/src/Doc/System/Server.thy	Fri Jan 04 21:49:06 2019 +0100
    15.2 +++ b/src/Doc/System/Server.thy	Fri Jan 04 23:22:53 2019 +0100
    15.3 @@ -17,7 +17,7 @@
    15.4    In contrast, the Isabelle server exposes Isabelle/Scala as a
    15.5    ``terminate-stay-resident'' application that manages multiple logic
    15.6    \<^emph>\<open>sessions\<close> and concurrent tasks to use \<^emph>\<open>theories\<close>. This provides an
    15.7 -  analogous to @{ML Thy_Info.use_theories} in Isabelle/ML, but with full
    15.8 +  analogous to \<^ML>\<open>Thy_Info.use_theories\<close> in Isabelle/ML, but with full
    15.9    concurrency and Isabelle/PIDE markup.
   15.10  
   15.11    The client/server arrangement via TCP sockets also opens possibilities for
   15.12 @@ -48,7 +48,7 @@
   15.13  
   15.14    The main operation of \<^verbatim>\<open>isabelle server\<close> is to ensure that a named server is
   15.15    running, either by finding an already running process (according to the
   15.16 -  central database file @{path "$ISABELLE_HOME_USER/servers.db"}) or by
   15.17 +  central database file \<^path>\<open>$ISABELLE_HOME_USER/servers.db\<close>) or by
   15.18    becoming itself a new server that accepts connections on a particular TCP
   15.19    socket. The server name and its address are printed as initial output line.
   15.20    If another server instance is already running, the current
   15.21 @@ -464,7 +464,7 @@
   15.22    string, id?: long}\<close> describes a source position within Isabelle text. Only
   15.23    the \<open>line\<close> and \<open>file\<close> fields make immediate sense to external programs.
   15.24    Detailed \<open>offset\<close> and \<open>end_offset\<close> positions are counted according to
   15.25 -  Isabelle symbols, see @{ML_type Symbol.symbol} in Isabelle/ML @{cite
   15.26 +  Isabelle symbols, see \<^ML_type>\<open>Symbol.symbol\<close> in Isabelle/ML @{cite
   15.27    "isabelle-implementation"}. The position \<open>id\<close> belongs to the representation
   15.28    of command transactions in the Isabelle/PIDE protocol: it normally does not
   15.29    occur in externalized positions.
   15.30 @@ -724,8 +724,7 @@
   15.31    in a robust manner, instead of relying on directory locations.
   15.32  
   15.33    \<^medskip>
   15.34 -  If \<open>system_mode\<close> is \<^verbatim>\<open>true\<close>, session images are stored in @{path
   15.35 -  "$ISABELLE_HEAPS_SYSTEM"} instead of @{path "$ISABELLE_HEAPS"}. See also
   15.36 +  If \<open>system_mode\<close> is \<^verbatim>\<open>true\<close>, session images are stored in \<^path>\<open>$ISABELLE_HEAPS_SYSTEM\<close> instead of \<^path>\<open>$ISABELLE_HEAPS\<close>. See also
   15.37    option \<^verbatim>\<open>-s\<close> in @{tool build} (\secref{sec:tool-build}).
   15.38  
   15.39    \<^medskip>
    16.1 --- a/src/Doc/System/Sessions.thy	Fri Jan 04 21:49:06 2019 +0100
    16.2 +++ b/src/Doc/System/Sessions.thy	Fri Jan 04 23:22:53 2019 +0100
    16.3 @@ -48,7 +48,7 @@
    16.4    \<^verbatim>\<open>isabelle-root\<close> for session ROOT files, which is enabled by default for any
    16.5    file of that name.
    16.6  
    16.7 -  @{rail \<open>
    16.8 +  \<^rail>\<open>
    16.9      @{syntax_def session_chapter}: @'chapter' @{syntax name}
   16.10      ;
   16.11  
   16.12 @@ -77,7 +77,7 @@
   16.13      document_files: @'document_files' ('(' dir ')')? (@{syntax embedded}+)
   16.14      ;
   16.15      export_files: @'export_files' ('(' dir ')')? (@{syntax embedded}+)
   16.16 -  \<close>}
   16.17 +  \<close>
   16.18  
   16.19    \<^descr> \isakeyword{session}~\<open>A = B + body\<close> defines a new session \<open>A\<close> based on
   16.20    parent session \<open>B\<close>, with its content given in \<open>body\<close> (imported sessions and
   16.21 @@ -237,7 +237,7 @@
   16.22  
   16.23      \<^item> @{system_option_def "profiling"} specifies a mode for global ML
   16.24      profiling. Possible values are the empty string (disabled), \<^verbatim>\<open>time\<close> for
   16.25 -    @{ML profile_time} and \<^verbatim>\<open>allocations\<close> for @{ML profile_allocations}.
   16.26 +    \<^ML>\<open>profile_time\<close> and \<^verbatim>\<open>allocations\<close> for \<^ML>\<open>profile_allocations\<close>.
   16.27      Results appear near the bottom of the session log file.
   16.28  
   16.29    The @{tool_def options} tool prints Isabelle system options. Its
   16.30 @@ -396,8 +396,7 @@
   16.31  
   16.32    \<^medskip>
   16.33    Option \<^verbatim>\<open>-s\<close> enables \<^emph>\<open>system mode\<close>, which means that session images are
   16.34 -  stored in @{path "$ISABELLE_HEAPS_SYSTEM"} instead of @{path
   16.35 -  "$ISABELLE_HEAPS"}.
   16.36 +  stored in \<^path>\<open>$ISABELLE_HEAPS_SYSTEM\<close> instead of \<^path>\<open>$ISABELLE_HEAPS\<close>.
   16.37  
   16.38    \<^medskip>
   16.39    Option \<^verbatim>\<open>-v\<close> increases the general level of verbosity. Option \<^verbatim>\<open>-l\<close> lists
    17.1 --- a/src/Doc/antiquote_setup.ML	Fri Jan 04 21:49:06 2019 +0100
    17.2 +++ b/src/Doc/antiquote_setup.ML	Fri Jan 04 23:22:53 2019 +0100
    17.3 @@ -107,12 +107,12 @@
    17.4  
    17.5  val _ =
    17.6    Theory.setup
    17.7 -   (index_ml @{binding index_ML} "" ml_val #>
    17.8 -    index_ml @{binding index_ML_op} "infix" ml_op #>
    17.9 -    index_ml @{binding index_ML_type} "type" ml_type #>
   17.10 -    index_ml @{binding index_ML_exception} "exception" ml_exception #>
   17.11 -    index_ml @{binding index_ML_structure} "structure" ml_structure #>
   17.12 -    index_ml @{binding index_ML_functor} "functor" ml_functor);
   17.13 +   (index_ml \<^binding>\<open>index_ML\<close> "" ml_val #>
   17.14 +    index_ml \<^binding>\<open>index_ML_op\<close> "infix" ml_op #>
   17.15 +    index_ml \<^binding>\<open>index_ML_type\<close> "type" ml_type #>
   17.16 +    index_ml \<^binding>\<open>index_ML_exception\<close> "exception" ml_exception #>
   17.17 +    index_ml \<^binding>\<open>index_ML_structure\<close> "structure" ml_structure #>
   17.18 +    index_ml \<^binding>\<open>index_ML_functor\<close> "functor" ml_functor);
   17.19  
   17.20  end;
   17.21  
   17.22 @@ -120,7 +120,7 @@
   17.23  (* named theorems *)
   17.24  
   17.25  val _ =
   17.26 -  Theory.setup (Thy_Output.antiquotation_raw @{binding named_thms}
   17.27 +  Theory.setup (Thy_Output.antiquotation_raw \<^binding>\<open>named_thms\<close>
   17.28      (Scan.repeat (Attrib.thm -- Scan.lift (Args.parens Args.name)))
   17.29      (fn ctxt =>
   17.30        map (fn (thm, name) =>
   17.31 @@ -185,24 +185,24 @@
   17.32  
   17.33  val _ =
   17.34    Theory.setup
   17.35 -   (entity_antiqs no_check "" @{binding syntax} #>
   17.36 -    entity_antiqs Outer_Syntax.check_command "isacommand" @{binding command} #>
   17.37 -    entity_antiqs check_keyword "isakeyword" @{binding keyword} #>
   17.38 -    entity_antiqs check_keyword "isakeyword" @{binding element} #>
   17.39 -    entity_antiqs Method.check_name "" @{binding method} #>
   17.40 -    entity_antiqs Attrib.check_name "" @{binding attribute} #>
   17.41 -    entity_antiqs no_check "" @{binding fact} #>
   17.42 -    entity_antiqs no_check "" @{binding variable} #>
   17.43 -    entity_antiqs no_check "" @{binding case} #>
   17.44 -    entity_antiqs Document_Antiquotation.check "" @{binding antiquotation} #>
   17.45 -    entity_antiqs Document_Antiquotation.check_option "" @{binding antiquotation_option} #>
   17.46 -    entity_antiqs no_check "isasystem" @{binding setting} #>
   17.47 -    entity_antiqs check_system_option "isasystem" @{binding system_option} #>
   17.48 -    entity_antiqs no_check "" @{binding inference} #>
   17.49 -    entity_antiqs no_check "isasystem" @{binding executable} #>
   17.50 -    entity_antiqs no_check "isatool" @{binding tool} #>
   17.51 -    entity_antiqs ML_Context.check_antiquotation "" @{binding ML_antiquotation} #>
   17.52 -    entity_antiqs (K JEdit.check_action) "isasystem" @{binding action});
   17.53 +   (entity_antiqs no_check "" \<^binding>\<open>syntax\<close> #>
   17.54 +    entity_antiqs Outer_Syntax.check_command "isacommand" \<^binding>\<open>command\<close> #>
   17.55 +    entity_antiqs check_keyword "isakeyword" \<^binding>\<open>keyword\<close> #>
   17.56 +    entity_antiqs check_keyword "isakeyword" \<^binding>\<open>element\<close> #>
   17.57 +    entity_antiqs Method.check_name "" \<^binding>\<open>method\<close> #>
   17.58 +    entity_antiqs Attrib.check_name "" \<^binding>\<open>attribute\<close> #>
   17.59 +    entity_antiqs no_check "" \<^binding>\<open>fact\<close> #>
   17.60 +    entity_antiqs no_check "" \<^binding>\<open>variable\<close> #>
   17.61 +    entity_antiqs no_check "" \<^binding>\<open>case\<close> #>
   17.62 +    entity_antiqs Document_Antiquotation.check "" \<^binding>\<open>antiquotation\<close> #>
   17.63 +    entity_antiqs Document_Antiquotation.check_option "" \<^binding>\<open>antiquotation_option\<close> #>
   17.64 +    entity_antiqs no_check "isasystem" \<^binding>\<open>setting\<close> #>
   17.65 +    entity_antiqs check_system_option "isasystem" \<^binding>\<open>system_option\<close> #>
   17.66 +    entity_antiqs no_check "" \<^binding>\<open>inference\<close> #>
   17.67 +    entity_antiqs no_check "isasystem" \<^binding>\<open>executable\<close> #>
   17.68 +    entity_antiqs no_check "isatool" \<^binding>\<open>tool\<close> #>
   17.69 +    entity_antiqs ML_Context.check_antiquotation "" \<^binding>\<open>ML_antiquotation\<close> #>
   17.70 +    entity_antiqs (K JEdit.check_action) "isasystem" \<^binding>\<open>action\<close>);
   17.71  
   17.72  end;
   17.73  
    18.1 --- a/src/FOL/FOL.thy	Fri Jan 04 21:49:06 2019 +0100
    18.2 +++ b/src/FOL/FOL.thy	Fri Jan 04 23:22:53 2019 +0100
    18.3 @@ -155,7 +155,7 @@
    18.4        fix y y'
    18.5        assume \<open>P(y)\<close> and \<open>P(y')\<close>
    18.6        with * have \<open>x = y\<close> and \<open>x = y'\<close>
    18.7 -        by - (tactic "IntPr.fast_tac @{context} 1")+
    18.8 +        by - (tactic "IntPr.fast_tac \<^context> 1")+
    18.9        then have \<open>y = y'\<close> by (rule subst)
   18.10      } note r' = this
   18.11      show \<open>\<forall>y y'. P(y) \<and> P(y') \<longrightarrow> y = y'\<close>
   18.12 @@ -190,22 +190,22 @@
   18.13  (*Propositional rules*)
   18.14  lemmas [intro!] = refl TrueI conjI disjCI impI notI iffI
   18.15    and [elim!] = conjE disjE impCE FalseE iffCE
   18.16 -ML \<open>val prop_cs = claset_of @{context}\<close>
   18.17 +ML \<open>val prop_cs = claset_of \<^context>\<close>
   18.18  
   18.19  (*Quantifier rules*)
   18.20  lemmas [intro!] = allI ex_ex1I
   18.21    and [intro] = exI
   18.22    and [elim!] = exE alt_ex1E
   18.23    and [elim] = allE
   18.24 -ML \<open>val FOL_cs = claset_of @{context}\<close>
   18.25 +ML \<open>val FOL_cs = claset_of \<^context>\<close>
   18.26  
   18.27  ML \<open>
   18.28    structure Blast = Blast
   18.29    (
   18.30      structure Classical = Cla
   18.31      val Trueprop_const = dest_Const @{const Trueprop}
   18.32 -    val equality_name = @{const_name eq}
   18.33 -    val not_name = @{const_name Not}
   18.34 +    val equality_name = \<^const_name>\<open>eq\<close>
   18.35 +    val not_name = \<^const_name>\<open>Not\<close>
   18.36      val notE = @{thm notE}
   18.37      val ccontr = @{thm ccontr}
   18.38      val hyp_subst_tac = Hypsubst.blast_hyp_subst_tac
   18.39 @@ -343,15 +343,15 @@
   18.40  ML \<open>
   18.41  (*intuitionistic simprules only*)
   18.42  val IFOL_ss =
   18.43 -  put_simpset FOL_basic_ss @{context}
   18.44 +  put_simpset FOL_basic_ss \<^context>
   18.45    addsimps @{thms meta_simps IFOL_simps int_ex_simps int_all_simps}
   18.46 -  addsimprocs [@{simproc defined_All}, @{simproc defined_Ex}]
   18.47 +  addsimprocs [\<^simproc>\<open>defined_All\<close>, \<^simproc>\<open>defined_Ex\<close>]
   18.48    |> Simplifier.add_cong @{thm imp_cong}
   18.49    |> simpset_of;
   18.50  
   18.51  (*classical simprules too*)
   18.52  val FOL_ss =
   18.53 -  put_simpset IFOL_ss @{context}
   18.54 +  put_simpset IFOL_ss \<^context>
   18.55    addsimps @{thms cla_simps cla_ex_simps cla_all_simps}
   18.56    |> simpset_of;
   18.57  \<close>
    19.1 --- a/src/FOL/IFOL.thy	Fri Jan 04 21:49:06 2019 +0100
    19.2 +++ b/src/FOL/IFOL.thy	Fri Jan 04 23:22:53 2019 +0100
    19.3 @@ -149,7 +149,7 @@
    19.4    apply (rule major [THEN spec])
    19.5    done
    19.6  
    19.7 -text \<open>Duplicates the quantifier; for use with @{ML eresolve_tac}.\<close>
    19.8 +text \<open>Duplicates the quantifier; for use with \<^ML>\<open>eresolve_tac\<close>.\<close>
    19.9  lemma all_dupE:
   19.10    assumes major: \<open>\<forall>x. P(x)\<close>
   19.11      and r: \<open>\<lbrakk>P(x); \<forall>x. P(x)\<rbrakk> \<Longrightarrow> R\<close>
   19.12 @@ -442,7 +442,7 @@
   19.13    done
   19.14  
   19.15  text \<open>
   19.16 -  Useful with @{ML eresolve_tac} for proving equalities from known
   19.17 +  Useful with \<^ML>\<open>eresolve_tac\<close> for proving equalities from known
   19.18    equalities.
   19.19  
   19.20          a = b
   19.21 @@ -499,7 +499,7 @@
   19.22  
   19.23  text \<open>
   19.24    Roy Dyckhoff has proved that \<open>conj_impE\<close>, \<open>disj_impE\<close>, and
   19.25 -  \<open>imp_impE\<close> used with @{ML mp_tac} (restricted to atomic formulae) is
   19.26 +  \<open>imp_impE\<close> used with \<^ML>\<open>mp_tac\<close> (restricted to atomic formulae) is
   19.27    COMPLETE for intuitionistic propositional logic.
   19.28  
   19.29    See R. Dyckhoff, Contraction-free sequent calculi for intuitionistic logic
   19.30 @@ -608,7 +608,7 @@
   19.31  
   19.32  subsection \<open>Intuitionistic Reasoning\<close>
   19.33  
   19.34 -setup \<open>Intuitionistic.method_setup @{binding iprover}\<close>
   19.35 +setup \<open>Intuitionistic.method_setup \<^binding>\<open>iprover\<close>\<close>
   19.36  
   19.37  lemma impE':
   19.38    assumes 1: \<open>P \<longrightarrow> Q\<close>
    20.1 --- a/src/FOL/ex/Intuitionistic.thy	Fri Jan 04 21:49:06 2019 +0100
    20.2 +++ b/src/FOL/ex/Intuitionistic.thy	Fri Jan 04 23:22:53 2019 +0100
    20.3 @@ -37,56 +37,56 @@
    20.4  is intuitionstically equivalent to $P$.  [Andy Pitts]\<close>
    20.5  
    20.6  lemma \<open>\<not> \<not> (P \<and> Q) \<longleftrightarrow> \<not> \<not> P \<and> \<not> \<not> Q\<close>
    20.7 -  by (tactic \<open>IntPr.fast_tac @{context} 1\<close>)
    20.8 +  by (tactic \<open>IntPr.fast_tac \<^context> 1\<close>)
    20.9  
   20.10  lemma \<open>\<not> \<not> ((\<not> P \<longrightarrow> Q) \<longrightarrow> (\<not> P \<longrightarrow> \<not> Q) \<longrightarrow> P)\<close>
   20.11 -  by (tactic \<open>IntPr.fast_tac @{context} 1\<close>)
   20.12 +  by (tactic \<open>IntPr.fast_tac \<^context> 1\<close>)
   20.13  
   20.14  text \<open>Double-negation does NOT distribute over disjunction.\<close>
   20.15  
   20.16  lemma \<open>\<not> \<not> (P \<longrightarrow> Q) \<longleftrightarrow> (\<not> \<not> P \<longrightarrow> \<not> \<not> Q)\<close>
   20.17 -  by (tactic \<open>IntPr.fast_tac @{context} 1\<close>)
   20.18 +  by (tactic \<open>IntPr.fast_tac \<^context> 1\<close>)
   20.19  
   20.20  lemma \<open>\<not> \<not> \<not> P \<longleftrightarrow> \<not> P\<close>
   20.21 -  by (tactic \<open>IntPr.fast_tac @{context} 1\<close>)
   20.22 +  by (tactic \<open>IntPr.fast_tac \<^context> 1\<close>)
   20.23  
   20.24  lemma \<open>\<not> \<not> ((P \<longrightarrow> Q \<or> R) \<longrightarrow> (P \<longrightarrow> Q) \<or> (P \<longrightarrow> R))\<close>
   20.25 -  by (tactic \<open>IntPr.fast_tac @{context} 1\<close>)
   20.26 +  by (tactic \<open>IntPr.fast_tac \<^context> 1\<close>)
   20.27  
   20.28  lemma \<open>(P \<longleftrightarrow> Q) \<longleftrightarrow> (Q \<longleftrightarrow> P)\<close>
   20.29 -  by (tactic \<open>IntPr.fast_tac @{context} 1\<close>)
   20.30 +  by (tactic \<open>IntPr.fast_tac \<^context> 1\<close>)
   20.31  
   20.32  lemma \<open>((P \<longrightarrow> (Q \<or> (Q \<longrightarrow> R))) \<longrightarrow> R) \<longrightarrow> R\<close>
   20.33 -  by (tactic \<open>IntPr.fast_tac @{context} 1\<close>)
   20.34 +  by (tactic \<open>IntPr.fast_tac \<^context> 1\<close>)
   20.35  
   20.36  lemma
   20.37    \<open>(((G \<longrightarrow> A) \<longrightarrow> J) \<longrightarrow> D \<longrightarrow> E) \<longrightarrow> (((H \<longrightarrow> B) \<longrightarrow> I) \<longrightarrow> C \<longrightarrow> J)
   20.38      \<longrightarrow> (A \<longrightarrow> H) \<longrightarrow> F \<longrightarrow> G \<longrightarrow> (((C \<longrightarrow> B) \<longrightarrow> I) \<longrightarrow> D) \<longrightarrow> (A \<longrightarrow> C)
   20.39      \<longrightarrow> (((F \<longrightarrow> A) \<longrightarrow> B) \<longrightarrow> I) \<longrightarrow> E\<close>
   20.40 -  by (tactic \<open>IntPr.fast_tac @{context} 1\<close>)
   20.41 +  by (tactic \<open>IntPr.fast_tac \<^context> 1\<close>)
   20.42  
   20.43  
   20.44  subsection \<open>Lemmas for the propositional double-negation translation\<close>
   20.45  
   20.46  lemma \<open>P \<longrightarrow> \<not> \<not> P\<close>
   20.47 -  by (tactic \<open>IntPr.fast_tac @{context} 1\<close>)
   20.48 +  by (tactic \<open>IntPr.fast_tac \<^context> 1\<close>)
   20.49  
   20.50  lemma \<open>\<not> \<not> (\<not> \<not> P \<longrightarrow> P)\<close>
   20.51 -  by (tactic \<open>IntPr.fast_tac @{context} 1\<close>)
   20.52 +  by (tactic \<open>IntPr.fast_tac \<^context> 1\<close>)
   20.53  
   20.54  lemma \<open>\<not> \<not> P \<and> \<not> \<not> (P \<longrightarrow> Q) \<longrightarrow> \<not> \<not> Q\<close>
   20.55 -  by (tactic \<open>IntPr.fast_tac @{context} 1\<close>)
   20.56 +  by (tactic \<open>IntPr.fast_tac \<^context> 1\<close>)
   20.57  
   20.58  
   20.59  text \<open>The following are classically but not constructively valid.
   20.60    The attempt to prove them terminates quickly!\<close>
   20.61  lemma \<open>((P \<longrightarrow> Q) \<longrightarrow> P) \<longrightarrow> P\<close>
   20.62 -apply (tactic \<open>IntPr.fast_tac @{context} 1\<close>)?
   20.63 +apply (tactic \<open>IntPr.fast_tac \<^context> 1\<close>)?
   20.64  apply (rule asm_rl) \<comment> \<open>Checks that subgoals remain: proof failed.\<close>
   20.65  oops
   20.66  
   20.67  lemma \<open>(P \<and> Q \<longrightarrow> R) \<longrightarrow> (P \<longrightarrow> R) \<or> (Q \<longrightarrow> R)\<close>
   20.68 -apply (tactic \<open>IntPr.fast_tac @{context} 1\<close>)?
   20.69 +apply (tactic \<open>IntPr.fast_tac \<^context> 1\<close>)?
   20.70  apply (rule asm_rl) \<comment> \<open>Checks that subgoals remain: proof failed.\<close>
   20.71  oops
   20.72  
   20.73 @@ -98,7 +98,7 @@
   20.74    \<open>((P \<longleftrightarrow> Q) \<longrightarrow> P \<and> Q \<and> R) \<and>
   20.75      ((Q \<longleftrightarrow> R) \<longrightarrow> P \<and> Q \<and> R) \<and>
   20.76      ((R \<longleftrightarrow> P) \<longrightarrow> P \<and> Q \<and> R) \<longrightarrow> P \<and> Q \<and> R\<close>
   20.77 -  by (tactic \<open>IntPr.fast_tac @{context} 1\<close>)
   20.78 +  by (tactic \<open>IntPr.fast_tac \<^context> 1\<close>)
   20.79  
   20.80  
   20.81  text \<open>de Bruijn formula with five predicates\<close>
   20.82 @@ -108,7 +108,7 @@
   20.83      ((R \<longleftrightarrow> S) \<longrightarrow> P \<and> Q \<and> R \<and> S \<and> T) \<and>
   20.84      ((S \<longleftrightarrow> T) \<longrightarrow> P \<and> Q \<and> R \<and> S \<and> T) \<and>
   20.85      ((T \<longleftrightarrow> P) \<longrightarrow> P \<and> Q \<and> R \<and> S \<and> T) \<longrightarrow> P \<and> Q \<and> R \<and> S \<and> T\<close>
   20.86 -  by (tactic \<open>IntPr.fast_tac @{context} 1\<close>)
   20.87 +  by (tactic \<open>IntPr.fast_tac \<^context> 1\<close>)
   20.88  
   20.89  
   20.90  text \<open>
   20.91 @@ -121,11 +121,11 @@
   20.92  lemma
   20.93    \<open>(\<forall>x. \<exists>y. \<forall>z. p(x) \<and> q(y) \<and> r(z)) \<longleftrightarrow>
   20.94      (\<forall>z. \<exists>y. \<forall>x. p(x) \<and> q(y) \<and> r(z))\<close>
   20.95 -  by (tactic \<open>IntPr.best_dup_tac @{context} 1\<close>)  \<comment> \<open>SLOW\<close>
   20.96 +  by (tactic \<open>IntPr.best_dup_tac \<^context> 1\<close>)  \<comment> \<open>SLOW\<close>
   20.97  
   20.98  text\<open>Problem 3.1\<close>
   20.99  lemma \<open>\<not> (\<exists>x. \<forall>y. mem(y,x) \<longleftrightarrow> \<not> mem(x,x))\<close>
  20.100 -  by (tactic \<open>IntPr.fast_tac @{context} 1\<close>)
  20.101 +  by (tactic \<open>IntPr.fast_tac \<^context> 1\<close>)
  20.102  
  20.103  text\<open>Problem 4.1: hopeless!\<close>
  20.104  lemma
  20.105 @@ -138,80 +138,80 @@
  20.106  
  20.107  text\<open>\<open>\<not>\<not>\<close>1\<close>
  20.108  lemma \<open>\<not> \<not> ((P \<longrightarrow> Q) \<longleftrightarrow> (\<not> Q \<longrightarrow> \<not> P))\<close>
  20.109 -  by (tactic \<open>IntPr.fast_tac @{context} 1\<close>)
  20.110 +  by (tactic \<open>IntPr.fast_tac \<^context> 1\<close>)
  20.111  
  20.112  text\<open>\<open>\<not>\<not>\<close>2\<close>
  20.113  lemma \<open>\<not> \<not> (\<not> \<not> P \<longleftrightarrow> P)\<close>
  20.114 -  by (tactic \<open>IntPr.fast_tac @{context} 1\<close>)
  20.115 +  by (tactic \<open>IntPr.fast_tac \<^context> 1\<close>)
  20.116  
  20.117  text\<open>3\<close>
  20.118  lemma \<open>\<not> (P \<longrightarrow> Q) \<longrightarrow> (Q \<longrightarrow> P)\<close>
  20.119 -  by (tactic \<open>IntPr.fast_tac @{context} 1\<close>)
  20.120 +  by (tactic \<open>IntPr.fast_tac \<^context> 1\<close>)
  20.121  
  20.122  text\<open>\<open>\<not>\<not>\<close>4\<close>
  20.123  lemma \<open>\<not> \<not> ((\<not> P \<longrightarrow> Q) \<longleftrightarrow> (\<not> Q \<longrightarrow> P))\<close>
  20.124 -  by (tactic \<open>IntPr.fast_tac @{context} 1\<close>)
  20.125 +  by (tactic \<open>IntPr.fast_tac \<^context> 1\<close>)
  20.126  
  20.127  text\<open>\<open>\<not>\<not>\<close>5\<close>
  20.128  lemma \<open>\<not> \<not> ((P \<or> Q \<longrightarrow> P \<or> R) \<longrightarrow> P \<or> (Q \<longrightarrow> R))\<close>
  20.129 -  by (tactic \<open>IntPr.fast_tac @{context} 1\<close>)
  20.130 +  by (tactic \<open>IntPr.fast_tac \<^context> 1\<close>)
  20.131  
  20.132  text\<open>\<open>\<not>\<not>\<close>6\<close>
  20.133  lemma \<open>\<not> \<not> (P \<or> \<not> P)\<close>
  20.134 -  by (tactic \<open>IntPr.fast_tac @{context} 1\<close>)
  20.135 +  by (tactic \<open>IntPr.fast_tac \<^context> 1\<close>)
  20.136  
  20.137  text\<open>\<open>\<not>\<not>\<close>7\<close>
  20.138  lemma \<open>\<not> \<not> (P \<or> \<not> \<not> \<not> P)\<close>
  20.139 -  by (tactic \<open>IntPr.fast_tac @{context} 1\<close>)
  20.140 +  by (tactic \<open>IntPr.fast_tac \<^context> 1\<close>)
  20.141  
  20.142  text\<open>\<open>\<not>\<not>\<close>8. Peirce's law\<close>
  20.143  lemma \<open>\<not> \<not> (((P \<longrightarrow> Q) \<longrightarrow> P) \<longrightarrow> P)\<close>
  20.144 -  by (tactic \<open>IntPr.fast_tac @{context} 1\<close>)
  20.145 +  by (tactic \<open>IntPr.fast_tac \<^context> 1\<close>)
  20.146  
  20.147  text\<open>9\<close>
  20.148  lemma \<open>((P \<or> Q) \<and> (\<not> P \<or> Q) \<and> (P \<or> \<not> Q)) \<longrightarrow> \<not> (\<not> P \<or> \<not> Q)\<close>
  20.149 -  by (tactic \<open>IntPr.fast_tac @{context} 1\<close>)
  20.150 +  by (tactic \<open>IntPr.fast_tac \<^context> 1\<close>)
  20.151  
  20.152  text\<open>10\<close>
  20.153  lemma \<open>(Q \<longrightarrow> R) \<longrightarrow> (R \<longrightarrow> P \<and> Q) \<longrightarrow> (P \<longrightarrow> (Q \<or> R)) \<longrightarrow> (P \<longleftrightarrow> Q)\<close>
  20.154 -  by (tactic \<open>IntPr.fast_tac @{context} 1\<close>)
  20.155 +  by (tactic \<open>IntPr.fast_tac \<^context> 1\<close>)
  20.156  
  20.157  
  20.158  subsection\<open>11. Proved in each direction (incorrectly, says Pelletier!!)\<close>
  20.159  
  20.160  lemma \<open>P \<longleftrightarrow> P\<close>
  20.161 -  by (tactic \<open>IntPr.fast_tac @{context} 1\<close>)
  20.162 +  by (tactic \<open>IntPr.fast_tac \<^context> 1\<close>)
  20.163  
  20.164  text\<open>\<open>\<not>\<not>\<close>12. Dijkstra's law\<close>
  20.165  lemma \<open>\<not> \<not> (((P \<longleftrightarrow> Q) \<longleftrightarrow> R) \<longleftrightarrow> (P \<longleftrightarrow> (Q \<longleftrightarrow> R)))\<close>
  20.166 -  by (tactic \<open>IntPr.fast_tac @{context} 1\<close>)
  20.167 +  by (tactic \<open>IntPr.fast_tac \<^context> 1\<close>)
  20.168  
  20.169  lemma \<open>((P \<longleftrightarrow> Q) \<longleftrightarrow> R) \<longrightarrow> \<not> \<not> (P \<longleftrightarrow> (Q \<longleftrightarrow> R))\<close>
  20.170 -  by (tactic \<open>IntPr.fast_tac @{context} 1\<close>)
  20.171 +  by (tactic \<open>IntPr.fast_tac \<^context> 1\<close>)
  20.172  
  20.173  text\<open>13. Distributive law\<close>
  20.174  lemma \<open>P \<or> (Q \<and> R) \<longleftrightarrow> (P \<or> Q) \<and> (P \<or> R)\<close>
  20.175 -  by (tactic \<open>IntPr.fast_tac @{context} 1\<close>)
  20.176 +  by (tactic \<open>IntPr.fast_tac \<^context> 1\<close>)
  20.177  
  20.178  text\<open>\<open>\<not>\<not>\<close>14\<close>
  20.179  lemma \<open>\<not> \<not> ((P \<longleftrightarrow> Q) \<longleftrightarrow> ((Q \<or> \<not> P) \<and> (\<not> Q \<or> P)))\<close>
  20.180 -  by (tactic \<open>IntPr.fast_tac @{context} 1\<close>)
  20.181 +  by (tactic \<open>IntPr.fast_tac \<^context> 1\<close>)
  20.182  
  20.183  text\<open>\<open>\<not>\<not>\<close>15\<close>
  20.184  lemma \<open>\<not> \<not> ((P \<longrightarrow> Q) \<longleftrightarrow> (\<not> P \<or> Q))\<close>
  20.185 -  by (tactic \<open>IntPr.fast_tac @{context} 1\<close>)
  20.186 +  by (tactic \<open>IntPr.fast_tac \<^context> 1\<close>)
  20.187  
  20.188  text\<open>\<open>\<not>\<not>\<close>16\<close>
  20.189  lemma \<open>\<not> \<not> ((P \<longrightarrow> Q) \<or> (Q \<longrightarrow> P))\<close>
  20.190 -  by (tactic \<open>IntPr.fast_tac @{context} 1\<close>)
  20.191 +  by (tactic \<open>IntPr.fast_tac \<^context> 1\<close>)
  20.192  
  20.193  text\<open>\<open>\<not>\<not>\<close>17\<close>
  20.194  lemma \<open>\<not> \<not> (((P \<and> (Q \<longrightarrow> R)) \<longrightarrow> S) \<longleftrightarrow> ((\<not> P \<or> Q \<or> S) \<and> (\<not> P \<or> \<not> R \<or> S)))\<close>
  20.195 -  by (tactic \<open>IntPr.fast_tac @{context} 1\<close>)
  20.196 +  by (tactic \<open>IntPr.fast_tac \<^context> 1\<close>)
  20.197  
  20.198  text \<open>Dijkstra's ``Golden Rule''\<close>
  20.199  lemma \<open>(P \<and> Q) \<longleftrightarrow> P \<longleftrightarrow> Q \<longleftrightarrow> (P \<or> Q)\<close>
  20.200 -  by (tactic \<open>IntPr.fast_tac @{context} 1\<close>)
  20.201 +  by (tactic \<open>IntPr.fast_tac \<^context> 1\<close>)
  20.202  
  20.203  
  20.204  section \<open>Examples with quantifiers\<close>
  20.205 @@ -219,47 +219,47 @@
  20.206  subsection \<open>The converse is classical in the following implications \dots\<close>
  20.207  
  20.208  lemma \<open>(\<exists>x. P(x) \<longrightarrow> Q) \<longrightarrow> (\<forall>x. P(x)) \<longrightarrow> Q\<close>
  20.209 -  by (tactic \<open>IntPr.fast_tac @{context} 1\<close>)
  20.210 +  by (tactic \<open>IntPr.fast_tac \<^context> 1\<close>)
  20.211  
  20.212  lemma \<open>((\<forall>x. P(x)) \<longrightarrow> Q) \<longrightarrow> \<not> (\<forall>x. P(x) \<and> \<not> Q)\<close>
  20.213 -  by (tactic \<open>IntPr.fast_tac @{context} 1\<close>)
  20.214 +  by (tactic \<open>IntPr.fast_tac \<^context> 1\<close>)
  20.215  
  20.216  lemma \<open>((\<forall>x. \<not> P(x)) \<longrightarrow> Q) \<longrightarrow> \<not> (\<forall>x. \<not> (P(x) \<or> Q))\<close>
  20.217 -  by (tactic \<open>IntPr.fast_tac @{context} 1\<close>)
  20.218 +  by (tactic \<open>IntPr.fast_tac \<^context> 1\<close>)
  20.219  
  20.220  lemma \<open>(\<forall>x. P(x)) \<or> Q \<longrightarrow> (\<forall>x. P(x) \<or> Q)\<close>
  20.221 -  by (tactic \<open>IntPr.fast_tac @{context} 1\<close>)
  20.222 +  by (tactic \<open>IntPr.fast_tac \<^context> 1\<close>)
  20.223  
  20.224  lemma \<open>(\<exists>x. P \<longrightarrow> Q(x)) \<longrightarrow> (P \<longrightarrow> (\<exists>x. Q(x)))\<close>
  20.225 -  by (tactic \<open>IntPr.fast_tac @{context} 1\<close>)
  20.226 +  by (tactic \<open>IntPr.fast_tac \<^context> 1\<close>)
  20.227  
  20.228  
  20.229  subsection \<open>The following are not constructively valid!\<close>
  20.230  text \<open>The attempt to prove them terminates quickly!\<close>
  20.231  
  20.232  lemma \<open>((\<forall>x. P(x)) \<longrightarrow> Q) \<longrightarrow> (\<exists>x. P(x) \<longrightarrow> Q)\<close>
  20.233 -  apply (tactic \<open>IntPr.fast_tac @{context} 1\<close>)?
  20.234 +  apply (tactic \<open>IntPr.fast_tac \<^context> 1\<close>)?
  20.235    apply (rule asm_rl) \<comment> \<open>Checks that subgoals remain: proof failed.\<close>
  20.236    oops
  20.237  
  20.238  lemma \<open>(P \<longrightarrow> (\<exists>x. Q(x))) \<longrightarrow> (\<exists>x. P \<longrightarrow> Q(x))\<close>
  20.239 -  apply (tactic \<open>IntPr.fast_tac @{context} 1\<close>)?
  20.240 +  apply (tactic \<open>IntPr.fast_tac \<^context> 1\<close>)?
  20.241    apply (rule asm_rl) \<comment> \<open>Checks that subgoals remain: proof failed.\<close>
  20.242    oops
  20.243  
  20.244  lemma \<open>(\<forall>x. P(x) \<or> Q) \<longrightarrow> ((\<forall>x. P(x)) \<or> Q)\<close>
  20.245 -  apply (tactic \<open>IntPr.fast_tac @{context} 1\<close>)?
  20.246 +  apply (tactic \<open>IntPr.fast_tac \<^context> 1\<close>)?
  20.247    apply (rule asm_rl) \<comment> \<open>Checks that subgoals remain: proof failed.\<close>
  20.248    oops
  20.249  
  20.250  lemma \<open>(\<forall>x. \<not> \<not> P(x)) \<longrightarrow> \<not> \<not> (\<forall>x. P(x))\<close>
  20.251 -  apply (tactic \<open>IntPr.fast_tac @{context} 1\<close>)?
  20.252 +  apply (tactic \<open>IntPr.fast_tac \<^context> 1\<close>)?
  20.253    apply (rule asm_rl) \<comment> \<open>Checks that subgoals remain: proof failed.\<close>
  20.254    oops
  20.255  
  20.256  text \<open>Classically but not intuitionistically valid.  Proved by a bug in 1986!\<close>
  20.257  lemma \<open>\<exists>x. Q(x) \<longrightarrow> (\<forall>x. Q(x))\<close>
  20.258 -  apply (tactic \<open>IntPr.fast_tac @{context} 1\<close>)?
  20.259 +  apply (tactic \<open>IntPr.fast_tac \<^context> 1\<close>)?
  20.260    apply (rule asm_rl) \<comment> \<open>Checks that subgoals remain: proof failed.\<close>
  20.261    oops
  20.262  
  20.263 @@ -283,7 +283,7 @@
  20.264  lemma
  20.265    \<open>(\<forall>x y. \<exists>z. \<forall>w. (P(x) \<and> Q(y) \<longrightarrow> R(z) \<and> S(w)))
  20.266      \<longrightarrow> (\<exists>x y. P(x) \<and> Q(y)) \<longrightarrow> (\<exists>z. R(z))\<close>
  20.267 -  by (tactic \<open>IntPr.fast_tac @{context} 1\<close>)
  20.268 +  by (tactic \<open>IntPr.fast_tac \<^context> 1\<close>)
  20.269  
  20.270  text\<open>21\<close>
  20.271  lemma \<open>(\<exists>x. P \<longrightarrow> Q(x)) \<and> (\<exists>x. Q(x) \<longrightarrow> P) \<longrightarrow> \<not> \<not> (\<exists>x. P \<longleftrightarrow> Q(x))\<close>
  20.272 @@ -291,11 +291,11 @@
  20.273  
  20.274  text\<open>22\<close>
  20.275  lemma \<open>(\<forall>x. P \<longleftrightarrow> Q(x)) \<longrightarrow> (P \<longleftrightarrow> (\<forall>x. Q(x)))\<close>
  20.276 -  by (tactic \<open>IntPr.fast_tac @{context} 1\<close>)
  20.277 +  by (tactic \<open>IntPr.fast_tac \<^context> 1\<close>)
  20.278  
  20.279  text\<open>\<open>\<not>\<not>\<close>23\<close>
  20.280  lemma \<open>\<not> \<not> ((\<forall>x. P \<or> Q(x)) \<longleftrightarrow> (P \<or> (\<forall>x. Q(x))))\<close>
  20.281 -  by (tactic \<open>IntPr.fast_tac @{context} 1\<close>)
  20.282 +  by (tactic \<open>IntPr.fast_tac \<^context> 1\<close>)
  20.283  
  20.284  text\<open>24\<close>
  20.285  lemma
  20.286 @@ -306,10 +306,10 @@
  20.287    Not clear why \<open>fast_tac\<close>, \<open>best_tac\<close>, \<open>ASTAR\<close> and
  20.288    \<open>ITER_DEEPEN\<close> all take forever.
  20.289  \<close>
  20.290 -  apply (tactic \<open>IntPr.safe_tac @{context}\<close>)
  20.291 +  apply (tactic \<open>IntPr.safe_tac \<^context>\<close>)
  20.292    apply (erule impE)
  20.293 -  apply (tactic \<open>IntPr.fast_tac @{context} 1\<close>)
  20.294 -  apply (tactic \<open>IntPr.fast_tac @{context} 1\<close>)
  20.295 +  apply (tactic \<open>IntPr.fast_tac \<^context> 1\<close>)
  20.296 +  apply (tactic \<open>IntPr.fast_tac \<^context> 1\<close>)
  20.297    done
  20.298  
  20.299  text\<open>25\<close>
  20.300 @@ -319,7 +319,7 @@
  20.301        (\<forall>x. P(x) \<longrightarrow> (M(x) \<and> L(x))) \<and>
  20.302        ((\<forall>x. P(x) \<longrightarrow> Q(x)) \<or> (\<exists>x. P(x) \<and> R(x)))
  20.303      \<longrightarrow> (\<exists>x. Q(x) \<and> P(x))\<close>
  20.304 -  by (tactic \<open>IntPr.fast_tac @{context} 1\<close>)
  20.305 +  by (tactic \<open>IntPr.fast_tac \<^context> 1\<close>)
  20.306  
  20.307  text\<open>\<open>\<not>\<not>\<close>26\<close>
  20.308  lemma
  20.309 @@ -335,7 +335,7 @@
  20.310      (\<forall>x. M(x) \<and> L(x) \<longrightarrow> P(x)) \<and>
  20.311      ((\<exists>x. R(x) \<and> \<not> Q(x)) \<longrightarrow> (\<forall>x. L(x) \<longrightarrow> \<not> R(x)))
  20.312    \<longrightarrow> (\<forall>x. M(x) \<longrightarrow> \<not> L(x))\<close>
  20.313 -  by (tactic \<open>IntPr.fast_tac @{context} 1\<close>)
  20.314 +  by (tactic \<open>IntPr.fast_tac \<^context> 1\<close>)
  20.315  
  20.316  text\<open>\<open>\<not>\<not>\<close>28. AMENDED\<close>
  20.317  lemma
  20.318 @@ -343,21 +343,21 @@
  20.319        (\<not> \<not> (\<forall>x. Q(x) \<or> R(x)) \<longrightarrow> (\<exists>x. Q(x) \<and> S(x))) \<and>
  20.320        (\<not> \<not> (\<exists>x. S(x)) \<longrightarrow> (\<forall>x. L(x) \<longrightarrow> M(x)))
  20.321      \<longrightarrow> (\<forall>x. P(x) \<and> L(x) \<longrightarrow> M(x))\<close>
  20.322 -  by (tactic \<open>IntPr.fast_tac @{context} 1\<close>)
  20.323 +  by (tactic \<open>IntPr.fast_tac \<^context> 1\<close>)
  20.324  
  20.325  text\<open>29. Essentially the same as Principia Mathematica *11.71\<close>
  20.326  lemma
  20.327    \<open>(\<exists>x. P(x)) \<and> (\<exists>y. Q(y))
  20.328      \<longrightarrow> ((\<forall>x. P(x) \<longrightarrow> R(x)) \<and> (\<forall>y. Q(y) \<longrightarrow> S(y)) \<longleftrightarrow>
  20.329        (\<forall>x y. P(x) \<and> Q(y) \<longrightarrow> R(x) \<and> S(y)))\<close>
  20.330 -  by (tactic \<open>IntPr.fast_tac @{context} 1\<close>)
  20.331 +  by (tactic \<open>IntPr.fast_tac \<^context> 1\<close>)
  20.332  
  20.333  text\<open>\<open>\<not>\<not>\<close>30\<close>
  20.334  lemma
  20.335    \<open>(\<forall>x. (P(x) \<or> Q(x)) \<longrightarrow> \<not> R(x)) \<and>
  20.336        (\<forall>x. (Q(x) \<longrightarrow> \<not> S(x)) \<longrightarrow> P(x) \<and> R(x))
  20.337      \<longrightarrow> (\<forall>x. \<not> \<not> S(x))\<close>
  20.338 -  by (tactic \<open>IntPr.fast_tac @{context} 1\<close>)
  20.339 +  by (tactic \<open>IntPr.fast_tac \<^context> 1\<close>)
  20.340  
  20.341  text\<open>31\<close>
  20.342  lemma
  20.343 @@ -365,7 +365,7 @@
  20.344        (\<exists>x. L(x) \<and> P(x)) \<and>
  20.345        (\<forall>x. \<not> R(x) \<longrightarrow> M(x))
  20.346    \<longrightarrow> (\<exists>x. L(x) \<and> M(x))\<close>
  20.347 -  by (tactic \<open>IntPr.fast_tac @{context} 1\<close>)
  20.348 +  by (tactic \<open>IntPr.fast_tac \<^context> 1\<close>)
  20.349  
  20.350  text\<open>32\<close>
  20.351  lemma
  20.352 @@ -373,13 +373,13 @@
  20.353      (\<forall>x. S(x) \<and> R(x) \<longrightarrow> L(x)) \<and>
  20.354      (\<forall>x. M(x) \<longrightarrow> R(x))
  20.355    \<longrightarrow> (\<forall>x. P(x) \<and> M(x) \<longrightarrow> L(x))\<close>
  20.356 -  by (tactic \<open>IntPr.fast_tac @{context} 1\<close>)
  20.357 +  by (tactic \<open>IntPr.fast_tac \<^context> 1\<close>)
  20.358  
  20.359  text\<open>\<open>\<not>\<not>\<close>33\<close>
  20.360  lemma
  20.361    \<open>(\<forall>x. \<not> \<not> (P(a) \<and> (P(x) \<longrightarrow> P(b)) \<longrightarrow> P(c))) \<longleftrightarrow>
  20.362      (\<forall>x. \<not> \<not> ((\<not> P(a) \<or> P(x) \<or> P(c)) \<and> (\<not> P(a) \<or> \<not> P(b) \<or> P(c))))\<close>
  20.363 -  apply (tactic \<open>IntPr.best_tac @{context} 1\<close>)
  20.364 +  apply (tactic \<open>IntPr.best_tac \<^context> 1\<close>)
  20.365    done
  20.366  
  20.367  
  20.368 @@ -389,7 +389,7 @@
  20.369      (\<forall>x. \<exists>y. G(x,y)) \<and>
  20.370      (\<forall>x y. J(x,y) \<or> G(x,y) \<longrightarrow> (\<forall>z. J(y,z) \<or> G(y,z) \<longrightarrow> H(x,z)))
  20.371    \<longrightarrow> (\<forall>x. \<exists>y. H(x,y))\<close>
  20.372 -  by (tactic \<open>IntPr.fast_tac @{context} 1\<close>)
  20.373 +  by (tactic \<open>IntPr.fast_tac \<^context> 1\<close>)
  20.374  
  20.375  text\<open>37\<close>
  20.376  lemma
  20.377 @@ -402,13 +402,13 @@
  20.378  
  20.379  text\<open>39\<close>
  20.380  lemma \<open>\<not> (\<exists>x. \<forall>y. F(y,x) \<longleftrightarrow> \<not> F(y,y))\<close>
  20.381 -  by (tactic \<open>IntPr.fast_tac @{context} 1\<close>)
  20.382 +  by (tactic \<open>IntPr.fast_tac \<^context> 1\<close>)
  20.383  
  20.384  text\<open>40. AMENDED\<close>
  20.385  lemma
  20.386    \<open>(\<exists>y. \<forall>x. F(x,y) \<longleftrightarrow> F(x,x)) \<longrightarrow>
  20.387      \<not> (\<forall>x. \<exists>y. \<forall>z. F(z,y) \<longleftrightarrow> \<not> F(z,x))\<close>
  20.388 -  by (tactic \<open>IntPr.fast_tac @{context} 1\<close>)
  20.389 +  by (tactic \<open>IntPr.fast_tac \<^context> 1\<close>)
  20.390  
  20.391  text\<open>44\<close>
  20.392  lemma
  20.393 @@ -416,37 +416,37 @@
  20.394      (\<exists>y. g(y) \<and> h(x,y) \<and> (\<exists>y. g(y) \<and> \<not> h(x,y)))) \<and>
  20.395      (\<exists>x. j(x) \<and> (\<forall>y. g(y) \<longrightarrow> h(x,y)))
  20.396      \<longrightarrow> (\<exists>x. j(x) \<and> \<not> f(x))\<close>
  20.397 -  by (tactic \<open>IntPr.fast_tac @{context} 1\<close>)
  20.398 +  by (tactic \<open>IntPr.fast_tac \<^context> 1\<close>)
  20.399  
  20.400  text\<open>48\<close>
  20.401  lemma \<open>(a = b \<or> c = d) \<and> (a = c \<or> b = d) \<longrightarrow> a = d \<or> b = c\<close>
  20.402 -  by (tactic \<open>IntPr.fast_tac @{context} 1\<close>)
  20.403 +  by (tactic \<open>IntPr.fast_tac \<^context> 1\<close>)
  20.404  
  20.405  text\<open>51\<close>
  20.406  lemma
  20.407    \<open>(\<exists>z w. \<forall>x y. P(x,y) \<longleftrightarrow> (x = z \<and> y = w)) \<longrightarrow>
  20.408      (\<exists>z. \<forall>x. \<exists>w. (\<forall>y. P(x,y) \<longleftrightarrow> y = w) \<longleftrightarrow> x = z)\<close>
  20.409 -  by (tactic \<open>IntPr.fast_tac @{context} 1\<close>)
  20.410 +  by (tactic \<open>IntPr.fast_tac \<^context> 1\<close>)
  20.411  
  20.412  text\<open>52\<close>
  20.413  text \<open>Almost the same as 51.\<close>
  20.414  lemma
  20.415    \<open>(\<exists>z w. \<forall>x y. P(x,y) \<longleftrightarrow> (x = z \<and> y = w)) \<longrightarrow>
  20.416      (\<exists>w. \<forall>y. \<exists>z. (\<forall>x. P(x,y) \<longleftrightarrow> x = z) \<longleftrightarrow> y = w)\<close>
  20.417 -  by (tactic \<open>IntPr.fast_tac @{context} 1\<close>)
  20.418 +  by (tactic \<open>IntPr.fast_tac \<^context> 1\<close>)
  20.419  
  20.420  text\<open>56\<close>
  20.421  lemma \<open>(\<forall>x. (\<exists>y. P(y) \<and> x = f(y)) \<longrightarrow> P(x)) \<longleftrightarrow> (\<forall>x. P(x) \<longrightarrow> P(f(x)))\<close>
  20.422 -  by (tactic \<open>IntPr.fast_tac @{context} 1\<close>)
  20.423 +  by (tactic \<open>IntPr.fast_tac \<^context> 1\<close>)
  20.424  
  20.425  text\<open>57\<close>
  20.426  lemma
  20.427    \<open>P(f(a,b), f(b,c)) \<and> P(f(b,c), f(a,c)) \<and>
  20.428      (\<forall>x y z. P(x,y) \<and> P(y,z) \<longrightarrow> P(x,z)) \<longrightarrow> P(f(a,b), f(a,c))\<close>
  20.429 -  by (tactic \<open>IntPr.fast_tac @{context} 1\<close>)
  20.430 +  by (tactic \<open>IntPr.fast_tac \<^context> 1\<close>)
  20.431  
  20.432  text\<open>60\<close>
  20.433  lemma \<open>\<forall>x. P(x,f(x)) \<longleftrightarrow> (\<exists>y. (\<forall>z. P(z,y) \<longrightarrow> P(z,f(x))) \<and> P(x,y))\<close>
  20.434 -  by (tactic \<open>IntPr.fast_tac @{context} 1\<close>)
  20.435 +  by (tactic \<open>IntPr.fast_tac \<^context> 1\<close>)
  20.436  
  20.437  end
    21.1 --- a/src/FOL/ex/Locale_Test/Locale_Test1.thy	Fri Jan 04 21:49:06 2019 +0100
    21.2 +++ b/src/FOL/ex/Locale_Test/Locale_Test1.thy	Fri Jan 04 23:22:53 2019 +0100
    21.3 @@ -162,8 +162,8 @@
    21.4  thm d1_def d2_def  (* should print as "D1(?x) <-> ..." and "D2(?x) <-> ..." *)
    21.5  
    21.6  ML \<open>
    21.7 -  check_syntax @{context} @{thm d1_def} "D1(?x) \<longleftrightarrow> \<not> p2(p1(?x))";
    21.8 -  check_syntax @{context} @{thm d2_def} "D2(?x) \<longleftrightarrow> \<not> p2(?x)";
    21.9 +  check_syntax \<^context> @{thm d1_def} "D1(?x) \<longleftrightarrow> \<not> p2(p1(?x))";
   21.10 +  check_syntax \<^context> @{thm d2_def} "D2(?x) \<longleftrightarrow> \<not> p2(?x)";
   21.11  \<close>
   21.12  
   21.13  end
   21.14 @@ -175,8 +175,8 @@
   21.15    (* should print as "d1(?x) <-> ..." and "D2(?x) <-> ..." *)
   21.16  
   21.17  ML \<open>
   21.18 -  check_syntax @{context} @{thm d1_def} "d1(?x) \<longleftrightarrow> \<not> p2(p3(?x))";
   21.19 -  check_syntax @{context} @{thm d2_def} "D2(?x) \<longleftrightarrow> \<not> p2(?x)";
   21.20 +  check_syntax \<^context> @{thm d1_def} "d1(?x) \<longleftrightarrow> \<not> p2(p3(?x))";
   21.21 +  check_syntax \<^context> @{thm d2_def} "D2(?x) \<longleftrightarrow> \<not> p2(?x)";
   21.22  \<close>
   21.23  
   21.24  end
   21.25 @@ -450,7 +450,7 @@
   21.26  interpretation int2?: semi \<open>(+)\<close>
   21.27    by unfold_locales  (* subsumed, thm int2.assoc not generated *)
   21.28  
   21.29 -ML \<open>(Global_Theory.get_thms @{theory} "int2.assoc";
   21.30 +ML \<open>(Global_Theory.get_thms \<^theory> "int2.assoc";
   21.31      raise Fail "thm int2.assoc was generated")
   21.32    handle ERROR _ => ([]:thm list);\<close>
   21.33  
    22.1 --- a/src/FOL/ex/Miniscope.thy	Fri Jan 04 21:49:06 2019 +0100
    22.2 +++ b/src/FOL/ex/Miniscope.thy	Fri Jan 04 23:22:53 2019 +0100
    22.3 @@ -68,7 +68,7 @@
    22.4  lemmas mini_simps = demorgans nnf_simps ex_simps all_simps
    22.5  
    22.6  ML \<open>
    22.7 -val mini_ss = simpset_of (@{context} addsimps @{thms mini_simps});
    22.8 +val mini_ss = simpset_of (\<^context> addsimps @{thms mini_simps});
    22.9  fun mini_tac ctxt =
   22.10    resolve_tac ctxt @{thms ccontr} THEN' asm_full_simp_tac (put_simpset mini_ss ctxt);
   22.11  \<close>
    23.1 --- a/src/FOL/ex/Prolog.thy	Fri Jan 04 21:49:06 2019 +0100
    23.2 +++ b/src/FOL/ex/Prolog.thy	Fri Jan 04 23:22:53 2019 +0100
    23.3 @@ -68,24 +68,24 @@
    23.4  \<close>
    23.5  
    23.6  schematic_goal \<open>rev(?x, a:b:c:Nil)\<close>
    23.7 -apply (tactic \<open>prolog_tac @{context}\<close>)
    23.8 +apply (tactic \<open>prolog_tac \<^context>\<close>)
    23.9  done
   23.10  
   23.11  schematic_goal \<open>rev(a:?x:c:?y:Nil, d:?z:b:?u)\<close>
   23.12 -apply (tactic \<open>prolog_tac @{context}\<close>)
   23.13 +apply (tactic \<open>prolog_tac \<^context>\<close>)
   23.14  done
   23.15  
   23.16  (*rev([a..p], ?w) requires 153 inferences *)
   23.17  schematic_goal \<open>rev(a:b:c:d:e:f:g:h:i:j:k:l:m:n:o:p:Nil, ?w)\<close>
   23.18  apply (tactic \<open>
   23.19 -  DEPTH_SOLVE (resolve_tac @{context} ([@{thm refl}, @{thm conjI}] @ @{thms rules}) 1)\<close>)
   23.20 +  DEPTH_SOLVE (resolve_tac \<^context> ([@{thm refl}, @{thm conjI}] @ @{thms rules}) 1)\<close>)
   23.21  done
   23.22  
   23.23  (*?x has 16, ?y has 32;  rev(?y,?w) requires 561 (rather large) inferences
   23.24    total inferences = 2 + 1 + 17 + 561 = 581*)
   23.25  schematic_goal \<open>a:b:c:d:e:f:g:h:i:j:k:l:m:n:o:p:Nil = ?x \<and> app(?x,?x,?y) \<and> rev(?y,?w)\<close>
   23.26  apply (tactic \<open>
   23.27 -  DEPTH_SOLVE (resolve_tac @{context} ([@{thm refl}, @{thm conjI}] @ @{thms rules}) 1)\<close>)
   23.28 +  DEPTH_SOLVE (resolve_tac \<^context> ([@{thm refl}, @{thm conjI}] @ @{thms rules}) 1)\<close>)
   23.29  done
   23.30  
   23.31  end
    24.1 --- a/src/FOL/ex/Propositional_Cla.thy	Fri Jan 04 21:49:06 2019 +0100
    24.2 +++ b/src/FOL/ex/Propositional_Cla.thy	Fri Jan 04 23:22:53 2019 +0100
    24.3 @@ -12,7 +12,7 @@
    24.4  text \<open>commutative laws of \<open>\<and>\<close> and \<open>\<or>\<close>\<close>
    24.5  
    24.6  lemma \<open>P \<and> Q \<longrightarrow> Q \<and> P\<close>
    24.7 -  by (tactic "IntPr.fast_tac @{context} 1")
    24.8 +  by (tactic "IntPr.fast_tac \<^context> 1")
    24.9  
   24.10  lemma \<open>P \<or> Q \<longrightarrow> Q \<or> P\<close>
   24.11    by fast
    25.1 --- a/src/FOL/ex/Propositional_Int.thy	Fri Jan 04 21:49:06 2019 +0100
    25.2 +++ b/src/FOL/ex/Propositional_Int.thy	Fri Jan 04 23:22:53 2019 +0100
    25.3 @@ -12,94 +12,94 @@
    25.4  text \<open>commutative laws of \<open>\<and>\<close> and \<open>\<or>\<close>\<close>
    25.5  
    25.6  lemma \<open>P \<and> Q \<longrightarrow> Q \<and> P\<close>
    25.7 -  by (tactic "IntPr.fast_tac @{context} 1")
    25.8 +  by (tactic "IntPr.fast_tac \<^context> 1")
    25.9  
   25.10  lemma \<open>P \<or> Q \<longrightarrow> Q \<or> P\<close>
   25.11 -  by (tactic "IntPr.fast_tac @{context} 1")
   25.12 +  by (tactic "IntPr.fast_tac \<^context> 1")
   25.13  
   25.14  
   25.15  text \<open>associative laws of \<open>\<and>\<close> and \<open>\<or>\<close>\<close>
   25.16  lemma \<open>(P \<and> Q) \<and> R \<longrightarrow> P \<and> (Q \<and> R)\<close>
   25.17 -  by (tactic "IntPr.fast_tac @{context} 1")
   25.18 +  by (tactic "IntPr.fast_tac \<^context> 1")
   25.19  
   25.20  lemma \<open>(P \<or> Q) \<or> R \<longrightarrow> P \<or> (Q \<or> R)\<close>
   25.21 -  by (tactic "IntPr.fast_tac @{context} 1")
   25.22 +  by (tactic "IntPr.fast_tac \<^context> 1")
   25.23  
   25.24  
   25.25  text \<open>distributive laws of \<open>\<and>\<close> and \<open>\<or>\<close>\<close>
   25.26  lemma \<open>(P \<and> Q) \<or> R \<longrightarrow> (P \<or> R) \<and> (Q \<or> R)\<close>
   25.27 -  by (tactic "IntPr.fast_tac @{context} 1")
   25.28 +  by (tactic "IntPr.fast_tac \<^context> 1")
   25.29  
   25.30  lemma \<open>(P \<or> R) \<and> (Q \<or> R) \<longrightarrow> (P \<and> Q) \<or> R\<close>
   25.31 -  by (tactic "IntPr.fast_tac @{context} 1")
   25.32 +  by (tactic "IntPr.fast_tac \<^context> 1")
   25.33  
   25.34  lemma \<open>(P \<or> Q) \<and> R \<longrightarrow> (P \<and> R) \<or> (Q \<and> R)\<close>
   25.35 -  by (tactic "IntPr.fast_tac @{context} 1")
   25.36 +  by (tactic "IntPr.fast_tac \<^context> 1")
   25.37  
   25.38  lemma \<open>(P \<and> R) \<or> (Q \<and> R) \<longrightarrow> (P \<or> Q) \<and> R\<close>
   25.39 -  by (tactic "IntPr.fast_tac @{context} 1")
   25.40 +  by (tactic "IntPr.fast_tac \<^context> 1")
   25.41  
   25.42  
   25.43  text \<open>Laws involving implication\<close>
   25.44  
   25.45  lemma \<open>(P \<longrightarrow> R) \<and> (Q \<longrightarrow> R) \<longleftrightarrow> (P \<or> Q \<longrightarrow> R)\<close>
   25.46 -  by (tactic "IntPr.fast_tac @{context} 1")
   25.47 +  by (tactic "IntPr.fast_tac \<^context> 1")
   25.48  
   25.49  lemma \<open>(P \<and> Q \<longrightarrow> R) \<longleftrightarrow> (P \<longrightarrow> (Q \<longrightarrow> R))\<close>
   25.50 -  by (tactic "IntPr.fast_tac @{context} 1")
   25.51 +  by (tactic "IntPr.fast_tac \<^context> 1")
   25.52  
   25.53  lemma \<open>((P \<longrightarrow> R) \<longrightarrow> R) \<longrightarrow> ((Q \<longrightarrow> R) \<longrightarrow> R) \<longrightarrow> (P \<and> Q \<longrightarrow> R) \<longrightarrow> R\<close>
   25.54 -  by (tactic "IntPr.fast_tac @{context} 1")
   25.55 +  by (tactic "IntPr.fast_tac \<^context> 1")
   25.56  
   25.57  lemma \<open>\<not> (P \<longrightarrow> R) \<longrightarrow> \<not> (Q \<longrightarrow> R) \<longrightarrow> \<not> (P \<and> Q \<longrightarrow> R)\<close>
   25.58 -  by (tactic "IntPr.fast_tac @{context} 1")
   25.59 +  by (tactic "IntPr.fast_tac \<^context> 1")
   25.60  
   25.61  lemma \<open>(P \<longrightarrow> Q \<and> R) \<longleftrightarrow> (P \<longrightarrow> Q) \<and> (P \<longrightarrow> R)\<close>
   25.62 -  by (tactic "IntPr.fast_tac @{context} 1")
   25.63 +  by (tactic "IntPr.fast_tac \<^context> 1")
   25.64  
   25.65  
   25.66  text \<open>Propositions-as-types\<close>
   25.67  
   25.68  \<comment> \<open>The combinator K\<close>
   25.69  lemma \<open>P \<longrightarrow> (Q \<longrightarrow> P)\<close>
   25.70 -  by (tactic "IntPr.fast_tac @{context} 1")
   25.71 +  by (tactic "IntPr.fast_tac \<^context> 1")
   25.72  
   25.73  \<comment> \<open>The combinator S\<close>
   25.74  lemma \<open>(P \<longrightarrow> Q \<longrightarrow> R) \<longrightarrow> (P \<longrightarrow> Q) \<longrightarrow> (P \<longrightarrow> R)\<close>
   25.75 -  by (tactic "IntPr.fast_tac @{context} 1")
   25.76 +  by (tactic "IntPr.fast_tac \<^context> 1")
   25.77  
   25.78  
   25.79  \<comment> \<open>Converse is classical\<close>
   25.80  lemma \<open>(P \<longrightarrow> Q) \<or> (P \<longrightarrow> R) \<longrightarrow> (P \<longrightarrow> Q \<or> R)\<close>
   25.81 -  by (tactic "IntPr.fast_tac @{context} 1")
   25.82 +  by (tactic "IntPr.fast_tac \<^context> 1")
   25.83  
   25.84  lemma \<open>(P \<longrightarrow> Q) \<longrightarrow> (\<not> Q \<longrightarrow> \<not> P)\<close>
   25.85 -  by (tactic "IntPr.fast_tac @{context} 1")
   25.86 +  by (tactic "IntPr.fast_tac \<^context> 1")
   25.87  
   25.88  
   25.89  text \<open>Schwichtenberg's examples (via T. Nipkow)\<close>
   25.90  
   25.91  lemma stab_imp: \<open>(((Q \<longrightarrow> R) \<longrightarrow> R) \<longrightarrow> Q) \<longrightarrow> (((P \<longrightarrow> Q) \<longrightarrow> R) \<longrightarrow> R) \<longrightarrow> P \<longrightarrow> Q\<close>
   25.92 -  by (tactic "IntPr.fast_tac @{context} 1")
   25.93 +  by (tactic "IntPr.fast_tac \<^context> 1")
   25.94  
   25.95  lemma stab_to_peirce:
   25.96    \<open>(((P \<longrightarrow> R) \<longrightarrow> R) \<longrightarrow> P) \<longrightarrow> (((Q \<longrightarrow> R) \<longrightarrow> R) \<longrightarrow> Q)
   25.97      \<longrightarrow> ((P \<longrightarrow> Q) \<longrightarrow> P) \<longrightarrow> P\<close>
   25.98 -  by (tactic "IntPr.fast_tac @{context} 1")
   25.99 +  by (tactic "IntPr.fast_tac \<^context> 1")
  25.100  
  25.101  lemma peirce_imp1:
  25.102    \<open>(((Q \<longrightarrow> R) \<longrightarrow> Q) \<longrightarrow> Q)
  25.103      \<longrightarrow> (((P \<longrightarrow> Q) \<longrightarrow> R) \<longrightarrow> P \<longrightarrow> Q) \<longrightarrow> P \<longrightarrow> Q\<close>
  25.104 -  by (tactic "IntPr.fast_tac @{context} 1")
  25.105 +  by (tactic "IntPr.fast_tac \<^context> 1")
  25.106  
  25.107  lemma peirce_imp2: \<open>(((P \<longrightarrow> R) \<longrightarrow> P) \<longrightarrow> P) \<longrightarrow> ((P \<longrightarrow> Q \<longrightarrow> R) \<longrightarrow> P) \<longrightarrow> P\<close>
  25.108 -  by (tactic "IntPr.fast_tac @{context} 1")
  25.109 +  by (tactic "IntPr.fast_tac \<^context> 1")
  25.110  
  25.111  lemma mints: \<open>((((P \<longrightarrow> Q) \<longrightarrow> P) \<longrightarrow> P) \<longrightarrow> Q) \<longrightarrow> Q\<close>
  25.112 -  by (tactic "IntPr.fast_tac @{context} 1")
  25.113 +  by (tactic "IntPr.fast_tac \<^context> 1")
  25.114  
  25.115  lemma mints_solovev: \<open>(P \<longrightarrow> (Q \<longrightarrow> R) \<longrightarrow> Q) \<longrightarrow> ((P \<longrightarrow> Q) \<longrightarrow> R) \<longrightarrow> R\<close>
  25.116 -  by (tactic "IntPr.fast_tac @{context} 1")
  25.117 +  by (tactic "IntPr.fast_tac \<^context> 1")
  25.118  
  25.119  lemma tatsuta:
  25.120    \<open>(((P7 \<longrightarrow> P1) \<longrightarrow> P10) \<longrightarrow> P4 \<longrightarrow> P5)
  25.121 @@ -107,7 +107,7 @@
  25.122    \<longrightarrow> (P1 \<longrightarrow> P8) \<longrightarrow> P6 \<longrightarrow> P7
  25.123    \<longrightarrow> (((P3 \<longrightarrow> P2) \<longrightarrow> P9) \<longrightarrow> P4)
  25.124    \<longrightarrow> (P1 \<longrightarrow> P3) \<longrightarrow> (((P6 \<longrightarrow> P1) \<longrightarrow> P2) \<longrightarrow> P9) \<longrightarrow> P5\<close>
  25.125 -  by (tactic "IntPr.fast_tac @{context} 1")
  25.126 +  by (tactic "IntPr.fast_tac \<^context> 1")
  25.127  
  25.128  lemma tatsuta1:
  25.129    \<open>(((P8 \<longrightarrow> P2) \<longrightarrow> P9) \<longrightarrow> P3 \<longrightarrow> P10)
  25.130 @@ -115,6 +115,6 @@
  25.131    \<longrightarrow> (((P6 \<longrightarrow> P1) \<longrightarrow> P2) \<longrightarrow> P9)
  25.132    \<longrightarrow> (((P7 \<longrightarrow> P1) \<longrightarrow> P10) \<longrightarrow> P4 \<longrightarrow> P5)
  25.133    \<longrightarrow> (P1 \<longrightarrow> P3) \<longrightarrow> (P1 \<longrightarrow> P8) \<longrightarrow> P6 \<longrightarrow> P7 \<longrightarrow> P5\<close>
  25.134 -  by (tactic "IntPr.fast_tac @{context} 1")
  25.135 +  by (tactic "IntPr.fast_tac \<^context> 1")
  25.136  
  25.137  end
    26.1 --- a/src/FOL/ex/Quantifiers_Int.thy	Fri Jan 04 21:49:06 2019 +0100
    26.2 +++ b/src/FOL/ex/Quantifiers_Int.thy	Fri Jan 04 23:22:53 2019 +0100
    26.3 @@ -10,91 +10,91 @@
    26.4  begin
    26.5  
    26.6  lemma \<open>(\<forall>x y. P(x,y)) \<longrightarrow> (\<forall>y x. P(x,y))\<close>
    26.7 -  by (tactic "IntPr.fast_tac @{context} 1")
    26.8 +  by (tactic "IntPr.fast_tac \<^context> 1")
    26.9  
   26.10  lemma \<open>(\<exists>x y. P(x,y)) \<longrightarrow> (\<exists>y x. P(x,y))\<close>
   26.11 -  by (tactic "IntPr.fast_tac @{context} 1")
   26.12 +  by (tactic "IntPr.fast_tac \<^context> 1")
   26.13  
   26.14  
   26.15  \<comment> \<open>Converse is false\<close>
   26.16  lemma \<open>(\<forall>x. P(x)) \<or> (\<forall>x. Q(x)) \<longrightarrow> (\<forall>x. P(x) \<or> Q(x))\<close>
   26.17 -  by (tactic "IntPr.fast_tac @{context} 1")
   26.18 +  by (tactic "IntPr.fast_tac \<^context> 1")
   26.19  
   26.20  lemma \<open>(\<forall>x. P \<longrightarrow> Q(x)) \<longleftrightarrow> (P \<longrightarrow> (\<forall>x. Q(x)))\<close>
   26.21 -  by (tactic "IntPr.fast_tac @{context} 1")
   26.22 +  by (tactic "IntPr.fast_tac \<^context> 1")
   26.23  
   26.24  
   26.25  lemma \<open>(\<forall>x. P(x) \<longrightarrow> Q) \<longleftrightarrow> ((\<exists>x. P(x)) \<longrightarrow> Q)\<close>
   26.26 -  by (tactic "IntPr.fast_tac @{context} 1")
   26.27 +  by (tactic "IntPr.fast_tac \<^context> 1")
   26.28  
   26.29  
   26.30  text \<open>Some harder ones\<close>
   26.31  
   26.32  lemma \<open>(\<exists>x. P(x) \<or> Q(x)) \<longleftrightarrow> (\<exists>x. P(x)) \<or> (\<exists>x. Q(x))\<close>
   26.33 -  by (tactic "IntPr.fast_tac @{context} 1")
   26.34 +  by (tactic "IntPr.fast_tac \<^context> 1")
   26.35  
   26.36  \<comment> \<open>Converse is false\<close>
   26.37  lemma \<open>(\<exists>x. P(x) \<and> Q(x)) \<longrightarrow> (\<exists>x. P(x)) \<and> (\<exists>x. Q(x))\<close>
   26.38 -  by (tactic "IntPr.fast_tac @{context} 1")
   26.39 +  by (tactic "IntPr.fast_tac \<^context> 1")
   26.40  
   26.41  
   26.42  text \<open>Basic test of quantifier reasoning\<close>
   26.43  
   26.44  \<comment> \<open>TRUE\<close>
   26.45  lemma \<open>(\<exists>y. \<forall>x. Q(x,y)) \<longrightarrow> (\<forall>x. \<exists>y. Q(x,y))\<close>
   26.46 -  by (tactic "IntPr.fast_tac @{context} 1")
   26.47 +  by (tactic "IntPr.fast_tac \<^context> 1")
   26.48  
   26.49  lemma \<open>(\<forall>x. Q(x)) \<longrightarrow> (\<exists>x. Q(x))\<close>
   26.50 -  by (tactic "IntPr.fast_tac @{context} 1")
   26.51 +  by (tactic "IntPr.fast_tac \<^context> 1")
   26.52  
   26.53  
   26.54  text \<open>The following should fail, as they are false!\<close>
   26.55  
   26.56  lemma \<open>(\<forall>x. \<exists>y. Q(x,y)) \<longrightarrow> (\<exists>y. \<forall>x. Q(x,y))\<close>
   26.57 -  apply (tactic "IntPr.fast_tac @{context} 1")?
   26.58 +  apply (tactic "IntPr.fast_tac \<^context> 1")?
   26.59    oops
   26.60  
   26.61  lemma \<open>(\<exists>x. Q(x)) \<longrightarrow> (\<forall>x. Q(x))\<close>
   26.62 -  apply (tactic "IntPr.fast_tac @{context} 1")?
   26.63 +  apply (tactic "IntPr.fast_tac \<^context> 1")?
   26.64    oops
   26.65  
   26.66  schematic_goal \<open>P(?a) \<longrightarrow> (\<forall>x. P(x))\<close>
   26.67 -  apply (tactic "IntPr.fast_tac @{context} 1")?
   26.68 +  apply (tactic "IntPr.fast_tac \<^context> 1")?
   26.69    oops
   26.70  
   26.71  schematic_goal \<open>(P(?a) \<longrightarrow> (\<forall>x. Q(x))) \<longrightarrow> (\<forall>x. P(x) \<longrightarrow> Q(x))\<close>
   26.72 -  apply (tactic "IntPr.fast_tac @{context} 1")?
   26.73 +  apply (tactic "IntPr.fast_tac \<^context> 1")?
   26.74    oops
   26.75  
   26.76  
   26.77  text \<open>Back to things that are provable \dots\<close>
   26.78  
   26.79  lemma \<open>(\<forall>x. P(x) \<longrightarrow> Q(x)) \<and> (\<exists>x. P(x)) \<longrightarrow> (\<exists>x. Q(x))\<close>
   26.80 -  by (tactic "IntPr.fast_tac @{context} 1")
   26.81 +  by (tactic "IntPr.fast_tac \<^context> 1")
   26.82  
   26.83  \<comment> \<open>An example of why exI should be delayed as long as possible\<close>
   26.84  lemma \<open>(P \<longrightarrow> (\<exists>x. Q(x))) \<and> P \<longrightarrow> (\<exists>x. Q(x))\<close>
   26.85 -  by (tactic "IntPr.fast_tac @{context} 1")
   26.86 +  by (tactic "IntPr.fast_tac \<^context> 1")
   26.87  
   26.88  schematic_goal \<open>(\<forall>x. P(x) \<longrightarrow> Q(f(x))) \<and> (\<forall>x. Q(x) \<longrightarrow> R(g(x))) \<and> P(d) \<longrightarrow> R(?a)\<close>
   26.89 -  by (tactic "IntPr.fast_tac @{context} 1")
   26.90 +  by (tactic "IntPr.fast_tac \<^context> 1")
   26.91  
   26.92  lemma \<open>(\<forall>x. Q(x)) \<longrightarrow> (\<exists>x. Q(x))\<close>
   26.93 -  by (tactic "IntPr.fast_tac @{context} 1")
   26.94 +  by (tactic "IntPr.fast_tac \<^context> 1")
   26.95  
   26.96  
   26.97  text \<open>Some slow ones\<close>
   26.98  
   26.99  \<comment> \<open>Principia Mathematica *11.53\<close>
  26.100  lemma \<open>(\<forall>x y. P(x) \<longrightarrow> Q(y)) \<longleftrightarrow> ((\<exists>x. P(x)) \<longrightarrow> (\<forall>y. Q(y)))\<close>
  26.101 -  by (tactic "IntPr.fast_tac @{context} 1")
  26.102 +  by (tactic "IntPr.fast_tac \<^context> 1")
  26.103  
  26.104  (*Principia Mathematica *11.55  *)
  26.105  lemma \<open>(\<exists>x y. P(x) \<and> Q(x,y)) \<longleftrightarrow> (\<exists>x. P(x) \<and> (\<exists>y. Q(x,y)))\<close>
  26.106 -  by (tactic "IntPr.fast_tac @{context} 1")
  26.107 +  by (tactic "IntPr.fast_tac \<^context> 1")
  26.108  
  26.109  (*Principia Mathematica *11.61  *)
  26.110  lemma \<open>(\<exists>y. \<forall>x. P(x) \<longrightarrow> Q(x,y)) \<longrightarrow> (\<forall>x. P(x) \<longrightarrow> (\<exists>y. Q(x,y)))\<close>
  26.111 -  by (tactic "IntPr.fast_tac @{context} 1")
  26.112 +  by (tactic "IntPr.fast_tac \<^context> 1")
  26.113  
  26.114  end
    27.1 --- a/src/FOL/fologic.ML	Fri Jan 04 21:49:06 2019 +0100
    27.2 +++ b/src/FOL/fologic.ML	Fri Jan 04 23:22:53 2019 +0100
    27.3 @@ -37,48 +37,48 @@
    27.4  structure FOLogic: FOLOGIC =
    27.5  struct
    27.6  
    27.7 -val oT = Type(@{type_name o},[]);
    27.8 +val oT = Type(\<^type_name>\<open>o\<close>,[]);
    27.9  
   27.10 -val Trueprop = Const(@{const_name Trueprop}, oT-->propT);
   27.11 +val Trueprop = Const(\<^const_name>\<open>Trueprop\<close>, oT-->propT);
   27.12  
   27.13  fun mk_Trueprop P = Trueprop $ P;
   27.14  
   27.15 -fun dest_Trueprop (Const (@{const_name Trueprop}, _) $ P) = P
   27.16 +fun dest_Trueprop (Const (\<^const_name>\<open>Trueprop\<close>, _) $ P) = P
   27.17    | dest_Trueprop t = raise TERM ("dest_Trueprop", [t]);
   27.18  
   27.19  
   27.20  (* Logical constants *)
   27.21  
   27.22 -val not = Const (@{const_name Not}, oT --> oT);
   27.23 -val conj = Const(@{const_name conj}, [oT,oT]--->oT);
   27.24 -val disj = Const(@{const_name disj}, [oT,oT]--->oT);
   27.25 -val imp = Const(@{const_name imp}, [oT,oT]--->oT)
   27.26 -val iff = Const(@{const_name iff}, [oT,oT]--->oT);
   27.27 +val not = Const (\<^const_name>\<open>Not\<close>, oT --> oT);
   27.28 +val conj = Const(\<^const_name>\<open>conj\<close>, [oT,oT]--->oT);
   27.29 +val disj = Const(\<^const_name>\<open>disj\<close>, [oT,oT]--->oT);
   27.30 +val imp = Const(\<^const_name>\<open>imp\<close>, [oT,oT]--->oT)
   27.31 +val iff = Const(\<^const_name>\<open>iff\<close>, [oT,oT]--->oT);
   27.32  
   27.33  fun mk_conj (t1, t2) = conj $ t1 $ t2
   27.34  and mk_disj (t1, t2) = disj $ t1 $ t2
   27.35  and mk_imp (t1, t2) = imp $ t1 $ t2
   27.36  and mk_iff (t1, t2) = iff $ t1 $ t2;
   27.37  
   27.38 -fun dest_imp (Const(@{const_name imp},_) $ A $ B) = (A, B)
   27.39 +fun dest_imp (Const(\<^const_name>\<open>imp\<close>,_) $ A $ B) = (A, B)
   27.40    | dest_imp  t = raise TERM ("dest_imp", [t]);
   27.41  
   27.42 -fun dest_conj (Const (@{const_name conj}, _) $ t $ t') = t :: dest_conj t'
   27.43 +fun dest_conj (Const (\<^const_name>\<open>conj\<close>, _) $ t $ t') = t :: dest_conj t'
   27.44    | dest_conj t = [t];
   27.45  
   27.46 -fun dest_iff (Const(@{const_name iff},_) $ A $ B) = (A, B)
   27.47 +fun dest_iff (Const(\<^const_name>\<open>iff\<close>,_) $ A $ B) = (A, B)
   27.48    | dest_iff  t = raise TERM ("dest_iff", [t]);
   27.49  
   27.50 -fun eq_const T = Const (@{const_name eq}, [T, T] ---> oT);
   27.51 +fun eq_const T = Const (\<^const_name>\<open>eq\<close>, [T, T] ---> oT);
   27.52  fun mk_eq (t, u) = eq_const (fastype_of t) $ t $ u;
   27.53  
   27.54 -fun dest_eq (Const (@{const_name eq}, _) $ lhs $ rhs) = (lhs, rhs)
   27.55 +fun dest_eq (Const (\<^const_name>\<open>eq\<close>, _) $ lhs $ rhs) = (lhs, rhs)
   27.56    | dest_eq t = raise TERM ("dest_eq", [t])
   27.57  
   27.58 -fun all_const T = Const (@{const_name All}, [T --> oT] ---> oT);
   27.59 +fun all_const T = Const (\<^const_name>\<open>All\<close>, [T --> oT] ---> oT);
   27.60  fun mk_all (Free (x, T), P) = all_const T $ absfree (x, T) P;
   27.61  
   27.62 -fun exists_const T = Const (@{const_name Ex}, [T --> oT] ---> oT);
   27.63 +fun exists_const T = Const (\<^const_name>\<open>Ex\<close>, [T --> oT] ---> oT);
   27.64  fun mk_exists (Free (x, T), P) = exists_const T $ absfree (x, T) P;
   27.65  
   27.66  
    28.1 --- a/src/FOL/simpdata.ML	Fri Jan 04 21:49:06 2019 +0100
    28.2 +++ b/src/FOL/simpdata.ML	Fri Jan 04 23:22:53 2019 +0100
    28.3 @@ -9,16 +9,16 @@
    28.4  
    28.5  fun mk_meta_eq th =
    28.6    (case Thm.concl_of th of
    28.7 -    _ $ (Const(@{const_name eq},_)$_$_)   => th RS @{thm eq_reflection}
    28.8 -  | _ $ (Const(@{const_name iff},_)$_$_) => th RS @{thm iff_reflection}
    28.9 +    _ $ (Const(\<^const_name>\<open>eq\<close>,_)$_$_)   => th RS @{thm eq_reflection}
   28.10 +  | _ $ (Const(\<^const_name>\<open>iff\<close>,_)$_$_) => th RS @{thm iff_reflection}
   28.11    | _ => error "conclusion must be a =-equality or <->");
   28.12  
   28.13  fun mk_eq th =
   28.14    (case Thm.concl_of th of
   28.15 -    Const(@{const_name Pure.eq},_)$_$_ => th
   28.16 -  | _ $ (Const(@{const_name eq},_)$_$_)   => mk_meta_eq th
   28.17 -  | _ $ (Const(@{const_name iff},_)$_$_) => mk_meta_eq th
   28.18 -  | _ $ (Const(@{const_name Not},_)$_)      => th RS @{thm iff_reflection_F}
   28.19 +    Const(\<^const_name>\<open>Pure.eq\<close>,_)$_$_ => th
   28.20 +  | _ $ (Const(\<^const_name>\<open>eq\<close>,_)$_$_)   => mk_meta_eq th
   28.21 +  | _ $ (Const(\<^const_name>\<open>iff\<close>,_)$_$_) => mk_meta_eq th
   28.22 +  | _ $ (Const(\<^const_name>\<open>Not\<close>,_)$_)      => th RS @{thm iff_reflection_F}
   28.23    | _  => th RS @{thm iff_reflection_T});
   28.24  
   28.25  (*Replace premises x=y, X<->Y by X==Y*)
   28.26 @@ -33,14 +33,14 @@
   28.27        error("Premises and conclusion of congruence rules must use =-equality or <->");
   28.28  
   28.29  val mksimps_pairs =
   28.30 -  [(@{const_name imp}, [@{thm mp}]), (@{const_name conj}, [@{thm conjunct1}, @{thm conjunct2}]),
   28.31 -   (@{const_name All}, [@{thm spec}]), (@{const_name True}, []), (@{const_name False}, [])];
   28.32 +  [(\<^const_name>\<open>imp\<close>, [@{thm mp}]), (\<^const_name>\<open>conj\<close>, [@{thm conjunct1}, @{thm conjunct2}]),
   28.33 +   (\<^const_name>\<open>All\<close>, [@{thm spec}]), (\<^const_name>\<open>True\<close>, []), (\<^const_name>\<open>False\<close>, [])];
   28.34  
   28.35  fun mk_atomize pairs =
   28.36    let
   28.37      fun atoms th =
   28.38        (case Thm.concl_of th of
   28.39 -         Const(@{const_name Trueprop},_) $ p =>
   28.40 +         Const(\<^const_name>\<open>Trueprop\<close>,_) $ p =>
   28.41             (case head_of p of
   28.42                Const(a,_) =>
   28.43                  (case AList.lookup (op =) pairs a of
   28.44 @@ -57,11 +57,11 @@
   28.45  structure Quantifier1 = Quantifier1
   28.46  (
   28.47    (*abstract syntax*)
   28.48 -  fun dest_eq (Const (@{const_name eq}, _) $ s $ t) = SOME (s, t)
   28.49 +  fun dest_eq (Const (\<^const_name>\<open>eq\<close>, _) $ s $ t) = SOME (s, t)
   28.50      | dest_eq _ = NONE
   28.51 -  fun dest_conj (Const (@{const_name conj}, _) $ s $ t) = SOME (s, t)
   28.52 +  fun dest_conj (Const (\<^const_name>\<open>conj\<close>, _) $ s $ t) = SOME (s, t)
   28.53      | dest_conj _ = NONE
   28.54 -  fun dest_imp (Const (@{const_name imp}, _) $ s $ t) = SOME (s, t)
   28.55 +  fun dest_imp (Const (\<^const_name>\<open>imp\<close>, _) $ s $ t) = SOME (s, t)
   28.56      | dest_imp _ = NONE
   28.57    val conj = FOLogic.conj
   28.58    val imp  = FOLogic.imp
   28.59 @@ -87,7 +87,7 @@
   28.60  
   28.61  structure Splitter = Splitter
   28.62  (
   28.63 -  val context = @{context}
   28.64 +  val context = \<^context>
   28.65    val mk_eq = mk_eq
   28.66    val meta_eq_to_iff = @{thm meta_eq_to_iff}
   28.67    val iffD = @{thm iffD2}
   28.68 @@ -121,7 +121,7 @@
   28.69  
   28.70  (*No simprules, but basic infastructure for simplification*)
   28.71  val FOL_basic_ss =
   28.72 -  empty_simpset @{context}
   28.73 +  empty_simpset \<^context>
   28.74    setSSolver (mk_solver "FOL safe" safe_solver)
   28.75    setSolver (mk_solver "FOL unsafe" unsafe_solver)
   28.76    |> Simplifier.set_subgoaler asm_simp_tac
    29.1 --- a/src/FOLP/FOLP.thy	Fri Jan 04 21:49:06 2019 +0100
    29.2 +++ b/src/FOLP/FOLP.thy	Fri Jan 04 23:22:53 2019 +0100
    29.3 @@ -56,8 +56,8 @@
    29.4      and r2: "!!y. y:Q ==> g(y):R"
    29.5    shows "?p : R"
    29.6    apply (rule excluded_middle [THEN disjE])
    29.7 -   apply (tactic \<open>DEPTH_SOLVE (assume_tac @{context} 1 ORELSE
    29.8 -       resolve_tac @{context} [@{thm r1}, @{thm r2}, @{thm major} RS @{thm mp}] 1)\<close>)
    29.9 +   apply (tactic \<open>DEPTH_SOLVE (assume_tac \<^context> 1 ORELSE
   29.10 +       resolve_tac \<^context> [@{thm r1}, @{thm r2}, @{thm major} RS @{thm mp}] 1)\<close>)
   29.11    done
   29.12  
   29.13  (*Double negation law*)
   29.14 @@ -80,10 +80,10 @@
   29.15    apply (insert major)
   29.16    apply (unfold iff_def)
   29.17    apply (rule conjE)
   29.18 -  apply (tactic \<open>DEPTH_SOLVE_1 (eresolve_tac @{context} @{thms impCE} 1 ORELSE
   29.19 -      eresolve_tac @{context} [@{thm notE}, @{thm impE}] 1 THEN assume_tac @{context} 1 ORELSE
   29.20 -      assume_tac @{context} 1 ORELSE
   29.21 -      resolve_tac @{context} [@{thm r1}, @{thm r2}] 1)\<close>)+
   29.22 +  apply (tactic \<open>DEPTH_SOLVE_1 (eresolve_tac \<^context> @{thms impCE} 1 ORELSE
   29.23 +      eresolve_tac \<^context> [@{thm notE}, @{thm impE}] 1 THEN assume_tac \<^context> 1 ORELSE
   29.24 +      assume_tac \<^context> 1 ORELSE
   29.25 +      resolve_tac \<^context> [@{thm r1}, @{thm r2}] 1)\<close>)+
   29.26    done
   29.27  
   29.28  
   29.29 @@ -135,7 +135,7 @@
   29.30    "?p2 : ~P | P"
   29.31    "?p3 : ~ ~ P <-> P"
   29.32    "?p4 : (~P --> P) <-> P"
   29.33 -  apply (tactic \<open>ALLGOALS (Cla.fast_tac @{context} FOLP_cs)\<close>)
   29.34 +  apply (tactic \<open>ALLGOALS (Cla.fast_tac \<^context> FOLP_cs)\<close>)
   29.35    done
   29.36  
   29.37  ML_file "simpdata.ML"
    30.1 --- a/src/FOLP/IFOLP.thy	Fri Jan 04 21:49:06 2019 +0100
    30.2 +++ b/src/FOLP/IFOLP.thy	Fri Jan 04 23:22:53 2019 +0100
    30.3 @@ -62,19 +62,19 @@
    30.4  syntax "_Proof" :: "[p,o]=>prop"    ("(_ /: _)" [51, 10] 5)
    30.5  
    30.6  parse_translation \<open>
    30.7 -  let fun proof_tr [p, P] = Const (@{const_syntax Proof}, dummyT) $ P $ p
    30.8 -  in [(@{syntax_const "_Proof"}, K proof_tr)] end
    30.9 +  let fun proof_tr [p, P] = Const (\<^const_syntax>\<open>Proof\<close>, dummyT) $ P $ p
   30.10 +  in [(\<^syntax_const>\<open>_Proof\<close>, K proof_tr)] end
   30.11  \<close>
   30.12  
   30.13  (*show_proofs = true displays the proof terms -- they are ENORMOUS*)
   30.14 -ML \<open>val show_proofs = Attrib.setup_config_bool @{binding show_proofs} (K false)\<close>
   30.15 +ML \<open>val show_proofs = Attrib.setup_config_bool \<^binding>\<open>show_proofs\<close> (K false)\<close>
   30.16  
   30.17  print_translation \<open>
   30.18    let
   30.19      fun proof_tr' ctxt [P, p] =
   30.20 -      if Config.get ctxt show_proofs then Const (@{syntax_const "_Proof"}, dummyT) $ p $ P
   30.21 +      if Config.get ctxt show_proofs then Const (\<^syntax_const>\<open>_Proof\<close>, dummyT) $ p $ P
   30.22        else P
   30.23 -  in [(@{const_syntax Proof}, proof_tr')] end
   30.24 +  in [(\<^const_syntax>\<open>Proof\<close>, proof_tr')] end
   30.25  \<close>
   30.26  
   30.27  
   30.28 @@ -250,7 +250,7 @@
   30.29  
   30.30  ML \<open>
   30.31  local
   30.32 -  fun discard_proof (Const (@{const_name Proof}, _) $ P $ _) = P;
   30.33 +  fun discard_proof (Const (\<^const_name>\<open>Proof\<close>, _) $ P $ _) = P;
   30.34  in
   30.35  fun uniq_assume_tac ctxt =
   30.36    SUBGOAL
   30.37 @@ -504,19 +504,19 @@
   30.38  schematic_goal pred1_cong: "p:a=a' ==> ?p:P(a) <-> P(a')"
   30.39    apply (rule iffI)
   30.40     apply (tactic \<open>
   30.41 -     DEPTH_SOLVE (assume_tac @{context} 1 ORELSE eresolve_tac @{context} [@{thm subst}, @{thm ssubst}] 1)\<close>)
   30.42 +     DEPTH_SOLVE (assume_tac \<^context> 1 ORELSE eresolve_tac \<^context> [@{thm subst}, @{thm ssubst}] 1)\<close>)
   30.43    done
   30.44  
   30.45  schematic_goal pred2_cong: "[| p:a=a';  q:b=b' |] ==> ?p:P(a,b) <-> P(a',b')"
   30.46    apply (rule iffI)
   30.47     apply (tactic \<open>
   30.48 -     DEPTH_SOLVE (assume_tac @{context} 1 ORELSE eresolve_tac @{context} [@{thm subst}, @{thm ssubst}] 1)\<close>)
   30.49 +     DEPTH_SOLVE (assume_tac \<^context> 1 ORELSE eresolve_tac \<^context> [@{thm subst}, @{thm ssubst}] 1)\<close>)
   30.50    done
   30.51  
   30.52  schematic_goal pred3_cong: "[| p:a=a';  q:b=b';  r:c=c' |] ==> ?p:P(a,b,c) <-> P(a',b',c')"
   30.53    apply (rule iffI)
   30.54     apply (tactic \<open>
   30.55 -     DEPTH_SOLVE (assume_tac @{context} 1 ORELSE eresolve_tac @{context} [@{thm subst}, @{thm ssubst}] 1)\<close>)
   30.56 +     DEPTH_SOLVE (assume_tac \<^context> 1 ORELSE eresolve_tac \<^context> [@{thm subst}, @{thm ssubst}] 1)\<close>)
   30.57    done
   30.58  
   30.59  lemmas pred_congs = pred1_cong pred2_cong pred3_cong
   30.60 @@ -543,8 +543,8 @@
   30.61    assumes major: "p:(P|Q)-->S"
   30.62      and minor: "!!x y.[| x:P-->S; y:Q-->S |] ==> q(x,y):R"
   30.63    shows "?p:R"
   30.64 -  apply (tactic \<open>DEPTH_SOLVE (assume_tac @{context} 1 ORELSE
   30.65 -      resolve_tac @{context} [@{thm disjI1}, @{thm disjI2}, @{thm impI},
   30.66 +  apply (tactic \<open>DEPTH_SOLVE (assume_tac \<^context> 1 ORELSE
   30.67 +      resolve_tac \<^context> [@{thm disjI1}, @{thm disjI2}, @{thm impI},
   30.68          @{thm major} RS @{thm mp}, @{thm minor}] 1)\<close>)
   30.69    done
   30.70  
   30.71 @@ -611,8 +611,8 @@
   30.72  structure Hypsubst = Hypsubst
   30.73  (
   30.74    (*Take apart an equality judgement; otherwise raise Match!*)
   30.75 -  fun dest_eq (Const (@{const_name Proof}, _) $
   30.76 -    (Const (@{const_name eq}, _)  $ t $ u) $ _) = (t, u);
   30.77 +  fun dest_eq (Const (\<^const_name>\<open>Proof\<close>, _) $
   30.78 +    (Const (\<^const_name>\<open>eq\<close>, _)  $ t $ u) $ _) = (t, u);
   30.79  
   30.80    val imp_intr = @{thm impI}
   30.81  
   30.82 @@ -641,7 +641,7 @@
   30.83    "?p6 : P & ~P <-> False"
   30.84    "?p7 : ~P & P <-> False"
   30.85    "?p8 : (P & Q) & R <-> P & (Q & R)"
   30.86 -  apply (tactic \<open>fn st => IntPr.fast_tac @{context} 1 st\<close>)+
   30.87 +  apply (tactic \<open>fn st => IntPr.fast_tac \<^context> 1 st\<close>)+
   30.88    done
   30.89  
   30.90  schematic_goal disj_rews:
   30.91 @@ -651,13 +651,13 @@
   30.92    "?p4 : False | P <-> P"
   30.93    "?p5 : P | P <-> P"
   30.94    "?p6 : (P | Q) | R <-> P | (Q | R)"
   30.95 -  apply (tactic \<open>IntPr.fast_tac @{context} 1\<close>)+
   30.96 +  apply (tactic \<open>IntPr.fast_tac \<^context> 1\<close>)+
   30.97    done
   30.98  
   30.99  schematic_goal not_rews:
  30.100    "?p1 : ~ False <-> True"
  30.101    "?p2 : ~ True <-> False"
  30.102 -  apply (tactic \<open>IntPr.fast_tac @{context} 1\<close>)+
  30.103 +  apply (tactic \<open>IntPr.fast_tac \<^context> 1\<close>)+
  30.104    done
  30.105  
  30.106  schematic_goal imp_rews:
  30.107 @@ -667,7 +667,7 @@
  30.108    "?p4 : (True --> P) <-> P"
  30.109    "?p5 : (P --> P) <-> True"
  30.110    "?p6 : (P --> ~P) <-> ~P"
  30.111 -  apply (tactic \<open>IntPr.fast_tac @{context} 1\<close>)+
  30.112 +  apply (tactic \<open>IntPr.fast_tac \<^context> 1\<close>)+
  30.113    done
  30.114  
  30.115  schematic_goal iff_rews:
  30.116 @@ -676,13 +676,13 @@
  30.117    "?p3 : (P <-> P) <-> True"
  30.118    "?p4 : (False <-> P) <-> ~P"
  30.119    "?p5 : (P <-> False) <-> ~P"
  30.120 -  apply (tactic \<open>IntPr.fast_tac @{context} 1\<close>)+
  30.121 +  apply (tactic \<open>IntPr.fast_tac \<^context> 1\<close>)+
  30.122    done
  30.123  
  30.124  schematic_goal quant_rews:
  30.125    "?p1 : (ALL x. P) <-> P"
  30.126    "?p2 : (EX x. P) <-> P"
  30.127 -  apply (tactic \<open>IntPr.fast_tac @{context} 1\<close>)+
  30.128 +  apply (tactic \<open>IntPr.fast_tac \<^context> 1\<close>)+
  30.129    done
  30.130  
  30.131  (*These are NOT supplied by default!*)
  30.132 @@ -691,7 +691,7 @@
  30.133    "?p2 : P & (Q | R) <-> P&Q | P&R"
  30.134    "?p3 : (Q | R) & P <-> Q&P | R&P"
  30.135    "?p4 : (P | Q --> R) <-> (P --> R) & (Q --> R)"
  30.136 -  apply (tactic \<open>IntPr.fast_tac @{context} 1\<close>)+
  30.137 +  apply (tactic \<open>IntPr.fast_tac \<^context> 1\<close>)+
  30.138    done
  30.139  
  30.140  schematic_goal distrib_rews2:
  30.141 @@ -699,17 +699,17 @@
  30.142    "?p2 : ((EX x. NORM(P(x))) --> Q) <-> (ALL x. NORM(P(x)) --> Q)"
  30.143    "?p3 : (EX x. NORM(P(x))) & NORM(Q) <-> (EX x. NORM(P(x)) & NORM(Q))"
  30.144    "?p4 : NORM(Q) & (EX x. NORM(P(x))) <-> (EX x. NORM(Q) & NORM(P(x)))"
  30.145 -  apply (tactic \<open>IntPr.fast_tac @{context} 1\<close>)+
  30.146 +  apply (tactic \<open>IntPr.fast_tac \<^context> 1\<close>)+
  30.147    done
  30.148  
  30.149  lemmas distrib_rews = distrib_rews1 distrib_rews2
  30.150  
  30.151  schematic_goal P_Imp_P_iff_T: "p:P ==> ?p:(P <-> True)"
  30.152 -  apply (tactic \<open>IntPr.fast_tac @{context} 1\<close>)
  30.153 +  apply (tactic \<open>IntPr.fast_tac \<^context> 1\<close>)
  30.154    done
  30.155  
  30.156  schematic_goal not_P_imp_P_iff_F: "p:~P ==> ?p:(P <-> False)"
  30.157 -  apply (tactic \<open>IntPr.fast_tac @{context} 1\<close>)
  30.158 +  apply (tactic \<open>IntPr.fast_tac \<^context> 1\<close>)
  30.159    done
  30.160  
  30.161  end
    31.1 --- a/src/FOLP/ex/Classical.thy	Fri Jan 04 21:49:06 2019 +0100
    31.2 +++ b/src/FOLP/ex/Classical.thy	Fri Jan 04 23:22:53 2019 +0100
    31.3 @@ -10,14 +10,14 @@
    31.4  begin
    31.5  
    31.6  schematic_goal "?p : (P --> Q | R) --> (P-->Q) | (P-->R)"
    31.7 -  by (tactic "fast_tac @{context} FOLP_cs 1")
    31.8 +  by (tactic "fast_tac \<^context> FOLP_cs 1")
    31.9  
   31.10  (*If and only if*)
   31.11  schematic_goal "?p : (P<->Q) <-> (Q<->P)"
   31.12 -  by (tactic "fast_tac @{context} FOLP_cs 1")
   31.13 +  by (tactic "fast_tac \<^context> FOLP_cs 1")
   31.14  
   31.15  schematic_goal "?p : ~ (P <-> ~P)"
   31.16 -  by (tactic "fast_tac @{context} FOLP_cs 1")
   31.17 +  by (tactic "fast_tac \<^context> FOLP_cs 1")
   31.18  
   31.19  
   31.20  (*Sample problems from 
   31.21 @@ -33,134 +33,134 @@
   31.22  text "Pelletier's examples"
   31.23  (*1*)
   31.24  schematic_goal "?p : (P-->Q)  <->  (~Q --> ~P)"
   31.25 -  by (tactic "fast_tac @{context} FOLP_cs 1")
   31.26 +  by (tactic "fast_tac \<^context> FOLP_cs 1")
   31.27  
   31.28  (*2*)
   31.29  schematic_goal "?p : ~ ~ P  <->  P"
   31.30 -  by (tactic "fast_tac @{context} FOLP_cs 1")
   31.31 +  by (tactic "fast_tac \<^context> FOLP_cs 1")
   31.32  
   31.33  (*3*)
   31.34  schematic_goal "?p : ~(P-->Q) --> (Q-->P)"
   31.35 -  by (tactic "fast_tac @{context} FOLP_cs 1")
   31.36 +  by (tactic "fast_tac \<^context> FOLP_cs 1")
   31.37  
   31.38  (*4*)
   31.39  schematic_goal "?p : (~P-->Q)  <->  (~Q --> P)"
   31.40 -  by (tactic "fast_tac @{context} FOLP_cs 1")
   31.41 +  by (tactic "fast_tac \<^context> FOLP_cs 1")
   31.42  
   31.43  (*5*)
   31.44  schematic_goal "?p : ((P|Q)-->(P|R)) --> (P|(Q-->R))"
   31.45 -  by (tactic "fast_tac @{context} FOLP_cs 1")
   31.46 +  by (tactic "fast_tac \<^context> FOLP_cs 1")
   31.47  
   31.48  (*6*)
   31.49  schematic_goal "?p : P | ~ P"
   31.50 -  by (tactic "fast_tac @{context} FOLP_cs 1")
   31.51 +  by (tactic "fast_tac \<^context> FOLP_cs 1")
   31.52  
   31.53  (*7*)
   31.54  schematic_goal "?p : P | ~ ~ ~ P"
   31.55 -  by (tactic "fast_tac @{context} FOLP_cs 1")
   31.56 +  by (tactic "fast_tac \<^context> FOLP_cs 1")
   31.57  
   31.58  (*8.  Peirce's law*)
   31.59  schematic_goal "?p : ((P-->Q) --> P)  -->  P"
   31.60 -  by (tactic "fast_tac @{context} FOLP_cs 1")
   31.61 +  by (tactic "fast_tac \<^context> FOLP_cs 1")
   31.62  
   31.63  (*9*)
   31.64  schematic_goal "?p : ((P|Q) & (~P|Q) & (P| ~Q)) --> ~ (~P | ~Q)"
   31.65 -  by (tactic "fast_tac @{context} FOLP_cs 1")
   31.66 +  by (tactic "fast_tac \<^context> FOLP_cs 1")
   31.67  
   31.68  (*10*)
   31.69  schematic_goal "?p : (Q-->R) & (R-->P&Q) & (P-->Q|R) --> (P<->Q)"
   31.70 -  by (tactic "fast_tac @{context} FOLP_cs 1")
   31.71 +  by (tactic "fast_tac \<^context> FOLP_cs 1")
   31.72  
   31.73  (*11.  Proved in each direction (incorrectly, says Pelletier!!)  *)
   31.74  schematic_goal "?p : P<->P"
   31.75 -  by (tactic "fast_tac @{context} FOLP_cs 1")
   31.76 +  by (tactic "fast_tac \<^context> FOLP_cs 1")
   31.77  
   31.78  (*12.  "Dijkstra's law"*)
   31.79  schematic_goal "?p : ((P <-> Q) <-> R)  <->  (P <-> (Q <-> R))"
   31.80 -  by (tactic "fast_tac @{context} FOLP_cs 1")
   31.81 +  by (tactic "fast_tac \<^context> FOLP_cs 1")
   31.82  
   31.83  (*13.  Distributive law*)
   31.84  schematic_goal "?p : P | (Q & R)  <-> (P | Q) & (P | R)"
   31.85 -  by (tactic "fast_tac @{context} FOLP_cs 1")
   31.86 +  by (tactic "fast_tac \<^context> FOLP_cs 1")
   31.87  
   31.88  (*14*)
   31.89  schematic_goal "?p : (P <-> Q) <-> ((Q | ~P) & (~Q|P))"
   31.90 -  by (tactic "fast_tac @{context} FOLP_cs 1")
   31.91 +  by (tactic "fast_tac \<^context> FOLP_cs 1")
   31.92  
   31.93  (*15*)
   31.94  schematic_goal "?p : (P --> Q) <-> (~P | Q)"
   31.95 -  by (tactic "fast_tac @{context} FOLP_cs 1")
   31.96 +  by (tactic "fast_tac \<^context> FOLP_cs 1")
   31.97  
   31.98  (*16*)
   31.99  schematic_goal "?p : (P-->Q) | (Q-->P)"
  31.100 -  by (tactic "fast_tac @{context} FOLP_cs 1")
  31.101 +  by (tactic "fast_tac \<^context> FOLP_cs 1")
  31.102  
  31.103  (*17*)
  31.104  schematic_goal "?p : ((P & (Q-->R))-->S) <-> ((~P | Q | S) & (~P | ~R | S))"
  31.105 -  by (tactic "fast_tac @{context} FOLP_cs 1")
  31.106 +  by (tactic "fast_tac \<^context> FOLP_cs 1")
  31.107  
  31.108  
  31.109  text "Classical Logic: examples with quantifiers"
  31.110  
  31.111  schematic_goal "?p : (ALL x. P(x) & Q(x)) <-> (ALL x. P(x))  &  (ALL x. Q(x))"
  31.112 -  by (tactic "fast_tac @{context} FOLP_cs 1")
  31.113 +  by (tactic "fast_tac \<^context> FOLP_cs 1")
  31.114  
  31.115  schematic_goal "?p : (EX x. P-->Q(x))  <->  (P --> (EX x. Q(x)))"
  31.116 -  by (tactic "fast_tac @{context} FOLP_cs 1")
  31.117 +  by (tactic "fast_tac \<^context> FOLP_cs 1")
  31.118  
  31.119  schematic_goal "?p : (EX x. P(x)-->Q)  <->  (ALL x. P(x)) --> Q"
  31.120 -  by (tactic "fast_tac @{context} FOLP_cs 1")
  31.121 +  by (tactic "fast_tac \<^context> FOLP_cs 1")
  31.122  
  31.123  schematic_goal "?p : (ALL x. P(x)) | Q  <->  (ALL x. P(x) | Q)"
  31.124 -  by (tactic "fast_tac @{context} FOLP_cs 1")
  31.125 +  by (tactic "fast_tac \<^context> FOLP_cs 1")
  31.126  
  31.127  
  31.128  text "Problems requiring quantifier duplication"
  31.129  
  31.130  (*Needs multiple instantiation of ALL.*)
  31.131  schematic_goal "?p : (ALL x. P(x)-->P(f(x)))  &  P(d)-->P(f(f(f(d))))"
  31.132 -  by (tactic "best_tac @{context} FOLP_dup_cs 1")
  31.133 +  by (tactic "best_tac \<^context> FOLP_dup_cs 1")
  31.134  
  31.135  (*Needs double instantiation of the quantifier*)
  31.136  schematic_goal "?p : EX x. P(x) --> P(a) & P(b)"
  31.137 -  by (tactic "best_tac @{context} FOLP_dup_cs 1")
  31.138 +  by (tactic "best_tac \<^context> FOLP_dup_cs 1")
  31.139  
  31.140  schematic_goal "?p : EX z. P(z) --> (ALL x. P(x))"
  31.141 -  by (tactic "best_tac @{context} FOLP_dup_cs 1")
  31.142 +  by (tactic "best_tac \<^context> FOLP_dup_cs 1")
  31.143  
  31.144  
  31.145  text "Hard examples with quantifiers"
  31.146  
  31.147  text "Problem 18"
  31.148  schematic_goal "?p : EX y. ALL x. P(y)-->P(x)"
  31.149 -  by (tactic "best_tac @{context} FOLP_dup_cs 1")
  31.150 +  by (tactic "best_tac \<^context> FOLP_dup_cs 1")
  31.151  
  31.152  text "Problem 19"
  31.153  schematic_goal "?p : EX x. ALL y z. (P(y)-->Q(z)) --> (P(x)-->Q(x))"
  31.154 -  by (tactic "best_tac @{context} FOLP_dup_cs 1")
  31.155 +  by (tactic "best_tac \<^context> FOLP_dup_cs 1")
  31.156  
  31.157  text "Problem 20"
  31.158  schematic_goal "?p : (ALL x y. EX z. ALL w. (P(x)&Q(y)-->R(z)&S(w)))      
  31.159      --> (EX x y. P(x) & Q(y)) --> (EX z. R(z))"
  31.160 -  by (tactic "fast_tac @{context} FOLP_cs 1")
  31.161 +  by (tactic "fast_tac \<^context> FOLP_cs 1")
  31.162  
  31.163  text "Problem 21"
  31.164  schematic_goal "?p : (EX x. P-->Q(x)) & (EX x. Q(x)-->P) --> (EX x. P<->Q(x))"
  31.165 -  by (tactic "best_tac @{context} FOLP_dup_cs 1")
  31.166 +  by (tactic "best_tac \<^context> FOLP_dup_cs 1")
  31.167  
  31.168  text "Problem 22"
  31.169  schematic_goal "?p : (ALL x. P <-> Q(x))  -->  (P <-> (ALL x. Q(x)))"
  31.170 -  by (tactic "fast_tac @{context} FOLP_cs 1")
  31.171 +  by (tactic "fast_tac \<^context> FOLP_cs 1")
  31.172  
  31.173  text "Problem 23"
  31.174  schematic_goal "?p : (ALL x. P | Q(x))  <->  (P | (ALL x. Q(x)))"
  31.175 -  by (tactic "best_tac @{context} FOLP_dup_cs 1")
  31.176 +  by (tactic "best_tac \<^context> FOLP_dup_cs 1")
  31.177  
  31.178  text "Problem 24"
  31.179  schematic_goal "?p : ~(EX x. S(x)&Q(x)) & (ALL x. P(x) --> Q(x)|R(x)) &   
  31.180       (~(EX x. P(x)) --> (EX x. Q(x))) & (ALL x. Q(x)|R(x) --> S(x))   
  31.181      --> (EX x. P(x)&R(x))"
  31.182 -  by (tactic "fast_tac @{context} FOLP_cs 1")
  31.183 +  by (tactic "fast_tac \<^context> FOLP_cs 1")
  31.184  
  31.185  text "Problem 25"
  31.186  schematic_goal "?p : (EX x. P(x)) &  
  31.187 @@ -174,7 +174,7 @@
  31.188  schematic_goal "?u : ((EX x. p(x)) <-> (EX x. q(x))) &   
  31.189       (ALL x. ALL y. p(x) & q(y) --> (r(x) <-> s(y)))   
  31.190    --> ((ALL x. p(x)-->r(x)) <-> (ALL x. q(x)-->s(x)))"
  31.191 -  by (tactic "fast_tac @{context} FOLP_cs 1")
  31.192 +  by (tactic "fast_tac \<^context> FOLP_cs 1")
  31.193  
  31.194  text "Problem 27"
  31.195  schematic_goal "?p : (EX x. P(x) & ~Q(x)) &    
  31.196 @@ -182,49 +182,49 @@
  31.197                (ALL x. M(x) & L(x) --> P(x)) &    
  31.198                ((EX x. R(x) & ~ Q(x)) --> (ALL x. L(x) --> ~ R(x)))   
  31.199            --> (ALL x. M(x) --> ~L(x))"
  31.200 -  by (tactic "fast_tac @{context} FOLP_cs 1")
  31.201 +  by (tactic "fast_tac \<^context> FOLP_cs 1")
  31.202  
  31.203  text "Problem 28.  AMENDED"
  31.204  schematic_goal "?p : (ALL x. P(x) --> (ALL x. Q(x))) &    
  31.205          ((ALL x. Q(x)|R(x)) --> (EX x. Q(x)&S(x))) &   
  31.206          ((EX x. S(x)) --> (ALL x. L(x) --> M(x)))   
  31.207      --> (ALL x. P(x) & L(x) --> M(x))"
  31.208 -  by (tactic "fast_tac @{context} FOLP_cs 1")
  31.209 +  by (tactic "fast_tac \<^context> FOLP_cs 1")
  31.210  
  31.211  text "Problem 29.  Essentially the same as Principia Mathematica *11.71"
  31.212  schematic_goal "?p : (EX x. P(x)) & (EX y. Q(y))   
  31.213      --> ((ALL x. P(x)-->R(x)) & (ALL y. Q(y)-->S(y))   <->      
  31.214           (ALL x y. P(x) & Q(y) --> R(x) & S(y)))"
  31.215 -  by (tactic "fast_tac @{context} FOLP_cs 1")
  31.216 +  by (tactic "fast_tac \<^context> FOLP_cs 1")
  31.217  
  31.218  text "Problem 30"
  31.219  schematic_goal "?p : (ALL x. P(x) | Q(x) --> ~ R(x)) &  
  31.220          (ALL x. (Q(x) --> ~ S(x)) --> P(x) & R(x))   
  31.221      --> (ALL x. S(x))"
  31.222 -  by (tactic "fast_tac @{context} FOLP_cs 1")
  31.223 +  by (tactic "fast_tac \<^context> FOLP_cs 1")
  31.224  
  31.225  text "Problem 31"
  31.226  schematic_goal "?p : ~(EX x. P(x) & (Q(x) | R(x))) &  
  31.227          (EX x. L(x) & P(x)) &  
  31.228          (ALL x. ~ R(x) --> M(x))   
  31.229      --> (EX x. L(x) & M(x))"
  31.230 -  by (tactic "fast_tac @{context} FOLP_cs 1")
  31.231 +  by (tactic "fast_tac \<^context> FOLP_cs 1")
  31.232  
  31.233  text "Problem 32"
  31.234  schematic_goal "?p : (ALL x. P(x) & (Q(x)|R(x))-->S(x)) &  
  31.235          (ALL x. S(x) & R(x) --> L(x)) &  
  31.236          (ALL x. M(x) --> R(x))   
  31.237      --> (ALL x. P(x) & M(x) --> L(x))"
  31.238 -  by (tactic "best_tac @{context} FOLP_dup_cs 1")
  31.239 +  by (tactic "best_tac \<^context> FOLP_dup_cs 1")
  31.240  
  31.241  text "Problem 33"
  31.242  schematic_goal "?p : (ALL x. P(a) & (P(x)-->P(b))-->P(c))  <->     
  31.243       (ALL x. (~P(a) | P(x) | P(c)) & (~P(a) | ~P(b) | P(c)))"
  31.244 -  by (tactic "best_tac @{context} FOLP_dup_cs 1")
  31.245 +  by (tactic "best_tac \<^context> FOLP_dup_cs 1")
  31.246  
  31.247  text "Problem 35"
  31.248  schematic_goal "?p : EX x y. P(x,y) -->  (ALL u v. P(u,v))"
  31.249 -  by (tactic "best_tac @{context} FOLP_dup_cs 1")
  31.250 +  by (tactic "best_tac \<^context> FOLP_dup_cs 1")
  31.251  
  31.252  text "Problem 36"
  31.253  schematic_goal
  31.254 @@ -232,7 +232,7 @@
  31.255        (ALL x. EX y. G(x,y)) &  
  31.256        (ALL x y. J(x,y) | G(x,y) --> (ALL z. J(y,z) | G(y,z) --> H(x,z)))    
  31.257    --> (ALL x. EX y. H(x,y))"
  31.258 -  by (tactic "fast_tac @{context} FOLP_cs 1")
  31.259 +  by (tactic "fast_tac \<^context> FOLP_cs 1")
  31.260  
  31.261  text "Problem 37"
  31.262  schematic_goal "?p : (ALL z. EX w. ALL x. EX y.  
  31.263 @@ -240,62 +240,62 @@
  31.264          (ALL x z. ~P(x,z) --> (EX y. Q(y,z))) &  
  31.265          ((EX x y. Q(x,y)) --> (ALL x. R(x,x)))   
  31.266      --> (ALL x. EX y. R(x,y))"
  31.267 -  by (tactic "fast_tac @{context} FOLP_cs 1")
  31.268 +  by (tactic "fast_tac \<^context> FOLP_cs 1")
  31.269  
  31.270  text "Problem 39"
  31.271  schematic_goal "?p : ~ (EX x. ALL y. F(y,x) <-> ~F(y,y))"
  31.272 -  by (tactic "fast_tac @{context} FOLP_cs 1")
  31.273 +  by (tactic "fast_tac \<^context> FOLP_cs 1")
  31.274  
  31.275  text "Problem 40.  AMENDED"
  31.276  schematic_goal "?p : (EX y. ALL x. F(x,y) <-> F(x,x)) -->   
  31.277                ~(ALL x. EX y. ALL z. F(z,y) <-> ~ F(z,x))"
  31.278 -  by (tactic "fast_tac @{context} FOLP_cs 1")
  31.279 +  by (tactic "fast_tac \<^context> FOLP_cs 1")
  31.280  
  31.281  text "Problem 41"
  31.282  schematic_goal "?p : (ALL z. EX y. ALL x. f(x,y) <-> f(x,z) & ~ f(x,x))   
  31.283            --> ~ (EX z. ALL x. f(x,z))"
  31.284 -  by (tactic "best_tac @{context} FOLP_dup_cs 1")
  31.285 +  by (tactic "best_tac \<^context> FOLP_dup_cs 1")
  31.286  
  31.287  text "Problem 44"
  31.288  schematic_goal "?p : (ALL x. f(x) -->                                     
  31.289                (EX y. g(y) & h(x,y) & (EX y. g(y) & ~ h(x,y))))  &        
  31.290                (EX x. j(x) & (ALL y. g(y) --> h(x,y)))                    
  31.291                --> (EX x. j(x) & ~f(x))"
  31.292 -  by (tactic "fast_tac @{context} FOLP_cs 1")
  31.293 +  by (tactic "fast_tac \<^context> FOLP_cs 1")
  31.294  
  31.295  text "Problems (mainly) involving equality or functions"
  31.296  
  31.297  text "Problem 48"
  31.298  schematic_goal "?p : (a=b | c=d) & (a=c | b=d) --> a=d | b=c"
  31.299 -  by (tactic "fast_tac @{context} FOLP_cs 1")
  31.300 +  by (tactic "fast_tac \<^context> FOLP_cs 1")
  31.301  
  31.302  text "Problem 50"
  31.303  (*What has this to do with equality?*)
  31.304  schematic_goal "?p : (ALL x. P(a,x) | (ALL y. P(x,y))) --> (EX x. ALL y. P(x,y))"
  31.305 -  by (tactic "best_tac @{context} FOLP_dup_cs 1")
  31.306 +  by (tactic "best_tac \<^context> FOLP_dup_cs 1")
  31.307  
  31.308  text "Problem 56"
  31.309  schematic_goal
  31.310   "?p : (ALL x. (EX y. P(y) & x=f(y)) --> P(x)) <-> (ALL x. P(x) --> P(f(x)))"
  31.311 -  by (tactic "fast_tac @{context} FOLP_cs 1")
  31.312 +  by (tactic "fast_tac \<^context> FOLP_cs 1")
  31.313  
  31.314  text "Problem 57"
  31.315  schematic_goal
  31.316  "?p : P(f(a,b), f(b,c)) & P(f(b,c), f(a,c)) &  
  31.317        (ALL x y z. P(x,y) & P(y,z) --> P(x,z))    -->   P(f(a,b), f(a,c))"
  31.318 -  by (tactic "fast_tac @{context} FOLP_cs 1")
  31.319 +  by (tactic "fast_tac \<^context> FOLP_cs 1")
  31.320  
  31.321  text "Problem 58  NOT PROVED AUTOMATICALLY"
  31.322  schematic_goal "?p : (ALL x y. f(x)=g(y)) --> (ALL x y. f(f(x))=f(g(y)))"
  31.323    supply f_cong = subst_context [where t = f]
  31.324 -  by (tactic \<open>fast_tac @{context} (FOLP_cs addSIs [@{thm f_cong}]) 1\<close>)
  31.325 +  by (tactic \<open>fast_tac \<^context> (FOLP_cs addSIs [@{thm f_cong}]) 1\<close>)
  31.326  
  31.327  text "Problem 59"
  31.328  schematic_goal "?p : (ALL x. P(x) <-> ~P(f(x))) --> (EX x. P(x) & ~P(f(x)))"
  31.329 -  by (tactic "best_tac @{context} FOLP_dup_cs 1")
  31.330 +  by (tactic "best_tac \<^context> FOLP_dup_cs 1")
  31.331  
  31.332  text "Problem 60"
  31.333  schematic_goal "?p : ALL x. P(x,f(x)) <-> (EX y. (ALL z. P(z,y) --> P(z,f(x))) & P(x,y))"
  31.334 -  by (tactic "fast_tac @{context} FOLP_cs 1")
  31.335 +  by (tactic "fast_tac \<^context> FOLP_cs 1")
  31.336  
  31.337  end
    32.1 --- a/src/FOLP/ex/If.thy	Fri Jan 04 21:49:06 2019 +0100
    32.2 +++ b/src/FOLP/ex/If.thy	Fri Jan 04 23:22:53 2019 +0100
    32.3 @@ -9,7 +9,7 @@
    32.4    assumes "!!x. x : P ==> f(x) : Q"  "!!x. x : ~P ==> g(x) : R"
    32.5    shows "?p : if(P,Q,R)"
    32.6  apply (unfold if_def)
    32.7 -apply (tactic \<open>fast_tac @{context} (FOLP_cs addIs @{thms assms}) 1\<close>)
    32.8 +apply (tactic \<open>fast_tac \<^context> (FOLP_cs addIs @{thms assms}) 1\<close>)
    32.9  done
   32.10  
   32.11  schematic_goal ifE:
   32.12 @@ -19,7 +19,7 @@
   32.13    shows "?p : S"
   32.14  apply (insert 1)
   32.15  apply (unfold if_def)
   32.16 -apply (tactic \<open>fast_tac @{context} (FOLP_cs addIs [@{thm 2}, @{thm 3}]) 1\<close>)
   32.17 +apply (tactic \<open>fast_tac \<^context> (FOLP_cs addIs [@{thm 2}, @{thm 3}]) 1\<close>)
   32.18  done
   32.19  
   32.20  schematic_goal if_commute: "?p : if(P, if(Q,A,B), if(Q,C,D)) <-> if(Q, if(P,A,C), if(P,B,D))"
   32.21 @@ -33,11 +33,11 @@
   32.22  ML \<open>val if_cs = FOLP_cs addSIs [@{thm ifI}] addSEs [@{thm ifE}]\<close>
   32.23  
   32.24  schematic_goal if_commute: "?p : if(P, if(Q,A,B), if(Q,C,D)) <-> if(Q, if(P,A,C), if(P,B,D))"
   32.25 -apply (tactic \<open>fast_tac @{context} if_cs 1\<close>)
   32.26 +apply (tactic \<open>fast_tac \<^context> if_cs 1\<close>)
   32.27  done
   32.28  
   32.29  schematic_goal nested_ifs: "?p : if(if(P,Q,R), A, B) <-> if(P, if(Q,A,B), if(R,A,B))"
   32.30 -apply (tactic \<open>fast_tac @{context} if_cs 1\<close>)
   32.31 +apply (tactic \<open>fast_tac \<^context> if_cs 1\<close>)
   32.32  done
   32.33  
   32.34  end
    33.1 --- a/src/FOLP/ex/Intro.thy	Fri Jan 04 21:49:06 2019 +0100
    33.2 +++ b/src/FOLP/ex/Intro.thy	Fri Jan 04 23:22:53 2019 +0100
    33.3 @@ -45,13 +45,13 @@
    33.4  
    33.5  schematic_goal "?p : (EX y. ALL x. J(y,x) <-> ~J(x,x))
    33.6          -->  ~ (ALL x. EX y. ALL z. J(z,y) <-> ~ J(z,x))"
    33.7 -apply (tactic \<open>fast_tac @{context} FOLP_cs 1\<close>)
    33.8 +apply (tactic \<open>fast_tac \<^context> FOLP_cs 1\<close>)
    33.9  done
   33.10  
   33.11  
   33.12  schematic_goal "?p : ALL x. P(x,f(x)) <->
   33.13          (EX y. (ALL z. P(z,y) --> P(z,f(x))) & P(x,y))"
   33.14 -apply (tactic \<open>fast_tac @{context} FOLP_cs 1\<close>)
   33.15 +apply (tactic \<open>fast_tac \<^context> FOLP_cs 1\<close>)
   33.16  done
   33.17  
   33.18  
    34.1 --- a/src/FOLP/ex/Intuitionistic.thy	Fri Jan 04 21:49:06 2019 +0100
    34.2 +++ b/src/FOLP/ex/Intuitionistic.thy	Fri Jan 04 23:22:53 2019 +0100
    34.3 @@ -31,39 +31,39 @@
    34.4  begin
    34.5  
    34.6  schematic_goal "?p : ~~(P&Q) <-> ~~P & ~~Q"
    34.7 -  by (tactic \<open>IntPr.fast_tac @{context} 1\<close>)
    34.8 +  by (tactic \<open>IntPr.fast_tac \<^context> 1\<close>)
    34.9  
   34.10  schematic_goal "?p : ~~~P <-> ~P"
   34.11 -  by (tactic \<open>IntPr.fast_tac @{context} 1\<close>)
   34.12 +  by (tactic \<open>IntPr.fast_tac \<^context> 1\<close>)
   34.13  
   34.14  schematic_goal "?p : ~~((P --> Q | R)  -->  (P-->Q) | (P-->R))"
   34.15 -  by (tactic \<open>IntPr.fast_tac @{context} 1\<close>)
   34.16 +  by (tactic \<open>IntPr.fast_tac \<^context> 1\<close>)
   34.17  
   34.18  schematic_goal "?p : (P<->Q) <-> (Q<->P)"
   34.19 -  by (tactic \<open>IntPr.fast_tac @{context} 1\<close>)
   34.20 +  by (tactic \<open>IntPr.fast_tac \<^context> 1\<close>)
   34.21  
   34.22  
   34.23  subsection \<open>Lemmas for the propositional double-negation translation\<close>
   34.24  
   34.25  schematic_goal "?p : P --> ~~P"
   34.26 -  by (tactic \<open>IntPr.fast_tac @{context} 1\<close>)
   34.27 +  by (tactic \<open>IntPr.fast_tac \<^context> 1\<close>)
   34.28  
   34.29  schematic_goal "?p : ~~(~~P --> P)"
   34.30 -  by (tactic \<open>IntPr.fast_tac @{context} 1\<close>)
   34.31 +  by (tactic \<open>IntPr.fast_tac \<^context> 1\<close>)
   34.32  
   34.33  schematic_goal "?p : ~~P & ~~(P --> Q) --> ~~Q"
   34.34 -  by (tactic \<open>IntPr.fast_tac @{context} 1\<close>)
   34.35 +  by (tactic \<open>IntPr.fast_tac \<^context> 1\<close>)
   34.36  
   34.37  
   34.38  subsection \<open>The following are classically but not constructively valid\<close>
   34.39  
   34.40  (*The attempt to prove them terminates quickly!*)
   34.41  schematic_goal "?p : ((P-->Q) --> P)  -->  P"
   34.42 -  apply (tactic \<open>IntPr.fast_tac @{context} 1\<close>)?
   34.43 +  apply (tactic \<open>IntPr.fast_tac \<^context> 1\<close>)?
   34.44    oops
   34.45  
   34.46  schematic_goal "?p : (P&Q-->R)  -->  (P-->R) | (Q-->R)"
   34.47 -  apply (tactic \<open>IntPr.fast_tac @{context} 1\<close>)?
   34.48 +  apply (tactic \<open>IntPr.fast_tac \<^context> 1\<close>)?
   34.49    oops
   34.50  
   34.51  
   34.52 @@ -71,74 +71,74 @@
   34.53  
   34.54  text "Problem ~~1"
   34.55  schematic_goal "?p : ~~((P-->Q)  <->  (~Q --> ~P))"
   34.56 -  by (tactic \<open>IntPr.fast_tac @{context} 1\<close>)
   34.57 +  by (tactic \<open>IntPr.fast_tac \<^context> 1\<close>)
   34.58  
   34.59  text "Problem ~~2"
   34.60  schematic_goal "?p : ~~(~~P  <->  P)"
   34.61 -  by (tactic \<open>IntPr.fast_tac @{context} 1\<close>)
   34.62 +  by (tactic \<open>IntPr.fast_tac \<^context> 1\<close>)
   34.63  
   34.64  text "Problem 3"
   34.65  schematic_goal "?p : ~(P-->Q) --> (Q-->P)"
   34.66 -  by (tactic \<open>IntPr.fast_tac @{context} 1\<close>)
   34.67 +  by (tactic \<open>IntPr.fast_tac \<^context> 1\<close>)
   34.68  
   34.69  text "Problem ~~4"
   34.70  schematic_goal "?p : ~~((~P-->Q)  <->  (~Q --> P))"
   34.71 -  by (tactic \<open>IntPr.fast_tac @{context} 1\<close>)
   34.72 +  by (tactic \<open>IntPr.fast_tac \<^context> 1\<close>)
   34.73  
   34.74  text "Problem ~~5"
   34.75  schematic_goal "?p : ~~((P|Q-->P|R) --> P|(Q-->R))"
   34.76 -  by (tactic \<open>IntPr.fast_tac @{context} 1\<close>)
   34.77 +  by (tactic \<open>IntPr.fast_tac \<^context> 1\<close>)
   34.78  
   34.79  text "Problem ~~6"
   34.80  schematic_goal "?p : ~~(P | ~P)"
   34.81 -  by (tactic \<open>IntPr.fast_tac @{context} 1\<close>)
   34.82 +  by (tactic \<open>IntPr.fast_tac \<^context> 1\<close>)
   34.83  
   34.84  text "Problem ~~7"
   34.85  schematic_goal "?p : ~~(P | ~~~P)"
   34.86 -  by (tactic \<open>IntPr.fast_tac @{context} 1\<close>)
   34.87 +  by (tactic \<open>IntPr.fast_tac \<^context> 1\<close>)
   34.88  
   34.89  text "Problem ~~8.  Peirce's law"
   34.90  schematic_goal "?p : ~~(((P-->Q) --> P)  -->  P)"
   34.91 -  by (tactic \<open>IntPr.fast_tac @{context} 1\<close>)
   34.92 +  by (tactic \<open>IntPr.fast_tac \<^context> 1\<close>)
   34.93  
   34.94  text "Problem 9"
   34.95  schematic_goal "?p : ((P|Q) & (~P|Q) & (P| ~Q)) --> ~ (~P | ~Q)"
   34.96 -  by (tactic \<open>IntPr.fast_tac @{context} 1\<close>)
   34.97 +  by (tactic \<open>IntPr.fast_tac \<^context> 1\<close>)
   34.98  
   34.99  text "Problem 10"
  34.100  schematic_goal "?p : (Q-->R) --> (R-->P&Q) --> (P-->(Q|R)) --> (P<->Q)"
  34.101 -  by (tactic \<open>IntPr.fast_tac @{context} 1\<close>)
  34.102 +  by (tactic \<open>IntPr.fast_tac \<^context> 1\<close>)
  34.103  
  34.104  text "11.  Proved in each direction (incorrectly, says Pelletier!!) "
  34.105  schematic_goal "?p : P<->P"
  34.106 -  by (tactic \<open>IntPr.fast_tac @{context} 1\<close>)
  34.107 +  by (tactic \<open>IntPr.fast_tac \<^context> 1\<close>)
  34.108  
  34.109  text "Problem ~~12.  Dijkstra's law  "
  34.110  schematic_goal "?p : ~~(((P <-> Q) <-> R)  <->  (P <-> (Q <-> R)))"
  34.111 -  by (tactic \<open>IntPr.fast_tac @{context} 1\<close>)
  34.112 +  by (tactic \<open>IntPr.fast_tac \<^context> 1\<close>)
  34.113  
  34.114  schematic_goal "?p : ((P <-> Q) <-> R)  -->  ~~(P <-> (Q <-> R))"
  34.115 -  by (tactic \<open>IntPr.fast_tac @{context} 1\<close>)
  34.116 +  by (tactic \<open>IntPr.fast_tac \<^context> 1\<close>)
  34.117  
  34.118  text "Problem 13.  Distributive law"
  34.119  schematic_goal "?p : P | (Q & R)  <-> (P | Q) & (P | R)"
  34.120 -  by (tactic \<open>IntPr.fast_tac @{context} 1\<close>)
  34.121 +  by (tactic \<open>IntPr.fast_tac \<^context> 1\<close>)
  34.122  
  34.123  text "Problem ~~14"
  34.124  schematic_goal "?p : ~~((P <-> Q) <-> ((Q | ~P) & (~Q|P)))"
  34.125 -  by (tactic \<open>IntPr.fast_tac @{context} 1\<close>)
  34.126 +  by (tactic \<open>IntPr.fast_tac \<^context> 1\<close>)
  34.127  
  34.128  text "Problem ~~15"
  34.129  schematic_goal "?p : ~~((P --> Q) <-> (~P | Q))"
  34.130 -  by (tactic \<open>IntPr.fast_tac @{context} 1\<close>)
  34.131 +  by (tactic \<open>IntPr.fast_tac \<^context> 1\<close>)
  34.132  
  34.133  text "Problem ~~16"
  34.134  schematic_goal "?p : ~~((P-->Q) | (Q-->P))"
  34.135 -  by (tactic \<open>IntPr.fast_tac @{context} 1\<close>)
  34.136 +  by (tactic \<open>IntPr.fast_tac \<^context> 1\<close>)
  34.137  
  34.138  text "Problem ~~17"
  34.139  schematic_goal "?p : ~~(((P & (Q-->R))-->S) <-> ((~P | Q | S) & (~P | ~R | S)))"
  34.140 -  by (tactic \<open>IntPr.fast_tac @{context} 1\<close>)  \<comment> \<open>slow\<close>
  34.141 +  by (tactic \<open>IntPr.fast_tac \<^context> 1\<close>)  \<comment> \<open>slow\<close>
  34.142  
  34.143  
  34.144  subsection \<open>Examples with quantifiers\<close>
  34.145 @@ -146,43 +146,43 @@
  34.146  text "The converse is classical in the following implications..."
  34.147  
  34.148  schematic_goal "?p : (EX x. P(x)-->Q)  -->  (ALL x. P(x)) --> Q"
  34.149 -  by (tactic \<open>IntPr.fast_tac @{context} 1\<close>)
  34.150 +  by (tactic \<open>IntPr.fast_tac \<^context> 1\<close>)
  34.151  
  34.152  schematic_goal "?p : ((ALL x. P(x))-->Q) --> ~ (ALL x. P(x) & ~Q)"
  34.153 -  by (tactic \<open>IntPr.fast_tac @{context} 1\<close>)
  34.154 +  by (tactic \<open>IntPr.fast_tac \<^context> 1\<close>)
  34.155  
  34.156  schematic_goal "?p : ((ALL x. ~P(x))-->Q)  -->  ~ (ALL x. ~ (P(x)|Q))"
  34.157 -  by (tactic \<open>IntPr.fast_tac @{context} 1\<close>)
  34.158 +  by (tactic \<open>IntPr.fast_tac \<^context> 1\<close>)
  34.159  
  34.160  schematic_goal "?p : (ALL x. P(x)) | Q  -->  (ALL x. P(x) | Q)"
  34.161 -  by (tactic \<open>IntPr.fast_tac @{context} 1\<close>)
  34.162 +  by (tactic \<open>IntPr.fast_tac \<^context> 1\<close>)
  34.163  
  34.164  schematic_goal "?p : (EX x. P --> Q(x)) --> (P --> (EX x. Q(x)))"
  34.165 -  by (tactic \<open>IntPr.fast_tac @{context} 1\<close>)
  34.166 +  by (tactic \<open>IntPr.fast_tac \<^context> 1\<close>)
  34.167  
  34.168  
  34.169  text "The following are not constructively valid!"
  34.170  text "The attempt to prove them terminates quickly!"
  34.171  
  34.172  schematic_goal "?p : ((ALL x. P(x))-->Q) --> (EX x. P(x)-->Q)"
  34.173 -  apply (tactic \<open>IntPr.fast_tac @{context} 1\<close>)?
  34.174 +  apply (tactic \<open>IntPr.fast_tac \<^context> 1\<close>)?
  34.175    oops
  34.176  
  34.177  schematic_goal "?p : (P --> (EX x. Q(x))) --> (EX x. P-->Q(x))"
  34.178 -  apply (tactic \<open>IntPr.fast_tac @{context} 1\<close>)?
  34.179 +  apply (tactic \<open>IntPr.fast_tac \<^context> 1\<close>)?
  34.180    oops
  34.181  
  34.182  schematic_goal "?p : (ALL x. P(x) | Q) --> ((ALL x. P(x)) | Q)"
  34.183 -  apply (tactic \<open>IntPr.fast_tac @{context} 1\<close>)?
  34.184 +  apply (tactic \<open>IntPr.fast_tac \<^context> 1\<close>)?
  34.185    oops
  34.186  
  34.187  schematic_goal "?p : (ALL x. ~~P(x)) --> ~~(ALL x. P(x))"
  34.188 -  apply (tactic \<open>IntPr.fast_tac @{context} 1\<close>)?
  34.189 +  apply (tactic \<open>IntPr.fast_tac \<^context> 1\<close>)?
  34.190    oops
  34.191  
  34.192  (*Classically but not intuitionistically valid.  Proved by a bug in 1986!*)
  34.193  schematic_goal "?p : EX x. Q(x) --> (ALL x. Q(x))"
  34.194 -  apply (tactic \<open>IntPr.fast_tac @{context} 1\<close>)?
  34.195 +  apply (tactic \<open>IntPr.fast_tac \<^context> 1\<close>)?
  34.196    oops
  34.197  
  34.198  
  34.199 @@ -204,7 +204,7 @@
  34.200  text "Problem 20"
  34.201  schematic_goal "?p : (ALL x y. EX z. ALL w. (P(x)&Q(y)-->R(z)&S(w)))      
  34.202      --> (EX x y. P(x) & Q(y)) --> (EX z. R(z))"
  34.203 -  by (tactic \<open>IntPr.fast_tac @{context} 1\<close>)
  34.204 +  by (tactic \<open>IntPr.fast_tac \<^context> 1\<close>)
  34.205  
  34.206  text "Problem 21"
  34.207  schematic_goal "?p : (EX x. P-->Q(x)) & (EX x. Q(x)-->P) --> ~~(EX x. P<->Q(x))" oops
  34.208 @@ -212,21 +212,21 @@
  34.209  
  34.210  text "Problem 22"
  34.211  schematic_goal "?p : (ALL x. P <-> Q(x))  -->  (P <-> (ALL x. Q(x)))"
  34.212 -  by (tactic \<open>IntPr.fast_tac @{context} 1\<close>)
  34.213 +  by (tactic \<open>IntPr.fast_tac \<^context> 1\<close>)
  34.214  
  34.215  text "Problem ~~23"
  34.216  schematic_goal "?p : ~~ ((ALL x. P | Q(x))  <->  (P | (ALL x. Q(x))))"
  34.217 -  by (tactic \<open>IntPr.fast_tac @{context} 1\<close>)
  34.218 +  by (tactic \<open>IntPr.fast_tac \<^context> 1\<close>)
  34.219  
  34.220  text "Problem 24"
  34.221  schematic_goal "?p : ~(EX x. S(x)&Q(x)) & (ALL x. P(x) --> Q(x)|R(x)) &   
  34.222       (~(EX x. P(x)) --> (EX x. Q(x))) & (ALL x. Q(x)|R(x) --> S(x))   
  34.223      --> ~~(EX x. P(x)&R(x))"
  34.224  (*Not clear why fast_tac, best_tac, ASTAR and ITER_DEEPEN all take forever*)
  34.225 -  apply (tactic "IntPr.safe_tac @{context}")
  34.226 +  apply (tactic "IntPr.safe_tac \<^context>")
  34.227    apply (erule impE)
  34.228 -   apply (tactic "IntPr.fast_tac @{context} 1")
  34.229 -  apply (tactic "IntPr.fast_tac @{context} 1")
  34.230 +   apply (tactic "IntPr.fast_tac \<^context> 1")
  34.231 +  apply (tactic "IntPr.fast_tac \<^context> 1")
  34.232    done
  34.233  
  34.234  text "Problem 25"
  34.235 @@ -235,72 +235,72 @@
  34.236          (ALL x. P(x) --> (M(x) & L(x))) &    
  34.237          ((ALL x. P(x)-->Q(x)) | (EX x. P(x)&R(x)))   
  34.238      --> (EX x. Q(x)&P(x))"
  34.239 -  by (tactic "IntPr.best_tac @{context} 1")
  34.240 +  by (tactic "IntPr.best_tac \<^context> 1")
  34.241  
  34.242  text "Problem 29.  Essentially the same as Principia Mathematica *11.71"
  34.243  schematic_goal "?p : (EX x. P(x)) & (EX y. Q(y))   
  34.244      --> ((ALL x. P(x)-->R(x)) & (ALL y. Q(y)-->S(y))   <->      
  34.245           (ALL x y. P(x) & Q(y) --> R(x) & S(y)))"
  34.246 -  by (tactic "IntPr.fast_tac @{context} 1")
  34.247 +  by (tactic "IntPr.fast_tac \<^context> 1")
  34.248  
  34.249  text "Problem ~~30"
  34.250  schematic_goal "?p : (ALL x. (P(x) | Q(x)) --> ~ R(x)) &  
  34.251          (ALL x. (Q(x) --> ~ S(x)) --> P(x) & R(x))   
  34.252      --> (ALL x. ~~S(x))"
  34.253 -  by (tactic "IntPr.fast_tac @{context} 1")
  34.254 +  by (tactic "IntPr.fast_tac \<^context> 1")
  34.255  
  34.256  text "Problem 31"
  34.257  schematic_goal "?p : ~(EX x. P(x) & (Q(x) | R(x))) &  
  34.258          (EX x. L(x) & P(x)) &  
  34.259          (ALL x. ~ R(x) --> M(x))   
  34.260      --> (EX x. L(x) & M(x))"
  34.261 -  by (tactic "IntPr.fast_tac @{context} 1")
  34.262 +  by (tactic "IntPr.fast_tac \<^context> 1")
  34.263  
  34.264  text "Problem 32"
  34.265  schematic_goal "?p : (ALL x. P(x) & (Q(x)|R(x))-->S(x)) &  
  34.266          (ALL x. S(x) & R(x) --> L(x)) &  
  34.267          (ALL x. M(x) --> R(x))   
  34.268      --> (ALL x. P(x) & M(x) --> L(x))"
  34.269 -  by (tactic "IntPr.best_tac @{context} 1") \<comment> \<open>slow\<close>
  34.270 +  by (tactic "IntPr.best_tac \<^context> 1") \<comment> \<open>slow\<close>
  34.271  
  34.272  text "Problem 39"
  34.273  schematic_goal "?p : ~ (EX x. ALL y. F(y,x) <-> ~F(y,y))"
  34.274 -  by (tactic "IntPr.best_tac @{context} 1")
  34.275 +  by (tactic "IntPr.best_tac \<^context> 1")
  34.276  
  34.277  text "Problem 40.  AMENDED"
  34.278  schematic_goal "?p : (EX y. ALL x. F(x,y) <-> F(x,x)) -->   
  34.279                ~(ALL x. EX y. ALL z. F(z,y) <-> ~ F(z,x))"
  34.280 -  by (tactic "IntPr.best_tac @{context} 1") \<comment> \<open>slow\<close>
  34.281 +  by (tactic "IntPr.best_tac \<^context> 1") \<comment> \<open>slow\<close>
  34.282  
  34.283  text "Problem 44"
  34.284  schematic_goal "?p : (ALL x. f(x) -->                                    
  34.285                (EX y. g(y) & h(x,y) & (EX y. g(y) & ~ h(x,y))))  &        
  34.286                (EX x. j(x) & (ALL y. g(y) --> h(x,y)))                    
  34.287                --> (EX x. j(x) & ~f(x))"
  34.288 -  by (tactic "IntPr.best_tac @{context} 1")
  34.289 +  by (tactic "IntPr.best_tac \<^context> 1")
  34.290  
  34.291  text "Problem 48"
  34.292  schematic_goal "?p : (a=b | c=d) & (a=c | b=d) --> a=d | b=c"
  34.293 -  by (tactic "IntPr.best_tac @{context} 1")
  34.294 +  by (tactic "IntPr.best_tac \<^context> 1")
  34.295  
  34.296  text "Problem 51"
  34.297  schematic_goal
  34.298      "?p : (EX z w. ALL x y. P(x,y) <->  (x=z & y=w)) -->   
  34.299       (EX z. ALL x. EX w. (ALL y. P(x,y) <-> y=w) <-> x=z)"
  34.300 -  by (tactic "IntPr.best_tac @{context} 1") \<comment> \<open>60 seconds\<close>
  34.301 +  by (tactic "IntPr.best_tac \<^context> 1") \<comment> \<open>60 seconds\<close>
  34.302  
  34.303  text "Problem 56"
  34.304  schematic_goal "?p : (ALL x. (EX y. P(y) & x=f(y)) --> P(x)) <-> (ALL x. P(x) --> P(f(x)))"
  34.305 -  by (tactic "IntPr.best_tac @{context} 1")
  34.306 +  by (tactic "IntPr.best_tac \<^context> 1")
  34.307  
  34.308  text "Problem 57"
  34.309  schematic_goal
  34.310      "?p : P(f(a,b), f(b,c)) & P(f(b,c), f(a,c)) &  
  34.311       (ALL x y z. P(x,y) & P(y,z) --> P(x,z))    -->   P(f(a,b), f(a,c))"
  34.312 -  by (tactic "IntPr.best_tac @{context} 1")
  34.313 +  by (tactic "IntPr.best_tac \<^context> 1")
  34.314  
  34.315  text "Problem 60"
  34.316  schematic_goal "?p : ALL x. P(x,f(x)) <-> (EX y. (ALL z. P(z,y) --> P(z,f(x))) & P(x,y))"
  34.317 -  by (tactic "IntPr.best_tac @{context} 1")
  34.318 +  by (tactic "IntPr.best_tac \<^context> 1")
  34.319  
  34.320  end
    35.1 --- a/src/FOLP/ex/Nat.thy	Fri Jan 04 21:49:06 2019 +0100
    35.2 +++ b/src/FOLP/ex/Nat.thy	Fri Jan 04 23:22:53 2019 +0100
    35.3 @@ -84,24 +84,24 @@
    35.4  ML \<open>
    35.5    val add_ss =
    35.6      FOLP_ss addcongs @{thms nat_congs}
    35.7 -    |> fold (addrew @{context}) @{thms add_0 add_Suc}
    35.8 +    |> fold (addrew \<^context>) @{thms add_0 add_Suc}
    35.9  \<close>
   35.10  
   35.11  schematic_goal add_assoc: "?p : (k+m)+n = k+(m+n)"
   35.12  apply (rule_tac n = k in induct)
   35.13 -apply (tactic \<open>SIMP_TAC @{context} add_ss 1\<close>)
   35.14 -apply (tactic \<open>ASM_SIMP_TAC @{context} add_ss 1\<close>)
   35.15 +apply (tactic \<open>SIMP_TAC \<^context> add_ss 1\<close>)
   35.16 +apply (tactic \<open>ASM_SIMP_TAC \<^context> add_ss 1\<close>)
   35.17  done
   35.18  
   35.19  schematic_goal add_0_right: "?p : m+0 = m"
   35.20  apply (rule_tac n = m in induct)
   35.21 -apply (tactic \<open>SIMP_TAC @{context} add_ss 1\<close>)
   35.22 -apply (tactic \<open>ASM_SIMP_TAC @{context} add_ss 1\<close>)
   35.23 +apply (tactic \<open>SIMP_TAC \<^context> add_ss 1\<close>)
   35.24 +apply (tactic \<open>ASM_SIMP_TAC \<^context> add_ss 1\<close>)
   35.25  done
   35.26  
   35.27  schematic_goal add_Suc_right: "?p : m+Suc(n) = Suc(m+n)"
   35.28  apply (rule_tac n = m in induct)
   35.29 -apply (tactic \<open>ALLGOALS (ASM_SIMP_TAC @{context} add_ss)\<close>)
   35.30 +apply (tactic \<open>ALLGOALS (ASM_SIMP_TAC \<^context> add_ss)\<close>)
   35.31  done
   35.32  
   35.33  (*mk_typed_congs appears not to work with FOLP's version of subst*)
    36.1 --- a/src/FOLP/ex/Propositional_Cla.thy	Fri Jan 04 21:49:06 2019 +0100
    36.2 +++ b/src/FOLP/ex/Propositional_Cla.thy	Fri Jan 04 23:22:53 2019 +0100
    36.3 @@ -12,106 +12,106 @@
    36.4  
    36.5  text "commutative laws of & and | "
    36.6  schematic_goal "?p : P & Q  -->  Q & P"
    36.7 -  by (tactic \<open>Cla.fast_tac @{context} FOLP_cs 1\<close>)
    36.8 +  by (tactic \<open>Cla.fast_tac \<^context> FOLP_cs 1\<close>)
    36.9  
   36.10  schematic_goal "?p : P | Q  -->  Q | P"
   36.11 -  by (tactic \<open>Cla.fast_tac @{context} FOLP_cs 1\<close>)
   36.12 +  by (tactic \<open>Cla.fast_tac \<^context> FOLP_cs 1\<close>)
   36.13  
   36.14  
   36.15  text "associative laws of & and | "
   36.16  schematic_goal "?p : (P & Q) & R  -->  P & (Q & R)"
   36.17 -  by (tactic \<open>Cla.fast_tac @{context} FOLP_cs 1\<close>)
   36.18 +  by (tactic \<open>Cla.fast_tac \<^context> FOLP_cs 1\<close>)
   36.19  
   36.20  schematic_goal "?p : (P | Q) | R  -->  P | (Q | R)"
   36.21 -  by (tactic \<open>Cla.fast_tac @{context} FOLP_cs 1\<close>)
   36.22 +  by (tactic \<open>Cla.fast_tac \<^context> FOLP_cs 1\<close>)
   36.23  
   36.24  
   36.25  text "distributive laws of & and | "
   36.26  schematic_goal "?p : (P & Q) | R  --> (P | R) & (Q | R)"
   36.27 -  by (tactic \<open>Cla.fast_tac @{context} FOLP_cs 1\<close>)
   36.28 +  by (tactic \<open>Cla.fast_tac \<^context> FOLP_cs 1\<close>)
   36.29  
   36.30  schematic_goal "?p : (P | R) & (Q | R)  --> (P & Q) | R"
   36.31 -  by (tactic \<open>Cla.fast_tac @{context} FOLP_cs 1\<close>)
   36.32 +  by (tactic \<open>Cla.fast_tac \<^context> FOLP_cs 1\<close>)
   36.33  
   36.34  schematic_goal "?p : (P | Q) & R  --> (P & R) | (Q & R)"
   36.35 -  by (tactic \<open>Cla.fast_tac @{context} FOLP_cs 1\<close>)
   36.36 +  by (tactic \<open>Cla.fast_tac \<^context> FOLP_cs 1\<close>)
   36.37  
   36.38  
   36.39  schematic_goal "?p : (P & R) | (Q & R)  --> (P | Q) & R"
   36.40 -  by (tactic \<open>Cla.fast_tac @{context} FOLP_cs 1\<close>)
   36.41 +  by (tactic \<open>Cla.fast_tac \<^context> FOLP_cs 1\<close>)
   36.42  
   36.43  
   36.44  text "Laws involving implication"
   36.45  
   36.46  schematic_goal "?p : (P-->R) & (Q-->R) <-> (P|Q --> R)"
   36.47 -  by (tactic \<open>Cla.fast_tac @{context} FOLP_cs 1\<close>)
   36.48 +  by (tactic \<open>Cla.fast_tac \<^context> FOLP_cs 1\<close>)
   36.49  
   36.50  schematic_goal "?p : (P & Q --> R) <-> (P--> (Q-->R))"
   36.51 -  by (tactic \<open>Cla.fast_tac @{context} FOLP_cs 1\<close>)
   36.52 +  by (tactic \<open>Cla.fast_tac \<^context> FOLP_cs 1\<close>)
   36.53  
   36.54  schematic_goal "?p : ((P-->R)-->R) --> ((Q-->R)-->R) --> (P&Q-->R) --> R"
   36.55 -  by (tactic \<open>Cla.fast_tac @{context} FOLP_cs 1\<close>)
   36.56 +  by (tactic \<open>Cla.fast_tac \<^context> FOLP_cs 1\<close>)
   36.57  
   36.58  schematic_goal "?p : ~(P-->R) --> ~(Q-->R) --> ~(P&Q-->R)"
   36.59 -  by (tactic \<open>Cla.fast_tac @{context} FOLP_cs 1\<close>)
   36.60 +  by (tactic \<open>Cla.fast_tac \<^context> FOLP_cs 1\<close>)
   36.61  
   36.62  schematic_goal "?p : (P --> Q & R) <-> (P-->Q)  &  (P-->R)"
   36.63 -  by (tactic \<open>Cla.fast_tac @{context} FOLP_cs 1\<close>)
   36.64 +  by (tactic \<open>Cla.fast_tac \<^context> FOLP_cs 1\<close>)
   36.65  
   36.66  
   36.67  text "Propositions-as-types"
   36.68  
   36.69  (*The combinator K*)
   36.70  schematic_goal "?p : P --> (Q --> P)"
   36.71 -  by (tactic \<open>Cla.fast_tac @{context} FOLP_cs 1\<close>)
   36.72 +  by (tactic \<open>Cla.fast_tac \<^context> FOLP_cs 1\<close>)
   36.73  
   36.74  (*The combinator S*)
   36.75  schematic_goal "?p : (P-->Q-->R)  --> (P-->Q) --> (P-->R)"
   36.76 -  by (tactic \<open>Cla.fast_tac @{context} FOLP_cs 1\<close>)
   36.77 +  by (tactic \<open>Cla.fast_tac \<^context> FOLP_cs 1\<close>)
   36.78  
   36.79  
   36.80  (*Converse is classical*)
   36.81  schematic_goal "?p : (P-->Q) | (P-->R)  -->  (P --> Q | R)"
   36.82 -  by (tactic \<open>Cla.fast_tac @{context} FOLP_cs 1\<close>)
   36.83 +  by (tactic \<open>Cla.fast_tac \<^context> FOLP_cs 1\<close>)
   36.84  
   36.85  schematic_goal "?p : (P-->Q)  -->  (~Q --> ~P)"
   36.86 -  by (tactic \<open>Cla.fast_tac @{context} FOLP_cs 1\<close>)
   36.87 +  by (tactic \<open>Cla.fast_tac \<^context> FOLP_cs 1\<close>)
   36.88  
   36.89  
   36.90  text "Schwichtenberg's examples (via T. Nipkow)"
   36.91  
   36.92  schematic_goal stab_imp: "?p : (((Q-->R)-->R)-->Q) --> (((P-->Q)-->R)-->R)-->P-->Q"
   36.93 -  by (tactic \<open>Cla.fast_tac @{context} FOLP_cs 1\<close>)
   36.94 +  by (tactic \<open>Cla.fast_tac \<^context> FOLP_cs 1\<close>)
   36.95  
   36.96  schematic_goal stab_to_peirce: "?p : (((P --> R) --> R) --> P) --> (((Q --> R) --> R) --> Q)  
   36.97                --> ((P --> Q) --> P) --> P"
   36.98 -  by (tactic \<open>Cla.fast_tac @{context} FOLP_cs 1\<close>)
   36.99 +  by (tactic \<open>Cla.fast_tac \<^context> FOLP_cs 1\<close>)
  36.100  
  36.101  schematic_goal peirce_imp1: "?p : (((Q --> R) --> Q) --> Q)  
  36.102                 --> (((P --> Q) --> R) --> P --> Q) --> P --> Q"
  36.103 -  by (tactic \<open>Cla.fast_tac @{context} FOLP_cs 1\<close>)
  36.104 +  by (tactic \<open>Cla.fast_tac \<^context> FOLP_cs 1\<close>)
  36.105    
  36.106  schematic_goal peirce_imp2: "?p : (((P --> R) --> P) --> P) --> ((P --> Q --> R) --> P) --> P"
  36.107 -  by (tactic \<open>Cla.fast_tac @{context} FOLP_cs 1\<close>)
  36.108 +  by (tactic \<open>Cla.fast_tac \<^context> FOLP_cs 1\<close>)
  36.109  
  36.110  schematic_goal mints: "?p : ((((P --> Q) --> P) --> P) --> Q) --> Q"
  36.111 -  by (tactic \<open>Cla.fast_tac @{context} FOLP_cs 1\<close>)
  36.112 +  by (tactic \<open>Cla.fast_tac \<^context> FOLP_cs 1\<close>)
  36.113  
  36.114  schematic_goal mints_solovev: "?p : (P --> (Q --> R) --> Q) --> ((P --> Q) --> R) --> R"
  36.115 -  by (tactic \<open>Cla.fast_tac @{context} FOLP_cs 1\<close>)
  36.116 +  by (tactic \<open>Cla.fast_tac \<^context> FOLP_cs 1\<close>)
  36.117  
  36.118  schematic_goal tatsuta: "?p : (((P7 --> P1) --> P10) --> P4 --> P5)  
  36.119            --> (((P8 --> P2) --> P9) --> P3 --> P10)  
  36.120            --> (P1 --> P8) --> P6 --> P7  
  36.121            --> (((P3 --> P2) --> P9) --> P4)  
  36.122            --> (P1 --> P3) --> (((P6 --> P1) --> P2) --> P9) --> P5"
  36.123 -  by (tactic \<open>Cla.fast_tac @{context} FOLP_cs 1\<close>)
  36.124 +  by (tactic \<open>Cla.fast_tac \<^context> FOLP_cs 1\<close>)
  36.125  
  36.126  schematic_goal tatsuta1: "?p : (((P8 --> P2) --> P9) --> P3 --> P10)  
  36.127       --> (((P3 --> P2) --> P9) --> P4)  
  36.128       --> (((P6 --> P1) --> P2) --> P9)  
  36.129       --> (((P7 --> P1) --> P10) --> P4 --> P5)  
  36.130       --> (P1 --> P3) --> (P1 --> P8) --> P6 --> P7 --> P5"
  36.131 -  by (tactic \<open>Cla.fast_tac @{context} FOLP_cs 1\<close>)
  36.132 +  by (tactic \<open>Cla.fast_tac \<^context> FOLP_cs 1\<close>)
  36.133  
  36.134  end
    37.1 --- a/src/FOLP/ex/Propositional_Int.thy	Fri Jan 04 21:49:06 2019 +0100
    37.2 +++ b/src/FOLP/ex/Propositional_Int.thy	Fri Jan 04 23:22:53 2019 +0100
    37.3 @@ -12,106 +12,106 @@
    37.4  
    37.5  text "commutative laws of & and | "
    37.6  schematic_goal "?p : P & Q  -->  Q & P"
    37.7 -  by (tactic \<open>IntPr.fast_tac @{context} 1\<close>)
    37.8 +  by (tactic \<open>IntPr.fast_tac \<^context> 1\<close>)
    37.9  
   37.10  schematic_goal "?p : P | Q  -->  Q | P"
   37.11 -  by (tactic \<open>IntPr.fast_tac @{context} 1\<close>)
   37.12 +  by (tactic \<open>IntPr.fast_tac \<^context> 1\<close>)
   37.13  
   37.14  
   37.15  text "associative laws of & and | "
   37.16  schematic_goal "?p : (P & Q) & R  -->  P & (Q & R)"
   37.17 -  by (tactic \<open>IntPr.fast_tac @{context} 1\<close>)
   37.18 +  by (tactic \<open>IntPr.fast_tac \<^context> 1\<close>)
   37.19  
   37.20  schematic_goal "?p : (P | Q) | R  -->  P | (Q | R)"
   37.21 -  by (tactic \<open>IntPr.fast_tac @{context} 1\<close>)
   37.22 +  by (tactic \<open>IntPr.fast_tac \<^context> 1\<close>)
   37.23  
   37.24  
   37.25  text "distributive laws of & and | "
   37.26  schematic_goal "?p : (P & Q) | R  --> (P | R) & (Q | R)"
   37.27 -  by (tactic \<open>IntPr.fast_tac @{context} 1\<close>)
   37.28 +  by (tactic \<open>IntPr.fast_tac \<^context> 1\<close>)
   37.29  
   37.30  schematic_goal "?p : (P | R) & (Q | R)  --> (P & Q) | R"
   37.31 -  by (tactic \<open>IntPr.fast_tac @{context} 1\<close>)
   37.32 +  by (tactic \<open>IntPr.fast_tac \<^context> 1\<close>)
   37.33  
   37.34  schematic_goal "?p : (P | Q) & R  --> (P & R) | (Q & R)"
   37.35 -  by (tactic \<open>IntPr.fast_tac @{context} 1\<close>)
   37.36 +  by (tactic \<open>IntPr.fast_tac \<^context> 1\<close>)
   37.37  
   37.38  
   37.39  schematic_goal "?p : (P & R) | (Q & R)  --> (P | Q) & R"
   37.40 -  by (tactic \<open>IntPr.fast_tac @{context} 1\<close>)
   37.41 +  by (tactic \<open>IntPr.fast_tac \<^context> 1\<close>)
   37.42  
   37.43  
   37.44  text "Laws involving implication"
   37.45  
   37.46  schematic_goal "?p : (P-->R) & (Q-->R) <-> (P|Q --> R)"
   37.47 -  by (tactic \<open>IntPr.fast_tac @{context} 1\<close>)
   37.48 +  by (tactic \<open>IntPr.fast_tac \<^context> 1\<close>)
   37.49  
   37.50  schematic_goal "?p : (P & Q --> R) <-> (P--> (Q-->R))"
   37.51 -  by (tactic \<open>IntPr.fast_tac @{context} 1\<close>)
   37.52 +  by (tactic \<open>IntPr.fast_tac \<^context> 1\<close>)
   37.53  
   37.54  schematic_goal "?p : ((P-->R)-->R) --> ((Q-->R)-->R) --> (P&Q-->R) --> R"
   37.55 -  by (tactic \<open>IntPr.fast_tac @{context} 1\<close>)
   37.56 +  by (tactic \<open>IntPr.fast_tac \<^context> 1\<close>)
   37.57  
   37.58  schematic_goal "?p : ~(P-->R) --> ~(Q-->R) --> ~(P&Q-->R)"
   37.59 -  by (tactic \<open>IntPr.fast_tac @{context} 1\<close>)
   37.60 +  by (tactic \<open>IntPr.fast_tac \<^context> 1\<close>)
   37.61  
   37.62  schematic_goal "?p : (P --> Q & R) <-> (P-->Q)  &  (P-->R)"
   37.63 -  by (tactic \<open>IntPr.fast_tac @{context} 1\<close>)
   37.64 +  by (tactic \<open>IntPr.fast_tac \<^context> 1\<close>)
   37.65  
   37.66  
   37.67  text "Propositions-as-types"
   37.68  
   37.69  (*The combinator K*)
   37.70  schematic_goal "?p : P --> (Q --> P)"
   37.71 -  by (tactic \<open>IntPr.fast_tac @{context} 1\<close>)
   37.72 +  by (tactic \<open>IntPr.fast_tac \<^context> 1\<close>)
   37.73  
   37.74  (*The combinator S*)
   37.75  schematic_goal "?p : (P-->Q-->R)  --> (P-->Q) --> (P-->R)"
   37.76 -  by (tactic \<open>IntPr.fast_tac @{context} 1\<close>)
   37.77 +  by (tactic \<open>IntPr.fast_tac \<^context> 1\<close>)
   37.78  
   37.79  
   37.80  (*Converse is classical*)
   37.81  schematic_goal "?p : (P-->Q) | (P-->R)  -->  (P --> Q | R)"
   37.82 -  by (tactic \<open>IntPr.fast_tac @{context} 1\<close>)
   37.83 +  by (tactic \<open>IntPr.fast_tac \<^context> 1\<close>)
   37.84  
   37.85  schematic_goal "?p : (P-->Q)  -->  (~Q --> ~P)"
   37.86 -  by (tactic \<open>IntPr.fast_tac @{context} 1\<close>)
   37.87 +  by (tactic \<open>IntPr.fast_tac \<^context> 1\<close>)
   37.88  
   37.89  
   37.90  text "Schwichtenberg's examples (via T. Nipkow)"
   37.91  
   37.92  schematic_goal stab_imp: "?p : (((Q-->R)-->R)-->Q) --> (((P-->Q)-->R)-->R)-->P-->Q"
   37.93 -  by (tactic \<open>IntPr.fast_tac @{context} 1\<close>)
   37.94 +  by (tactic \<open>IntPr.fast_tac \<^context> 1\<close>)
   37.95  
   37.96  schematic_goal stab_to_peirce: "?p : (((P --> R) --> R) --> P) --> (((Q --> R) --> R) --> Q)  
   37.97                --> ((P --> Q) --> P) --> P"
   37.98 -  by (tactic \<open>IntPr.fast_tac @{context} 1\<close>)
   37.99 +  by (tactic \<open>IntPr.fast_tac \<^context> 1\<close>)
  37.100  
  37.101  schematic_goal peirce_imp1: "?p : (((Q --> R) --> Q) --> Q)  
  37.102                 --> (((P --> Q) --> R) --> P --> Q) --> P --> Q"
  37.103 -  by (tactic \<open>IntPr.fast_tac @{context} 1\<close>)
  37.104 +  by (tactic \<open>IntPr.fast_tac \<^context> 1\<close>)
  37.105    
  37.106  schematic_goal peirce_imp2: "?p : (((P --> R) --> P) --> P) --> ((P --> Q --> R) --> P) --> P"
  37.107 -  by (tactic \<open>IntPr.fast_tac @{context} 1\<close>)
  37.108 +  by (tactic \<open>IntPr.fast_tac \<^context> 1\<close>)
  37.109  
  37.110  schematic_goal mints: "?p : ((((P --> Q) --> P) --> P) --> Q) --> Q"
  37.111 -  by (tactic \<open>IntPr.fast_tac @{context} 1\<close>)
  37.112 +  by (tactic \<open>IntPr.fast_tac \<^context> 1\<close>)
  37.113  
  37.114  schematic_goal mints_solovev: "?p : (P --> (Q --> R) --> Q) --> ((P --> Q) --> R) --> R"
  37.115 -  by (tactic \<open>IntPr.fast_tac @{context} 1\<close>)
  37.116 +  by (tactic \<open>IntPr.fast_tac \<^context> 1\<close>)
  37.117  
  37.118  schematic_goal tatsuta: "?p : (((P7 --> P1) --> P10) --> P4 --> P5)  
  37.119            --> (((P8 --> P2) --> P9) --> P3 --> P10)  
  37.120            --> (P1 --> P8) --> P6 --> P7  
  37.121            --> (((P3 --> P2) --> P9) --> P4)  
  37.122            --> (P1 --> P3) --> (((P6 --> P1) --> P2) --> P9) --> P5"
  37.123 -  by (tactic \<open>IntPr.fast_tac @{context} 1\<close>)
  37.124 +  by (tactic \<open>IntPr.fast_tac \<^context> 1\<close>)
  37.125  
  37.126  schematic_goal tatsuta1: "?p : (((P8 --> P2) --> P9) --> P3 --> P10)  
  37.127       --> (((P3 --> P2) --> P9) --> P4)  
  37.128       --> (((P6 --> P1) --> P2) --> P9)  
  37.129       --> (((P7 --> P1) --> P10) --> P4 --> P5)  
  37.130       --> (P1 --> P3) --> (P1 --> P8) --> P6 --> P7 --> P5"
  37.131 -  by (tactic \<open>IntPr.fast_tac @{context} 1\<close>)
  37.132 +  by (tactic \<open>IntPr.fast_tac \<^context> 1\<close>)
  37.133  
  37.134  end
    38.1 --- a/src/FOLP/ex/Quantifiers_Cla.thy	Fri Jan 04 21:49:06 2019 +0100
    38.2 +++ b/src/FOLP/ex/Quantifiers_Cla.thy	Fri Jan 04 23:22:53 2019 +0100
    38.3 @@ -11,91 +11,91 @@
    38.4  begin
    38.5  
    38.6  schematic_goal "?p : (ALL x y. P(x,y))  -->  (ALL y x. P(x,y))"
    38.7 -  by (tactic \<open>Cla.fast_tac @{context} FOLP_cs 1\<close>)
    38.8 +  by (tactic \<open>Cla.fast_tac \<^context> FOLP_cs 1\<close>)
    38.9  
   38.10  schematic_goal "?p : (EX x y. P(x,y)) --> (EX y x. P(x,y))"
   38.11 -  by (tactic \<open>Cla.fast_tac @{context} FOLP_cs 1\<close>)
   38.12 +  by (tactic \<open>Cla.fast_tac \<^context> FOLP_cs 1\<close>)
   38.13  
   38.14  
   38.15  (*Converse is false*)
   38.16  schematic_goal "?p : (ALL x. P(x)) | (ALL x. Q(x)) --> (ALL x. P(x) | Q(x))"
   38.17 -  by (tactic \<open>Cla.fast_tac @{context} FOLP_cs 1\<close>)
   38.18 +  by (tactic \<open>Cla.fast_tac \<^context> FOLP_cs 1\<close>)
   38.19  
   38.20  schematic_goal "?p : (ALL x. P-->Q(x))  <->  (P--> (ALL x. Q(x)))"
   38.21 -  by (tactic \<open>Cla.fast_tac @{context} FOLP_cs 1\<close>)
   38.22 +  by (tactic \<open>Cla.fast_tac \<^context> FOLP_cs 1\<close>)
   38.23  
   38.24  
   38.25  schematic_goal "?p : (ALL x. P(x)-->Q)  <->  ((EX x. P(x)) --> Q)"
   38.26 -  by (tactic \<open>Cla.fast_tac @{context} FOLP_cs 1\<close>)
   38.27 +  by (tactic \<open>Cla.fast_tac \<^context> FOLP_cs 1\<close>)
   38.28  
   38.29  
   38.30  text "Some harder ones"
   38.31  
   38.32  schematic_goal "?p : (EX x. P(x) | Q(x)) <-> (EX x. P(x)) | (EX x. Q(x))"
   38.33 -  by (tactic \<open>Cla.fast_tac @{context} FOLP_cs 1\<close>)
   38.34 +  by (tactic \<open>Cla.fast_tac \<^context> FOLP_cs 1\<close>)
   38.35  
   38.36  (*Converse is false*)
   38.37  schematic_goal "?p : (EX x. P(x)&Q(x)) --> (EX x. P(x))  &  (EX x. Q(x))"
   38.38 -  by (tactic \<open>Cla.fast_tac @{context} FOLP_cs 1\<close>)
   38.39 +  by (tactic \<open>Cla.fast_tac \<^context> FOLP_cs 1\<close>)
   38.40  
   38.41  
   38.42  text "Basic test of quantifier reasoning"
   38.43  (*TRUE*)
   38.44  schematic_goal "?p : (EX y. ALL x. Q(x,y)) -->  (ALL x. EX y. Q(x,y))"
   38.45 -  by (tactic \<open>Cla.fast_tac @{context} FOLP_cs 1\<close>)
   38.46 +  by (tactic \<open>Cla.fast_tac \<^context> FOLP_cs 1\<close>)
   38.47  
   38.48  schematic_goal "?p : (ALL x. Q(x))  -->  (EX x. Q(x))"
   38.49 -  by (tactic \<open>Cla.fast_tac @{context} FOLP_cs 1\<close>)
   38.50 +  by (tactic \<open>Cla.fast_tac \<^context> FOLP_cs 1\<close>)
   38.51  
   38.52  
   38.53  text "The following should fail, as they are false!"
   38.54  
   38.55  schematic_goal "?p : (ALL x. EX y. Q(x,y))  -->  (EX y. ALL x. Q(x,y))"
   38.56 -  apply (tactic \<open>Cla.fast_tac @{context} FOLP_cs 1\<close>)?
   38.57 +  apply (tactic \<open>Cla.fast_tac \<^context> FOLP_cs 1\<close>)?
   38.58    oops
   38.59  
   38.60  schematic_goal "?p : (EX x. Q(x))  -->  (ALL x. Q(x))"
   38.61 -  apply (tactic \<open>Cla.fast_tac @{context} FOLP_cs 1\<close>)?
   38.62 +  apply (tactic \<open>Cla.fast_tac \<^context> FOLP_cs 1\<close>)?
   38.63    oops
   38.64  
   38.65  schematic_goal "?p : P(?a) --> (ALL x. P(x))"
   38.66 -  apply (tactic \<open>Cla.fast_tac @{context} FOLP_cs 1\<close>)?
   38.67 +  apply (tactic \<open>Cla.fast_tac \<^context> FOLP_cs 1\<close>)?
   38.68    oops
   38.69  
   38.70  schematic_goal "?p : (P(?a) --> (ALL x. Q(x))) --> (ALL x. P(x) --> Q(x))"
   38.71 -  apply (tactic \<open>Cla.fast_tac @{context} FOLP_cs 1\<close>)?
   38.72 +  apply (tactic \<open>Cla.fast_tac \<^context> FOLP_cs 1\<close>)?
   38.73    oops
   38.74  
   38.75  
   38.76  text "Back to things that are provable..."
   38.77  
   38.78  schematic_goal "?p : (ALL x. P(x)-->Q(x)) & (EX x. P(x)) --> (EX x. Q(x))"
   38.79 -  by (tactic \<open>Cla.fast_tac @{context} FOLP_cs 1\<close>)
   38.80 +  by (tactic \<open>Cla.fast_tac \<^context> FOLP_cs 1\<close>)
   38.81  
   38.82  
   38.83  (*An example of why exI should be delayed as long as possible*)
   38.84  schematic_goal "?p : (P --> (EX x. Q(x))) & P --> (EX x. Q(x))"
   38.85 -  by (tactic \<open>Cla.fast_tac @{context} FOLP_cs 1\<close>)
   38.86 +  by (tactic \<open>Cla.fast_tac \<^context> FOLP_cs 1\<close>)
   38.87  
   38.88  schematic_goal "?p : (ALL x. P(x)-->Q(f(x))) & (ALL x. Q(x)-->R(g(x))) & P(d) --> R(?a)"
   38.89 -  by (tactic \<open>Cla.fast_tac @{context} FOLP_cs 1\<close>)
   38.90 +  by (tactic \<open>Cla.fast_tac \<^context> FOLP_cs 1\<close>)
   38.91  
   38.92  schematic_goal "?p : (ALL x. Q(x))  -->  (EX x. Q(x))"
   38.93 -  by (tactic \<open>Cla.fast_tac @{context} FOLP_cs 1\<close>)
   38.94 +  by (tactic \<open>Cla.fast_tac \<^context> FOLP_cs 1\<close>)
   38.95  
   38.96  
   38.97  text "Some slow ones"
   38.98  
   38.99  (*Principia Mathematica *11.53  *)
  38.100  schematic_goal "?p : (ALL x y. P(x) --> Q(y)) <-> ((EX x. P(x)) --> (ALL y. Q(y)))"
  38.101 -  by (tactic \<open>Cla.fast_tac @{context} FOLP_cs 1\<close>)
  38.102 +  by (tactic \<open>Cla.fast_tac \<^context> FOLP_cs 1\<close>)
  38.103  
  38.104  (*Principia Mathematica *11.55  *)
  38.105  schematic_goal "?p : (EX x y. P(x) & Q(x,y)) <-> (EX x. P(x) & (EX y. Q(x,y)))"
  38.106 -  by (tactic \<open>Cla.fast_tac @{context} FOLP_cs 1\<close>)
  38.107 +  by (tactic \<open>Cla.fast_tac \<^context> FOLP_cs 1\<close>)
  38.108  
  38.109  (*Principia Mathematica *11.61  *)
  38.110  schematic_goal "?p : (EX y. ALL x. P(x) --> Q(x,y)) --> (ALL x. P(x) --> (EX y. Q(x,y)))"
  38.111 -  by (tactic \<open>Cla.fast_tac @{context} FOLP_cs 1\<close>)
  38.112 +  by (tactic \<open>Cla.fast_tac \<^context> FOLP_cs 1\<close>)
  38.113  
  38.114  end
    39.1 --- a/src/FOLP/ex/Quantifiers_Int.thy	Fri Jan 04 21:49:06 2019 +0100
    39.2 +++ b/src/FOLP/ex/Quantifiers_Int.thy	Fri Jan 04 23:22:53 2019 +0100
    39.3 @@ -11,91 +11,91 @@
    39.4  begin
    39.5  
    39.6  schematic_goal "?p : (ALL x y. P(x,y))  -->  (ALL y x. P(x,y))"
    39.7 -  by (tactic \<open>IntPr.fast_tac @{context} 1\<close>)
    39.8 +  by (tactic \<open>IntPr.fast_tac \<^context> 1\<close>)
    39.9  
   39.10  schematic_goal "?p : (EX x y. P(x,y)) --> (EX y x. P(x,y))"
   39.11 -  by (tactic \<open>IntPr.fast_tac @{context} 1\<close>)
   39.12 +  by (tactic \<open>IntPr.fast_tac \<^context> 1\<close>)
   39.13  
   39.14  
   39.15  (*Converse is false*)
   39.16  schematic_goal "?p : (ALL x. P(x)) | (ALL x. Q(x)) --> (ALL x. P(x) | Q(x))"
   39.17 -  by (tactic \<open>IntPr.fast_tac @{context} 1\<close>)
   39.18 +  by (tactic \<open>IntPr.fast_tac \<^context> 1\<close>)
   39.19  
   39.20  schematic_goal "?p : (ALL x. P-->Q(x))  <->  (P--> (ALL x. Q(x)))"
   39.21 -  by (tactic \<open>IntPr.fast_tac @{context} 1\<close>)
   39.22 +  by (tactic \<open>IntPr.fast_tac \<^context> 1\<close>)
   39.23  
   39.24  
   39.25  schematic_goal "?p : (ALL x. P(x)-->Q)  <->  ((EX x. P(x)) --> Q)"
   39.26 -  by (tactic \<open>IntPr.fast_tac @{context} 1\<close>)
   39.27 +  by (tactic \<open>IntPr.fast_tac \<^context> 1\<close>)
   39.28  
   39.29  
   39.30  text "Some harder ones"
   39.31  
   39.32  schematic_goal "?p : (EX x. P(x) | Q(x)) <-> (EX x. P(x)) | (EX x. Q(x))"
   39.33 -  by (tactic \<open>IntPr.fast_tac @{context} 1\<close>)
   39.34 +  by (tactic \<open>IntPr.fast_tac \<^context> 1\<close>)
   39.35  
   39.36  (*Converse is false*)
   39.37  schematic_goal "?p : (EX x. P(x)&Q(x)) --> (EX x. P(x))  &  (EX x. Q(x))"
   39.38 -  by (tactic \<open>IntPr.fast_tac @{context} 1\<close>)
   39.39 +  by (tactic \<open>IntPr.fast_tac \<^context> 1\<close>)
   39.40  
   39.41  
   39.42  text "Basic test of quantifier reasoning"
   39.43  (*TRUE*)
   39.44  schematic_goal "?p : (EX y. ALL x. Q(x,y)) -->  (ALL x. EX y. Q(x,y))"
   39.45 -  by (tactic \<open>IntPr.fast_tac @{context} 1\<close>)
   39.46 +  by (tactic \<open>IntPr.fast_tac \<^context> 1\<close>)
   39.47  
   39.48  schematic_goal "?p : (ALL x. Q(x))  -->  (EX x. Q(x))"
   39.49 -  by (tactic \<open>IntPr.fast_tac @{context} 1\<close>)
   39.50 +  by (tactic \<open>IntPr.fast_tac \<^context> 1\<close>)
   39.51  
   39.52  
   39.53  text "The following should fail, as they are false!"
   39.54  
   39.55  schematic_goal "?p : (ALL x. EX y. Q(x,y))  -->  (EX y. ALL x. Q(x,y))"
   39.56 -  apply (tactic \<open>IntPr.fast_tac @{context} 1\<close>)?
   39.57 +  apply (tactic \<open>IntPr.fast_tac \<^context> 1\<close>)?
   39.58    oops
   39.59  
   39.60  schematic_goal "?p : (EX x. Q(x))  -->  (ALL x. Q(x))"
   39.61 -  apply (tactic \<open>IntPr.fast_tac @{context} 1\<close>)?
   39.62 +  apply (tactic \<open>IntPr.fast_tac \<^context> 1\<close>)?
   39.63    oops
   39.64  
   39.65  schematic_goal "?p : P(?a) --> (ALL x. P(x))"
   39.66 -  apply (tactic \<open>IntPr.fast_tac @{context} 1\<close>)?
   39.67 +  apply (tactic \<open>IntPr.fast_tac \<^context> 1\<close>)?
   39.68    oops
   39.69  
   39.70  schematic_goal "?p : (P(?a) --> (ALL x. Q(x))) --> (ALL x. P(x) --> Q(x))"
   39.71 -  apply (tactic \<open>IntPr.fast_tac @{context} 1\<close>)?
   39.72 +  apply (tactic \<open>IntPr.fast_tac \<^context> 1\<close>)?
   39.73    oops
   39.74  
   39.75  
   39.76  text "Back to things that are provable..."
   39.77  
   39.78  schematic_goal "?p : (ALL x. P(x)-->Q(x)) & (EX x. P(x)) --> (EX x. Q(x))"
   39.79 -  by (tactic \<open>IntPr.fast_tac @{context} 1\<close>)
   39.80 +  by (tactic \<open>IntPr.fast_tac \<^context> 1\<close>)
   39.81  
   39.82  
   39.83  (*An example of why exI should be delayed as long as possible*)
   39.84  schematic_goal "?p : (P --> (EX x. Q(x))) & P --> (EX x. Q(x))"
   39.85 -  by (tactic \<open>IntPr.fast_tac @{context} 1\<close>)
   39.86 +  by (tactic \<open>IntPr.fast_tac \<^context> 1\<close>)
   39.87  
   39.88  schematic_goal "?p : (ALL x. P(x)-->Q(f(x))) & (ALL x. Q(x)-->R(g(x))) & P(d) --> R(?a)"
   39.89 -  by (tactic \<open>IntPr.fast_tac @{context} 1\<close>)
   39.90 +  by (tactic \<open>IntPr.fast_tac \<^context> 1\<close>)
   39.91  
   39.92  schematic_goal "?p : (ALL x. Q(x))  -->  (EX x. Q(x))"
   39.93 -  by (tactic \<open>IntPr.fast_tac @{context} 1\<close>)
   39.94 +  by (tactic \<open>IntPr.fast_tac \<^context> 1\<close>)
   39.95  
   39.96  
   39.97  text "Some slow ones"
   39.98  
   39.99  (*Principia Mathematica *11.53  *)
  39.100  schematic_goal "?p : (ALL x y. P(x) --> Q(y)) <-> ((EX x. P(x)) --> (ALL y. Q(y)))"
  39.101 -  by (tactic \<open>IntPr.fast_tac @{context} 1\<close>)
  39.102 +  by (tactic \<open>IntPr.fast_tac \<^context> 1\<close>)
  39.103  
  39.104  (*Principia Mathematica *11.55  *)
  39.105  schematic_goal "?p : (EX x y. P(x) & Q(x,y)) <-> (EX x. P(x) & (EX y. Q(x,y)))"
  39.106 -  by (tactic \<open>IntPr.fast_tac @{context} 1\<close>)
  39.107 +  by (tactic \<open>IntPr.fast_tac \<^context> 1\<close>)
  39.108  
  39.109  (*Principia Mathematica *11.61  *)
  39.110  schematic_goal "?p : (EX y. ALL x. P(x) --> Q(x,y)) --> (ALL x. P(x) --> (EX y. Q(x,y)))"
  39.111 -  by (tactic \<open>IntPr.fast_tac @{context} 1\<close>)
  39.112 +  by (tactic \<open>IntPr.fast_tac \<^context> 1\<close>)
  39.113  
  39.114  end
    40.1 --- a/src/FOLP/hypsubst.ML	Fri Jan 04 21:49:06 2019 +0100
    40.2 +++ b/src/FOLP/hypsubst.ML	Fri Jan 04 23:22:53 2019 +0100
    40.3 @@ -58,8 +58,8 @@
    40.4     assumption.  Returns the number of intervening assumptions, paried with
    40.5     the rule asm_rl (resp. sym). *)
    40.6  fun eq_var bnd =
    40.7 -  let fun eq_var_aux k (Const(@{const_name Pure.all},_) $ Abs(_,_,t)) = eq_var_aux k t
    40.8 -        | eq_var_aux k (Const(@{const_name Pure.imp},_) $ A $ B) =
    40.9 +  let fun eq_var_aux k (Const(\<^const_name>\<open>Pure.all\<close>,_) $ Abs(_,_,t)) = eq_var_aux k t
   40.10 +        | eq_var_aux k (Const(\<^const_name>\<open>Pure.imp\<close>,_) $ A $ B) =
   40.11                ((k, inspect_pair bnd (dest_eq A))
   40.12                        (*Exception Match comes from inspect_pair or dest_eq*)
   40.13                 handle Match => eq_var_aux (k+1) B)
    41.1 --- a/src/FOLP/simp.ML	Fri Jan 04 21:49:06 2019 +0100
    41.2 +++ b/src/FOLP/simp.ML	Fri Jan 04 23:22:53 2019 +0100
    41.3 @@ -399,10 +399,10 @@
    41.4      else ();
    41.5  
    41.6  (* Skip the first n hyps of a goal, and return the rest in generalized form *)
    41.7 -fun strip_varify(Const(@{const_name Pure.imp}, _) $ H $ B, n, vs) =
    41.8 +fun strip_varify(Const(\<^const_name>\<open>Pure.imp\<close>, _) $ H $ B, n, vs) =
    41.9          if n=0 then subst_bounds(vs,H)::strip_varify(B,0,vs)
   41.10          else strip_varify(B,n-1,vs)
   41.11 -  | strip_varify(Const(@{const_name Pure.all},_)$Abs(_,T,t), n, vs) =
   41.12 +  | strip_varify(Const(\<^const_name>\<open>Pure.all\<close>,_)$Abs(_,T,t), n, vs) =
   41.13          strip_varify(t,n,Var(("?",length vs),T)::vs)
   41.14    | strip_varify  _  = [];
   41.15  
    42.1 --- a/src/FOLP/simpdata.ML	Fri Jan 04 21:49:06 2019 +0100
    42.2 +++ b/src/FOLP/simpdata.ML	Fri Jan 04 23:22:53 2019 +0100
    42.3 @@ -17,18 +17,18 @@
    42.4  (* Conversion into rewrite rules *)
    42.5  
    42.6  fun mk_eq th = case Thm.concl_of th of
    42.7 -      _ $ (Const (@{const_name iff}, _) $ _ $ _) $ _ => th
    42.8 -    | _ $ (Const (@{const_name eq}, _) $ _ $ _) $ _ => th
    42.9 -    | _ $ (Const (@{const_name Not}, _) $ _) $ _ => th RS @{thm not_P_imp_P_iff_F}
   42.10 +      _ $ (Const (\<^const_name>\<open>iff\<close>, _) $ _ $ _) $ _ => th
   42.11 +    | _ $ (Const (\<^const_name>\<open>eq\<close>, _) $ _ $ _) $ _ => th
   42.12 +    | _ $ (Const (\<^const_name>\<open>Not\<close>, _) $ _) $ _ => th RS @{thm not_P_imp_P_iff_F}
   42.13      | _ => make_iff_T th;
   42.14  
   42.15  
   42.16  val mksimps_pairs =
   42.17 -  [(@{const_name imp}, [@{thm mp}]),
   42.18 -   (@{const_name conj}, [@{thm conjunct1}, @{thm conjunct2}]),
   42.19 -   (@{const_name "All"}, [@{thm spec}]),
   42.20 -   (@{const_name True}, []),
   42.21 -   (@{const_name False}, [])];
   42.22 +  [(\<^const_name>\<open>imp\<close>, [@{thm mp}]),
   42.23 +   (\<^const_name>\<open>conj\<close>, [@{thm conjunct1}, @{thm conjunct2}]),
   42.24 +   (\<^const_name>\<open>All\<close>, [@{thm spec}]),
   42.25 +   (\<^const_name>\<open>True\<close>, []),
   42.26 +   (\<^const_name>\<open>False\<close>, [])];
   42.27  
   42.28  fun mk_atomize pairs =
   42.29    let fun atoms th =
   42.30 @@ -78,9 +78,9 @@
   42.31  
   42.32  val auto_ss = empty_ss setauto (fn ctxt => ares_tac ctxt @{thms TrueI});
   42.33  
   42.34 -val IFOLP_ss = auto_ss addcongs FOLP_congs |> fold (addrew @{context}) IFOLP_rews;
   42.35 +val IFOLP_ss = auto_ss addcongs FOLP_congs |> fold (addrew \<^context>) IFOLP_rews;
   42.36  
   42.37  
   42.38  val FOLP_rews = IFOLP_rews @ @{thms cla_rews};
   42.39  
   42.40 -val FOLP_ss = auto_ss addcongs FOLP_congs |> fold (addrew @{context}) FOLP_rews;
   42.41 +val FOLP_ss = auto_ss addcongs FOLP_congs |> fold (addrew \<^context>) FOLP_rews;
    43.1 --- a/src/HOL/BNF_Wellorder_Relation.thy	Fri Jan 04 21:49:06 2019 +0100
    43.2 +++ b/src/HOL/BNF_Wellorder_Relation.thy	Fri Jan 04 23:22:53 2019 +0100
    43.3 @@ -22,7 +22,7 @@
    43.4  begin
    43.5  
    43.6  text\<open>The following context encompasses all this section. In other words,
    43.7 -for the whole section, we consider a fixed well-order relation @{term "r"}.\<close>
    43.8 +for the whole section, we consider a fixed well-order relation \<^term>\<open>r\<close>.\<close>
    43.9  
   43.10  (* context wo_rel  *)
   43.11  
    44.1 --- a/src/HOL/Binomial.thy	Fri Jan 04 21:49:06 2019 +0100
    44.2 +++ b/src/HOL/Binomial.thy	Fri Jan 04 23:22:53 2019 +0100
    44.3 @@ -425,7 +425,7 @@
    44.4    by (simp add: gbinomial_binomial [symmetric] of_nat_gbinomial)
    44.5  
    44.6  setup
    44.7 -  \<open>Sign.add_const_constraint (@{const_name gbinomial}, SOME @{typ "'a::field_char_0 \<Rightarrow> nat \<Rightarrow> 'a"})\<close>
    44.8 +  \<open>Sign.add_const_constraint (\<^const_name>\<open>gbinomial\<close>, SOME \<^typ>\<open>'a::field_char_0 \<Rightarrow> nat \<Rightarrow> 'a\<close>)\<close>
    44.9  
   44.10  lemma gbinomial_mult_1:
   44.11    fixes a :: "'a::field_char_0"
   44.12 @@ -622,7 +622,7 @@
   44.13  qed
   44.14  
   44.15  text \<open>Contributed by Manuel Eberl, generalised by LCP.
   44.16 -  Alternative definition of the binomial coefficient as @{term "\<Prod>i<k. (n - i) / (k - i)"}.\<close>
   44.17 +  Alternative definition of the binomial coefficient as \<^term>\<open>\<Prod>i<k. (n - i) / (k - i)\<close>.\<close>
   44.18  lemma gbinomial_altdef_of_nat: "a gchoose k = (\<Prod>i = 0..<k. (a - of_nat i) / of_nat (k - i) :: 'a)"
   44.19    for k :: nat and a :: "'a::field_char_0"
   44.20    by (simp add: prod_dividef gbinomial_prod_rev fact_prod_rev)
   44.21 @@ -1142,7 +1142,7 @@
   44.22    finally show ?thesis ..
   44.23  qed
   44.24  
   44.25 -text \<open>The number of nat lists of length \<open>m\<close> summing to \<open>N\<close> is @{term "(N + m - 1) choose N"}:\<close>
   44.26 +text \<open>The number of nat lists of length \<open>m\<close> summing to \<open>N\<close> is \<^term>\<open>(N + m - 1) choose N\<close>:\<close>
   44.27  lemma card_length_sum_list_rec:
   44.28    assumes "m \<ge> 1"
   44.29    shows "card {l::nat list. length l = m \<and> sum_list l = N} =
    45.1 --- a/src/HOL/Code_Numeral.thy	Fri Jan 04 21:49:06 2019 +0100
    45.2 +++ b/src/HOL/Code_Numeral.thy	Fri Jan 04 23:22:53 2019 +0100
    45.3 @@ -668,8 +668,8 @@
    45.4  
    45.5  setup \<open>
    45.6    fold (fn target =>
    45.7 -    Numeral.add_code @{const_name Code_Numeral.Pos} I Code_Printer.literal_numeral target
    45.8 -    #> Numeral.add_code @{const_name Code_Numeral.Neg} (~) Code_Printer.literal_numeral target)
    45.9 +    Numeral.add_code \<^const_name>\<open>Code_Numeral.Pos\<close> I Code_Printer.literal_numeral target
   45.10 +    #> Numeral.add_code \<^const_name>\<open>Code_Numeral.Neg\<close> (~) Code_Printer.literal_numeral target)
   45.11      ["SML", "OCaml", "Haskell", "Scala"]
   45.12  \<close>
   45.13  
    46.1 --- a/src/HOL/Complete_Lattices.thy	Fri Jan 04 21:49:06 2019 +0100
    46.2 +++ b/src/HOL/Complete_Lattices.thy	Fri Jan 04 23:22:53 2019 +0100
    46.3 @@ -615,7 +615,7 @@
    46.4  
    46.5  end
    46.6  
    46.7 -subsection \<open>Complete lattice on @{typ bool}\<close>
    46.8 +subsection \<open>Complete lattice on \<^typ>\<open>bool\<close>\<close>
    46.9  
   46.10  instantiation bool :: complete_lattice
   46.11  begin
   46.12 @@ -644,7 +644,7 @@
   46.13  instance bool :: complete_boolean_algebra
   46.14    by (standard, fastforce)
   46.15  
   46.16 -subsection \<open>Complete lattice on @{typ "_ \<Rightarrow> _"}\<close>
   46.17 +subsection \<open>Complete lattice on \<^typ>\<open>_ \<Rightarrow> _\<close>\<close>
   46.18  
   46.19  instantiation "fun" :: (type, Inf) Inf
   46.20  begin
   46.21 @@ -763,7 +763,7 @@
   46.22    using assms by auto
   46.23  
   46.24  
   46.25 -subsection \<open>Complete lattice on @{typ "_ set"}\<close>
   46.26 +subsection \<open>Complete lattice on \<^typ>\<open>_ set\<close>\<close>
   46.27  
   46.28  instantiation "set" :: (type) complete_lattice
   46.29  begin
   46.30 @@ -798,9 +798,9 @@
   46.31    by (simp add: Inter_eq)
   46.32  
   46.33  text \<open>
   46.34 -  \<^medskip> A ``destruct'' rule -- every @{term X} in @{term C}
   46.35 -  contains @{term A} as an element, but @{prop "A \<in> X"} can hold when
   46.36 -  @{prop "X \<in> C"} does not!  This rule is analogous to \<open>spec\<close>.
   46.37 +  \<^medskip> A ``destruct'' rule -- every \<^term>\<open>X\<close> in \<^term>\<open>C\<close>
   46.38 +  contains \<^term>\<open>A\<close> as an element, but \<^prop>\<open>A \<in> X\<close> can hold when
   46.39 +  \<^prop>\<open>X \<in> C\<close> does not!  This rule is analogous to \<open>spec\<close>.
   46.40  \<close>
   46.41  
   46.42  lemma InterD [elim, Pure.elim]: "A \<in> \<Inter>C \<Longrightarrow> X \<in> C \<Longrightarrow> A \<in> X"
   46.43 @@ -808,7 +808,7 @@
   46.44  
   46.45  lemma InterE [elim]: "A \<in> \<Inter>C \<Longrightarrow> (X \<notin> C \<Longrightarrow> R) \<Longrightarrow> (A \<in> X \<Longrightarrow> R) \<Longrightarrow> R"
   46.46    \<comment> \<open>``Classical'' elimination rule -- does not require proving
   46.47 -    @{prop "X \<in> C"}.\<close>
   46.48 +    \<^prop>\<open>X \<in> C\<close>.\<close>
   46.49    unfolding Inter_eq by blast
   46.50  
   46.51  lemma Inter_lower: "B \<in> A \<Longrightarrow> \<Inter>A \<subseteq> B"
   46.52 @@ -876,7 +876,7 @@
   46.53    by auto
   46.54  
   46.55  lemma INT_E [elim]: "b \<in> (\<Inter>x\<in>A. B x) \<Longrightarrow> (b \<in> B a \<Longrightarrow> R) \<Longrightarrow> (a \<notin> A \<Longrightarrow> R) \<Longrightarrow> R"
   46.56 -  \<comment> \<open>"Classical" elimination -- by the Excluded Middle on @{prop "a\<in>A"}.\<close>
   46.57 +  \<comment> \<open>"Classical" elimination -- by the Excluded Middle on \<^prop>\<open>a\<in>A\<close>.\<close>
   46.58    by auto
   46.59  
   46.60  lemma Collect_ball_eq: "{x. \<forall>y\<in>A. P x y} = (\<Inter>y\<in>A. {x. P x y})"
   46.61 @@ -949,8 +949,8 @@
   46.62    by (unfold Union_eq) blast
   46.63  
   46.64  lemma UnionI [intro]: "X \<in> C \<Longrightarrow> A \<in> X \<Longrightarrow> A \<in> \<Union>C"
   46.65 -  \<comment> \<open>The order of the premises presupposes that @{term C} is rigid;
   46.66 -    @{term A} may be flexible.\<close>
   46.67 +  \<comment> \<open>The order of the premises presupposes that \<^term>\<open>C\<close> is rigid;
   46.68 +    \<^term>\<open>A\<close> may be flexible.\<close>
   46.69    by auto
   46.70  
   46.71  lemma UnionE [elim!]: "A \<in> \<Union>C \<Longrightarrow> (\<And>X. A \<in> X \<Longrightarrow> X \<in> C \<Longrightarrow> R) \<Longrightarrow> R"
   46.72 @@ -1023,7 +1023,7 @@
   46.73  text \<open>
   46.74    Note the difference between ordinary syntax of indexed
   46.75    unions and intersections (e.g.\ \<open>\<Union>a\<^sub>1\<in>A\<^sub>1. B\<close>)
   46.76 -  and their \LaTeX\ rendition: @{term"\<Union>a\<^sub>1\<in>A\<^sub>1. B"}.
   46.77 +  and their \LaTeX\ rendition: \<^term>\<open>\<Union>a\<^sub>1\<in>A\<^sub>1. B\<close>.
   46.78  \<close>
   46.79  
   46.80  lemma disjoint_UN_iff: "disjnt A (\<Union>i\<in>I. B i) \<longleftrightarrow> (\<forall>i\<in>I. disjnt A (B i))"
   46.81 @@ -1045,8 +1045,8 @@
   46.82    using Union_iff [of _ "B ` A"] by simp
   46.83  
   46.84  lemma UN_I [intro]: "a \<in> A \<Longrightarrow> b \<in> B a \<Longrightarrow> b \<in> (\<Union>x\<in>A. B x)"
   46.85 -  \<comment> \<open>The order of the premises presupposes that @{term A} is rigid;
   46.86 -    @{term b} may be flexible.\<close>
   46.87 +  \<comment> \<open>The order of the premises presupposes that \<^term>\<open>A\<close> is rigid;
   46.88 +    \<^term>\<open>b\<close> may be flexible.\<close>
   46.89    by auto
   46.90  
   46.91  lemma UN_E [elim!]: "b \<in> (\<Union>x\<in>A. B x) \<Longrightarrow> (\<And>x. x\<in>A \<Longrightarrow> b \<in> B x \<Longrightarrow> R) \<Longrightarrow> R"
    47.1 --- a/src/HOL/Complete_Partial_Order.thy	Fri Jan 04 21:49:06 2019 +0100
    47.2 +++ b/src/HOL/Complete_Partial_Order.thy	Fri Jan 04 23:22:53 2019 +0100
    47.3 @@ -11,7 +11,7 @@
    47.4  
    47.5  subsection \<open>Monotone functions\<close>
    47.6  
    47.7 -text \<open>Dictionary-passing version of @{const Orderings.mono}.\<close>
    47.8 +text \<open>Dictionary-passing version of \<^const>\<open>Orderings.mono\<close>.\<close>
    47.9  
   47.10  definition monotone :: "('a \<Rightarrow> 'a \<Rightarrow> bool) \<Rightarrow> ('b \<Rightarrow> 'b \<Rightarrow> bool) \<Rightarrow> ('a \<Rightarrow> 'b) \<Rightarrow> bool"
   47.11    where "monotone orda ordb f \<longleftrightarrow> (\<forall>x y. orda x y \<longrightarrow> ordb (f x) (f y))"
    48.1 --- a/src/HOL/Conditionally_Complete_Lattices.thy	Fri Jan 04 21:49:06 2019 +0100
    48.2 +++ b/src/HOL/Conditionally_Complete_Lattices.thy	Fri Jan 04 23:22:53 2019 +0100
    48.3 @@ -170,8 +170,8 @@
    48.4  
    48.5  text \<open>
    48.6  
    48.7 -To avoid name classes with the @{class complete_lattice}-class we prefix @{const Sup} and
    48.8 -@{const Inf} in theorem names with c.
    48.9 +To avoid name classes with the \<^class>\<open>complete_lattice\<close>-class we prefix \<^const>\<open>Sup\<close> and
   48.10 +\<^const>\<open>Inf\<close> in theorem names with c.
   48.11  
   48.12  \<close>
   48.13  
    49.1 --- a/src/HOL/Deriv.thy	Fri Jan 04 21:49:06 2019 +0100
    49.2 +++ b/src/HOL/Deriv.thy	Fri Jan 04 23:22:53 2019 +0100
    49.3 @@ -20,10 +20,10 @@
    49.4      ((\<lambda>y. ((f y - f (Lim F (\<lambda>x. x))) - f' (y - Lim F (\<lambda>x. x))) /\<^sub>R norm (y - Lim F (\<lambda>x. x))) \<longlongrightarrow> 0) F"
    49.5  
    49.6  text \<open>
    49.7 -  Usually the filter @{term F} is @{term "at x within s"}.  @{term "(f has_derivative D)
    49.8 -  (at x within s)"} means: @{term D} is the derivative of function @{term f} at point @{term x}
    49.9 -  within the set @{term s}. Where @{term s} is used to express left or right sided derivatives. In
   49.10 -  most cases @{term s} is either a variable or @{term UNIV}.
   49.11 +  Usually the filter \<^term>\<open>F\<close> is \<^term>\<open>at x within s\<close>.  \<^term>\<open>(f has_derivative D)
   49.12 +  (at x within s)\<close> means: \<^term>\<open>D\<close> is the derivative of function \<^term>\<open>f\<close> at point \<^term>\<open>x\<close>
   49.13 +  within the set \<^term>\<open>s\<close>. Where \<^term>\<open>s\<close> is used to express left or right sided derivatives. In
   49.14 +  most cases \<^term>\<open>s\<close> is either a variable or \<^term>\<open>UNIV\<close>.
   49.15  \<close>
   49.16  
   49.17  text \<open>These are the only cases we'll care about, probably.\<close>
   49.18 @@ -60,7 +60,7 @@
   49.19      Global_Theory.add_thms_dynamic
   49.20        (\<^binding>\<open>derivative_eq_intros\<close>,
   49.21          fn context =>
   49.22 -          Named_Theorems.get (Context.proof_of context) @{named_theorems derivative_intros}
   49.23 +          Named_Theorems.get (Context.proof_of context) \<^named_theorems>\<open>derivative_intros\<close>
   49.24            |> map_filter eq_rule)
   49.25    end
   49.26  \<close>
   49.27 @@ -510,7 +510,7 @@
   49.28  subsection \<open>Uniqueness\<close>
   49.29  
   49.30  text \<open>
   49.31 -This can not generally shown for @{const has_derivative}, as we need to approach the point from
   49.32 +This can not generally shown for \<^const>\<open>has_derivative\<close>, as we need to approach the point from
   49.33  all directions. There is a proof in \<open>Analysis\<close> for \<open>euclidean_space\<close>.
   49.34  \<close>
   49.35  
   49.36 @@ -1107,7 +1107,7 @@
   49.37  
   49.38  subsection \<open>Local extrema\<close>
   49.39  
   49.40 -text \<open>If @{term "0 < f' x"} then @{term x} is Locally Strictly Increasing At The Right.\<close>
   49.41 +text \<open>If \<^term>\<open>0 < f' x\<close> then \<^term>\<open>x\<close> is Locally Strictly Increasing At The Right.\<close>
   49.42  
   49.43  lemma has_real_derivative_pos_inc_right:
   49.44    fixes f :: "real \<Rightarrow> real"
   49.45 @@ -1273,10 +1273,10 @@
   49.46    by (force dest: lemma_interval_lt)
   49.47  
   49.48  text \<open>Rolle's Theorem.
   49.49 -   If @{term f} is defined and continuous on the closed interval
   49.50 +   If \<^term>\<open>f\<close> is defined and continuous on the closed interval
   49.51     \<open>[a,b]\<close> and differentiable on the open interval \<open>(a,b)\<close>,
   49.52 -   and @{term "f a = f b"},
   49.53 -   then there exists \<open>x0 \<in> (a,b)\<close> such that @{term "f' x0 = 0"}\<close>
   49.54 +   and \<^term>\<open>f a = f b\<close>,
   49.55 +   then there exists \<open>x0 \<in> (a,b)\<close> such that \<^term>\<open>f' x0 = 0\<close>\<close>
   49.56  theorem Rolle_deriv:
   49.57    fixes f :: "real \<Rightarrow> real"
   49.58    assumes "a < b"
   49.59 @@ -1301,7 +1301,7 @@
   49.60    then show ?thesis
   49.61    proof cases
   49.62      case 1
   49.63 -    \<comment> \<open>@{term f} attains its maximum within the interval\<close>
   49.64 +    \<comment> \<open>\<^term>\<open>f\<close> attains its maximum within the interval\<close>
   49.65      then obtain l where der: "DERIV f x :> l"
   49.66        using derf differentiable_def real_differentiable_def by blast
   49.67      obtain d where d: "0 < d" and bound: "\<forall>y. \<bar>x - y\<bar> < d \<longrightarrow> a \<le> y \<and> y \<le> b"
   49.68 @@ -1321,7 +1321,7 @@
   49.69      then show ?thesis
   49.70      proof cases
   49.71        case 1
   49.72 -        \<comment> \<open>@{term f} attains its minimum within the interval\<close>
   49.73 +        \<comment> \<open>\<^term>\<open>f\<close> attains its minimum within the interval\<close>
   49.74        then obtain l where der: "DERIV f x' :> l"
   49.75          using derf differentiable_def real_differentiable_def by blast 
   49.76        from lemma_interval [OF 1]
   49.77 @@ -1335,7 +1335,7 @@
   49.78          by (metis has_derivative_unique has_field_derivative_def mult_zero_left)
   49.79      next
   49.80        case 2
   49.81 -        \<comment> \<open>@{term f} is constant throughout the interval\<close>
   49.82 +        \<comment> \<open>\<^term>\<open>f\<close> is constant throughout the interval\<close>
   49.83        then have fx': "f b = f x'" by (auto simp: fab)
   49.84        from dense [OF \<open>a < b\<close>] obtain r where r: "a < r" "r < b" by blast
   49.85        obtain d where d: "0 < d" and bound: "\<forall>y. \<bar>r - y\<bar> < d \<longrightarrow> a \<le> y \<and> y \<le> b"
    50.1 --- a/src/HOL/Divides.thy	Fri Jan 04 21:49:06 2019 +0100
    50.2 +++ b/src/HOL/Divides.thy	Fri Jan 04 23:22:53 2019 +0100
    50.3 @@ -354,7 +354,7 @@
    50.4  lemmas zmod_eq_0D [dest!] = zmod_eq_0_iff [THEN iffD1]
    50.5  
    50.6  
    50.7 -subsubsection \<open>Proving  @{term "a div (b * c) = (a div b) div c"}\<close>
    50.8 +subsubsection \<open>Proving  \<^term>\<open>a div (b * c) = (a div b) div c\<close>\<close>
    50.9  
   50.10  (*The condition c>0 seems necessary.  Consider that 7 div ~6 = ~2 but
   50.11    7 div 2 div ~3 = 3 div ~3 = ~1.  The subcase (a div b) mod c = 0 seems
   50.12 @@ -495,9 +495,9 @@
   50.13      by (auto simp add: split_pos_lemma [of concl: "\<lambda>x y. P y"] split_neg_lemma [of concl: "\<lambda>x y. P y"])
   50.14  qed auto
   50.15  
   50.16 -text \<open>Enable (lin)arith to deal with @{const divide} and @{const modulo}
   50.17 +text \<open>Enable (lin)arith to deal with \<^const>\<open>divide\<close> and \<^const>\<open>modulo\<close>
   50.18    when these are applied to some constant that is of the form
   50.19 -  @{term "numeral k"}:\<close>
   50.20 +  \<^term>\<open>numeral k\<close>:\<close>
   50.21  declare split_zdiv [of _ _ "numeral k", arith_split] for k
   50.22  declare split_zmod [of _ _ "numeral k", arith_split] for k
   50.23  
   50.24 @@ -1257,7 +1257,7 @@
   50.25     "- numeral a div numeral b :: int" | "- numeral a mod numeral b :: int" |
   50.26     "- numeral a div - numeral b :: int" | "- numeral a mod - numeral b :: int") =
   50.27  \<open> let
   50.28 -    val if_cong = the (Code.get_case_cong @{theory} @{const_name If});
   50.29 +    val if_cong = the (Code.get_case_cong \<^theory> \<^const_name>\<open>If\<close>);
   50.30      fun successful_rewrite ctxt ct =
   50.31        let
   50.32          val thm = Simplifier.rewrite ctxt ct
    51.1 --- a/src/HOL/Eisbach/Eisbach_Tools.thy	Fri Jan 04 21:49:06 2019 +0100
    51.2 +++ b/src/HOL/Eisbach/Eisbach_Tools.thy	Fri Jan 04 23:22:53 2019 +0100
    51.3 @@ -27,17 +27,17 @@
    51.4  
    51.5  val _ =
    51.6    Theory.setup
    51.7 -   (setup_trace_method @{binding print_fact}
    51.8 +   (setup_trace_method \<^binding>\<open>print_fact\<close>
    51.9        (Scan.lift (Scan.ahead Parse.not_eof) -- Attrib.thms)
   51.10        (fn ctxt => fn (tok, thms) =>
   51.11          (* FIXME proper formatting!? *)
   51.12          Token.unparse tok ^ ": " ^ commas (map (Thm.string_of_thm ctxt) thms)) #>
   51.13 -    setup_trace_method @{binding print_term}
   51.14 +    setup_trace_method \<^binding>\<open>print_term\<close>
   51.15        (Scan.lift (Scan.ahead Parse.not_eof) -- Args.term)
   51.16        (fn ctxt => fn (tok, t) =>
   51.17          (* FIXME proper formatting!? *)
   51.18          Token.unparse tok ^ ": " ^ Syntax.string_of_term ctxt t) #>
   51.19 -    setup_trace_method @{binding print_type}
   51.20 +    setup_trace_method \<^binding>\<open>print_type\<close>
   51.21        (Scan.lift (Scan.ahead Parse.not_eof) -- Args.typ)
   51.22        (fn ctxt => fn (tok, t) =>
   51.23          (* FIXME proper formatting!? *)
    52.1 --- a/src/HOL/Eisbach/eisbach_rule_insts.ML	Fri Jan 04 21:49:06 2019 +0100
    52.2 +++ b/src/HOL/Eisbach/eisbach_rule_insts.ML	Fri Jan 04 23:22:53 2019 +0100
    52.3 @@ -199,7 +199,7 @@
    52.4  
    52.5  val _ =
    52.6    Theory.setup
    52.7 -    (Attrib.setup @{binding "where"}
    52.8 +    (Attrib.setup \<^binding>\<open>where\<close>
    52.9        (Scan.lift
   52.10          (Parse.and_list1 (Args.var -- (Args.$$$ "=" |-- Parse_Tools.name_term)) -- Parse.for_fixes)
   52.11          >> (fn args =>
   52.12 @@ -211,7 +211,7 @@
   52.13  
   52.14  val _ =
   52.15    Theory.setup
   52.16 -    (Attrib.setup @{binding "of"}
   52.17 +    (Attrib.setup \<^binding>\<open>of\<close>
   52.18        (Scan.lift
   52.19          (Args.mode "unchecked" --
   52.20            (Scan.repeat (Scan.unless concl inst) --
    53.1 --- a/src/HOL/Eisbach/match_method.ML	Fri Jan 04 21:49:06 2019 +0100
    53.2 +++ b/src/HOL/Eisbach/match_method.ML	Fri Jan 04 23:22:53 2019 +0100
    53.3 @@ -44,9 +44,9 @@
    53.4  val aconv_net = Item_Net.init (op aconv) single;
    53.5  
    53.6  val parse_match_kind =
    53.7 -  Scan.lift @{keyword "conclusion"} >> K Match_Concl ||
    53.8 -  Scan.lift (@{keyword "premises"} |-- Args.mode "local") >> Match_Prems ||
    53.9 -  Scan.lift (@{keyword "("}) |-- Args.term --| Scan.lift (@{keyword ")"}) >>
   53.10 +  Scan.lift \<^keyword>\<open>conclusion\<close> >> K Match_Concl ||
   53.11 +  Scan.lift (\<^keyword>\<open>premises\<close> |-- Args.mode "local") >> Match_Prems ||
   53.12 +  Scan.lift (\<^keyword>\<open>(\<close>) |-- Args.term --| Scan.lift (\<^keyword>\<open>)\<close>) >>
   53.13      (fn t => Match_Term (Item_Net.update t aconv_net)) ||
   53.14    Attrib.thms >> (fn thms => Match_Fact (fold Item_Net.update thms Thm.full_rules));
   53.15  
   53.16 @@ -62,10 +62,10 @@
   53.17  
   53.18  val fixes =
   53.19    Parse.and_list1 (Scan.repeat1 (Parse.position bound_term) --
   53.20 -    Scan.option (@{keyword "::"} |-- Parse.!!! Parse.typ)
   53.21 +    Scan.option (\<^keyword>\<open>::\<close> |-- Parse.!!! Parse.typ)
   53.22      >> (fn (xs, T) => map (fn (x, pos) => ((x, T), pos)) xs)) >> flat;
   53.23  
   53.24 -val for_fixes = Scan.optional (@{keyword "for"} |-- fixes) [];
   53.25 +val for_fixes = Scan.optional (\<^keyword>\<open>for\<close> |-- fixes) [];
   53.26  
   53.27  fun pos_of dyn = Parse_Tools.the_parse_val dyn |> Binding.pos_of;
   53.28  
   53.29 @@ -95,7 +95,7 @@
   53.30          else
   53.31            let val b = #1 (the opt_dyn)
   53.32            in error ("Cannot bind fact name in term match" ^ Position.here (pos_of b)) end)) --
   53.33 -  Scan.lift (for_fixes -- (@{keyword "\<Rightarrow>"} |-- Parse.token Parse.text))
   53.34 +  Scan.lift (for_fixes -- (\<^keyword>\<open>\<Rightarrow>\<close> |-- Parse.token Parse.text))
   53.35    >> (fn ((ctxt, ts), (fixes, body)) =>
   53.36      (case Token.get_value body of
   53.37        SOME (Token.Source src) =>
   53.38 @@ -124,11 +124,11 @@
   53.39            fun drop_judgment_dummy t =
   53.40              (case t of
   53.41                Const (judgment, _) $
   53.42 -                (Const (@{syntax_const "_type_constraint_"}, T) $
   53.43 -                  Const (@{const_name Pure.dummy_pattern}, _)) =>
   53.44 +                (Const (\<^syntax_const>\<open>_type_constraint_\<close>, T) $
   53.45 +                  Const (\<^const_name>\<open>Pure.dummy_pattern\<close>, _)) =>
   53.46                  if judgment = Object_Logic.judgment_name ctxt then
   53.47 -                    Const (@{syntax_const "_type_constraint_"}, T) $
   53.48 -                      Const (@{const_name Pure.dummy_pattern}, propT)
   53.49 +                    Const (\<^syntax_const>\<open>_type_constraint_\<close>, T) $
   53.50 +                      Const (\<^const_name>\<open>Pure.dummy_pattern\<close>, propT)
   53.51                  else t
   53.52              | t1 $ t2 => drop_judgment_dummy t1 $ drop_judgment_dummy t2
   53.53              | Abs (a, T, b) => Abs (a, T, drop_judgment_dummy b)
   53.54 @@ -400,7 +400,7 @@
   53.55  (*TODO: Preliminary analysis to see if we're trying to clear in a non-focus match?*)
   53.56  val _ =
   53.57    Theory.setup
   53.58 -    (Attrib.setup @{binding "thin"}
   53.59 +    (Attrib.setup \<^binding>\<open>thin\<close>
   53.60        (Scan.succeed
   53.61          (Thm.declaration_attribute (fn th => Context.mapping I (remove_focus_prem th))))
   53.62          "clear premise inside match method");
   53.63 @@ -730,9 +730,9 @@
   53.64  
   53.65  val _ =
   53.66    Theory.setup
   53.67 -    (Method.setup @{binding match}
   53.68 +    (Method.setup \<^binding>\<open>match\<close>
   53.69        (parse_match_kind :--
   53.70 -        (fn kind => Scan.lift @{keyword "in"} |-- Parse.enum1' "\<bar>" (parse_named_pats kind)) >>
   53.71 +        (fn kind => Scan.lift \<^keyword>\<open>in\<close> |-- Parse.enum1' "\<bar>" (parse_named_pats kind)) >>
   53.72          (fn (matches, bodies) => fn ctxt =>
   53.73            CONTEXT_METHOD (fn using => Method.RUNTIME (fn (goal_ctxt, st) =>
   53.74              let
    54.1 --- a/src/HOL/Eisbach/method_closure.ML	Fri Jan 04 21:49:06 2019 +0100
    54.2 +++ b/src/HOL/Eisbach/method_closure.ML	Fri Jan 04 23:22:53 2019 +0100
    54.3 @@ -239,12 +239,12 @@
    54.4  end;
    54.5  
    54.6  val _ =
    54.7 -  Outer_Syntax.local_theory @{command_keyword method} "Eisbach method definition"
    54.8 +  Outer_Syntax.local_theory \<^command_keyword>\<open>method\<close> "Eisbach method definition"
    54.9      (Parse.binding -- Parse.for_fixes --
   54.10 -      ((Scan.optional (@{keyword "methods"} |-- Parse.!!! (Scan.repeat1 Parse.binding)) []) --
   54.11 -        (Scan.optional (@{keyword "uses"} |-- Parse.!!! (Scan.repeat1 Parse.binding)) [])) --
   54.12 -      (Scan.optional (@{keyword "declares"} |-- Parse.!!! (Scan.repeat1 Parse.binding)) []) --
   54.13 -      Parse.!!! (@{keyword "="} |-- Parse.args1 (K true)) >>
   54.14 +      ((Scan.optional (\<^keyword>\<open>methods\<close> |-- Parse.!!! (Scan.repeat1 Parse.binding)) []) --
   54.15 +        (Scan.optional (\<^keyword>\<open>uses\<close> |-- Parse.!!! (Scan.repeat1 Parse.binding)) [])) --
   54.16 +      (Scan.optional (\<^keyword>\<open>declares\<close> |-- Parse.!!! (Scan.repeat1 Parse.binding)) []) --
   54.17 +      Parse.!!! (\<^keyword>\<open>=\<close> |-- Parse.args1 (K true)) >>
   54.18        (fn ((((name, vars), (methods, uses)), declares), src) =>
   54.19          #2 o method_cmd name vars uses declares methods src));
   54.20  
    55.1 --- a/src/HOL/Enum.thy	Fri Jan 04 21:49:06 2019 +0100
    55.2 +++ b/src/HOL/Enum.thy	Fri Jan 04 23:22:53 2019 +0100
    55.3 @@ -52,7 +52,7 @@
    55.4  end
    55.5  
    55.6  
    55.7 -subsection \<open>Implementations using @{class enum}\<close>
    55.8 +subsection \<open>Implementations using \<^class>\<open>enum\<close>\<close>
    55.9  
   55.10  subsubsection \<open>Unbounded operations and quantifiers\<close>
   55.11  
   55.12 @@ -241,7 +241,7 @@
   55.13    by (simp add: card_UNIV_def acc_bacc_eq)
   55.14  
   55.15  
   55.16 -subsection \<open>Default instances for @{class enum}\<close>
   55.17 +subsection \<open>Default instances for \<^class>\<open>enum\<close>\<close>
   55.18  
   55.19  lemma map_of_zip_enum_is_Some:
   55.20    assumes "length ys = length (enum :: 'a::enum list)"
   55.21 @@ -566,7 +566,7 @@
   55.22  simproc_setup finite_1_eq ("x::finite_1") = \<open>
   55.23    fn _ => fn _ => fn ct =>
   55.24      (case Thm.term_of ct of
   55.25 -      Const (@{const_name a\<^sub>1}, _) => NONE
   55.26 +      Const (\<^const_name>\<open>a\<^sub>1\<close>, _) => NONE
   55.27      | _ => SOME (mk_meta_eq @{thm finite_1_eq}))
   55.28  \<close>
   55.29  
   55.30 @@ -993,8 +993,8 @@
   55.31  
   55.32  instantiation finite_4 :: finite_distrib_lattice begin
   55.33  
   55.34 -text \<open>@{term a\<^sub>1} $<$ @{term a\<^sub>2},@{term a\<^sub>3} $<$ @{term a\<^sub>4},
   55.35 -  but @{term a\<^sub>2} and @{term a\<^sub>3} are incomparable.\<close>
   55.36 +text \<open>\<^term>\<open>a\<^sub>1\<close> $<$ \<^term>\<open>a\<^sub>2\<close>,\<^term>\<open>a\<^sub>3\<close> $<$ \<^term>\<open>a\<^sub>4\<close>,
   55.37 +  but \<^term>\<open>a\<^sub>2\<close> and \<^term>\<open>a\<^sub>3\<close> are incomparable.\<close>
   55.38  
   55.39  definition
   55.40    "x < y \<longleftrightarrow> (case (x, y) of
    56.1 --- a/src/HOL/Euclidean_Division.thy	Fri Jan 04 21:49:06 2019 +0100
    56.2 +++ b/src/HOL/Euclidean_Division.thy	Fri Jan 04 23:22:53 2019 +0100
    56.3 @@ -761,7 +761,7 @@
    56.4  end
    56.5  
    56.6  
    56.7 -subsection \<open>Euclidean division on @{typ nat}\<close>
    56.8 +subsection \<open>Euclidean division on \<^typ>\<open>nat\<close>\<close>
    56.9  
   56.10  instantiation nat :: normalization_semidom
   56.11  begin
   56.12 @@ -889,10 +889,10 @@
   56.13  ML \<open>
   56.14  structure Cancel_Div_Mod_Nat = Cancel_Div_Mod
   56.15  (
   56.16 -  val div_name = @{const_name divide};
   56.17 -  val mod_name = @{const_name modulo};
   56.18 +  val div_name = \<^const_name>\<open>divide\<close>;
   56.19 +  val mod_name = \<^const_name>\<open>modulo\<close>;
   56.20    val mk_binop = HOLogic.mk_binop;
   56.21 -  val dest_plus = HOLogic.dest_bin @{const_name Groups.plus} HOLogic.natT;
   56.22 +  val dest_plus = HOLogic.dest_bin \<^const_name>\<open>Groups.plus\<close> HOLogic.natT;
   56.23    val mk_sum = Arith_Data.mk_sum;
   56.24    fun dest_sum tm =
   56.25      if HOLogic.is_zero tm then []
   56.26 @@ -1145,7 +1145,7 @@
   56.27      by (simp add: div_add1_eq [of m q k])
   56.28  qed
   56.29  
   56.30 -text \<open>Antimonotonicity of @{const divide} in second argument\<close>
   56.31 +text \<open>Antimonotonicity of \<^const>\<open>divide\<close> in second argument\<close>
   56.32  
   56.33  lemma div_le_mono2:
   56.34    "k div n \<le> k div m" if "0 < m" and "m \<le> n" for m n k :: nat
   56.35 @@ -1408,7 +1408,7 @@
   56.36  qed
   56.37  
   56.38  
   56.39 -subsection \<open>Euclidean division on @{typ int}\<close>
   56.40 +subsection \<open>Euclidean division on \<^typ>\<open>int\<close>\<close>
   56.41  
   56.42  instantiation int :: normalization_semidom
   56.43  begin
    57.1 --- a/src/HOL/Extraction.thy	Fri Jan 04 21:49:06 2019 +0100
    57.2 +++ b/src/HOL/Extraction.thy	Fri Jan 04 23:22:53 2019 +0100
    57.3 @@ -22,7 +22,7 @@
    57.4        Proofterm.rewrite_proof thy
    57.5          (RewriteHOLProof.rews,
    57.6           ProofRewriteRules.rprocs true @ [ProofRewriteRules.expand_of_class ctxt]) o
    57.7 -      ProofRewriteRules.elim_vars (curry Const @{const_name default})
    57.8 +      ProofRewriteRules.elim_vars (curry Const \<^const_name>\<open>default\<close>)
    57.9      end)
   57.10  \<close>
   57.11  
    58.1 --- a/src/HOL/Fields.thy	Fri Jan 04 21:49:06 2019 +0100
    58.2 +++ b/src/HOL/Fields.thy	Fri Jan 04 23:22:53 2019 +0100
    58.3 @@ -942,7 +942,7 @@
    58.4  apply (simp add: less_imp_not_eq nonzero_minus_divide_right [symmetric])
    58.5  done
    58.6  
    58.7 -text\<open>The last premise ensures that @{term a} and @{term b}
    58.8 +text\<open>The last premise ensures that \<^term>\<open>a\<close> and \<^term>\<open>b\<close>
    58.9        have the same sign\<close>
   58.10  lemma divide_strict_left_mono:
   58.11    "[|b < a; 0 < c; 0 < a*b|] ==> c / a < c / b"
   58.12 @@ -1268,7 +1268,7 @@
   58.13    finally show ?thesis .
   58.14  qed
   58.15  
   58.16 -text\<open>For creating values between @{term u} and @{term v}.\<close>
   58.17 +text\<open>For creating values between \<^term>\<open>u\<close> and \<^term>\<open>v\<close>.\<close>
   58.18  lemma scaling_mono:
   58.19    assumes "u \<le> v" "0 \<le> r" "r \<le> s"
   58.20      shows "u + r * (v - u) / s \<le> v"
    59.1 --- a/src/HOL/Filter.thy	Fri Jan 04 21:49:06 2019 +0100
    59.2 +++ b/src/HOL/Filter.thy	Fri Jan 04 23:22:53 2019 +0100
    59.3 @@ -251,8 +251,8 @@
    59.4  
    59.5  subsubsection \<open>Finer-than relation\<close>
    59.6  
    59.7 -text \<open>@{term "F \<le> F'"} means that filter @{term F} is finer than
    59.8 -filter @{term F'}.\<close>
    59.9 +text \<open>\<^term>\<open>F \<le> F'\<close> means that filter \<^term>\<open>F\<close> is finer than
   59.10 +filter \<^term>\<open>F'\<close>.\<close>
   59.11  
   59.12  instantiation filter :: (type) complete_lattice
   59.13  begin
   59.14 @@ -1395,7 +1395,7 @@
   59.15    unfolding filterlim_def
   59.16    by (rule order_trans[OF filtermap_Pair prod_filter_mono])
   59.17  
   59.18 -subsection \<open>Limits to @{const at_top} and @{const at_bot}\<close>
   59.19 +subsection \<open>Limits to \<^const>\<open>at_top\<close> and \<^const>\<open>at_bot\<close>\<close>
   59.20  
   59.21  lemma filterlim_at_top:
   59.22    fixes f :: "'a \<Rightarrow> ('b::linorder)"
   59.23 @@ -1527,7 +1527,7 @@
   59.24      by eventually_elim (insert n, auto)
   59.25  qed
   59.26  
   59.27 -subsection \<open>Setup @{typ "'a filter"} for lifting and transfer\<close>
   59.28 +subsection \<open>Setup \<^typ>\<open>'a filter\<close> for lifting and transfer\<close>
   59.29  
   59.30  lemma filtermap_id [simp, id_simps]: "filtermap id = id"
   59.31  by(simp add: fun_eq_iff id_def filtermap_ident)
    60.1 --- a/src/HOL/Finite_Set.thy	Fri Jan 04 21:49:06 2019 +0100
    60.2 +++ b/src/HOL/Finite_Set.thy	Fri Jan 04 23:22:53 2019 +0100
    60.3 @@ -777,7 +777,7 @@
    60.4  
    60.5  text \<open>
    60.6    A tempting alternative for the definiens is
    60.7 -  @{term "if finite A then THE y. fold_graph f z A y else e"}.
    60.8 +  \<^term>\<open>if finite A then THE y. fold_graph f z A y else e\<close>.
    60.9    It allows the removal of finiteness assumptions from the theorems
   60.10    \<open>fold_comm\<close>, \<open>fold_reindex\<close> and \<open>fold_distrib\<close>.
   60.11    The proofs become ugly. It is not worth the effort. (???)
   60.12 @@ -787,7 +787,7 @@
   60.13    by (induct rule: finite_induct) auto
   60.14  
   60.15  
   60.16 -subsubsection \<open>From @{const fold_graph} to @{term fold}\<close>
   60.17 +subsubsection \<open>From \<^const>\<open>fold_graph\<close> to \<^term>\<open>fold\<close>\<close>
   60.18  
   60.19  context comp_fun_commute
   60.20  begin
   60.21 @@ -868,7 +868,7 @@
   60.22  lemma (in -) fold_empty [simp]: "fold f z {} = z"
   60.23    by (auto simp: fold_def)
   60.24  
   60.25 -text \<open>The various recursion equations for @{const fold}:\<close>
   60.26 +text \<open>The various recursion equations for \<^const>\<open>fold\<close>:\<close>
   60.27  
   60.28  lemma fold_insert [simp]:
   60.29    assumes "finite A" and "x \<notin> A"
   60.30 @@ -933,7 +933,7 @@
   60.31  
   60.32  end
   60.33  
   60.34 -text \<open>Other properties of @{const fold}:\<close>
   60.35 +text \<open>Other properties of \<^const>\<open>fold\<close>:\<close>
   60.36  
   60.37  lemma fold_image:
   60.38    assumes "inj_on g A"
   60.39 @@ -1101,7 +1101,7 @@
   60.40  qed
   60.41  
   60.42  
   60.43 -subsubsection \<open>Expressing set operations via @{const fold}\<close>
   60.44 +subsubsection \<open>Expressing set operations via \<^const>\<open>fold\<close>\<close>
   60.45  
   60.46  lemma comp_fun_commute_const: "comp_fun_commute (\<lambda>_. f)"
   60.47    by standard rule
   60.48 @@ -1356,9 +1356,9 @@
   60.49  
   60.50  text \<open>
   60.51    The traditional definition
   60.52 -  @{prop "card A \<equiv> LEAST n. \<exists>f. A = {f i |i. i < n}"}
   60.53 +  \<^prop>\<open>card A \<equiv> LEAST n. \<exists>f. A = {f i |i. i < n}\<close>
   60.54    is ugly to work with.
   60.55 -  But now that we have @{const fold} things are easy:
   60.56 +  But now that we have \<^const>\<open>fold\<close> things are easy:
   60.57  \<close>
   60.58  
   60.59  global_interpretation card: folding "\<lambda>_. Suc" 0
    61.1 --- a/src/HOL/Fun.thy	Fri Jan 04 21:49:06 2019 +0100
    61.2 +++ b/src/HOL/Fun.thy	Fri Jan 04 23:22:53 2019 +0100
    61.3 @@ -856,16 +856,16 @@
    61.4  simproc_setup fun_upd2 ("f(v := w, x := y)") = \<open>fn _ =>
    61.5    let
    61.6      fun gen_fun_upd NONE T _ _ = NONE
    61.7 -      | gen_fun_upd (SOME f) T x y = SOME (Const (@{const_name fun_upd}, T) $ f $ x $ y)
    61.8 +      | gen_fun_upd (SOME f) T x y = SOME (Const (\<^const_name>\<open>fun_upd\<close>, T) $ f $ x $ y)
    61.9      fun dest_fun_T1 (Type (_, T :: Ts)) = T
   61.10 -    fun find_double (t as Const (@{const_name fun_upd},T) $ f $ x $ y) =
   61.11 +    fun find_double (t as Const (\<^const_name>\<open>fun_upd\<close>,T) $ f $ x $ y) =
   61.12        let
   61.13 -        fun find (Const (@{const_name fun_upd},T) $ g $ v $ w) =
   61.14 +        fun find (Const (\<^const_name>\<open>fun_upd\<close>,T) $ g $ v $ w) =
   61.15                if v aconv x then SOME g else gen_fun_upd (find g) T v w
   61.16            | find t = NONE
   61.17        in (dest_fun_T1 T, gen_fun_upd (find f) T x y) end
   61.18  
   61.19 -    val ss = simpset_of @{context}
   61.20 +    val ss = simpset_of \<^context>
   61.21  
   61.22      fun proc ctxt ct =
   61.23        let
    62.1 --- a/src/HOL/GCD.thy	Fri Jan 04 21:49:06 2019 +0100
    62.2 +++ b/src/HOL/GCD.thy	Fri Jan 04 23:22:53 2019 +0100
    62.3 @@ -1709,7 +1709,7 @@
    62.4  end
    62.5  
    62.6  
    62.7 -subsection \<open>GCD and LCM on @{typ nat} and @{typ int}\<close>
    62.8 +subsection \<open>GCD and LCM on \<^typ>\<open>nat\<close> and \<^typ>\<open>int\<close>\<close>
    62.9  
   62.10  instantiation nat :: gcd
   62.11  begin
   62.12 @@ -1893,7 +1893,7 @@
   62.13  declare gcd_nat.simps [simp del]
   62.14  
   62.15  text \<open>
   62.16 -  \<^medskip> @{term "gcd m n"} divides \<open>m\<close> and \<open>n\<close>.
   62.17 +  \<^medskip> \<^term>\<open>gcd m n\<close> divides \<open>m\<close> and \<open>n\<close>.
   62.18    The conjunctions don't seem provable separately.
   62.19  \<close>
   62.20  
   62.21 @@ -2368,7 +2368,7 @@
   62.22  qed
   62.23  
   62.24  
   62.25 -subsection \<open>LCM properties on @{typ nat} and @{typ int}\<close>
   62.26 +subsection \<open>LCM properties on \<^typ>\<open>nat\<close> and \<^typ>\<open>int\<close>\<close>
   62.27  
   62.28  lemma lcm_altdef_int [code]: "lcm a b = \<bar>a\<bar> * \<bar>b\<bar> div gcd a b"
   62.29    for a b :: int
   62.30 @@ -2445,7 +2445,7 @@
   62.31    by auto
   62.32  
   62.33  
   62.34 -subsection \<open>The complete divisibility lattice on @{typ nat} and @{typ int}\<close>
   62.35 +subsection \<open>The complete divisibility lattice on \<^typ>\<open>nat\<close> and \<^typ>\<open>int\<close>\<close>
   62.36  
   62.37  text \<open>
   62.38    Lifting \<open>gcd\<close> and \<open>lcm\<close> to sets (\<open>Gcd\<close> / \<open>Lcm\<close>).
   62.39 @@ -2670,7 +2670,7 @@
   62.40  qed simp_all
   62.41  
   62.42  
   62.43 -subsection \<open>GCD and LCM on @{typ integer}\<close>
   62.44 +subsection \<open>GCD and LCM on \<^typ>\<open>integer\<close>\<close>
   62.45  
   62.46  instantiation integer :: gcd
   62.47  begin
    63.1 --- a/src/HOL/Groebner_Basis.thy	Fri Jan 04 21:49:06 2019 +0100
    63.2 +++ b/src/HOL/Groebner_Basis.thy	Fri Jan 04 23:22:53 2019 +0100
    63.3 @@ -10,9 +10,9 @@
    63.4  
    63.5  subsection \<open>Groebner Bases\<close>
    63.6  
    63.7 -lemmas bool_simps = simp_thms(1-34) \<comment> \<open>FIXME move to @{theory HOL.HOL}\<close>
    63.8 +lemmas bool_simps = simp_thms(1-34) \<comment> \<open>FIXME move to \<^theory>\<open>HOL.HOL\<close>\<close>
    63.9  
   63.10 -lemma nnf_simps: \<comment> \<open>FIXME shadows fact binding in @{theory HOL.HOL}\<close>
   63.11 +lemma nnf_simps: \<comment> \<open>FIXME shadows fact binding in \<^theory>\<open>HOL.HOL\<close>\<close>
   63.12    "(\<not>(P \<and> Q)) = (\<not>P \<or> \<not>Q)" "(\<not>(P \<or> Q)) = (\<not>P \<and> \<not>Q)"
   63.13    "(P \<longrightarrow> Q) = (\<not>P \<or> Q)"
   63.14    "(P = Q) = ((P \<and> Q) \<or> (\<not>P \<and> \<not> Q))" "(\<not> \<not>(P)) = P"
    64.1 --- a/src/HOL/Groups.thy	Fri Jan 04 21:49:06 2019 +0100
    64.2 +++ b/src/HOL/Groups.thy	Fri Jan 04 23:22:53 2019 +0100
    64.3 @@ -167,8 +167,8 @@
    64.4  
    64.5  setup \<open>
    64.6    Reorient_Proc.add
    64.7 -    (fn Const(@{const_name Groups.zero}, _) => true
    64.8 -      | Const(@{const_name Groups.one}, _) => true
    64.9 +    (fn Const(\<^const_name>\<open>Groups.zero\<close>, _) => true
   64.10 +      | Const(\<^const_name>\<open>Groups.one\<close>, _) => true
   64.11        | _ => false)
   64.12  \<close>
   64.13  
   64.14 @@ -179,10 +179,10 @@
   64.15    let
   64.16      fun tr' c = (c, fn ctxt => fn T => fn ts =>
   64.17        if null ts andalso Printer.type_emphasis ctxt T then
   64.18 -        Syntax.const @{syntax_const "_constrain"} $ Syntax.const c $
   64.19 +        Syntax.const \<^syntax_const>\<open>_constrain\<close> $ Syntax.const c $
   64.20            Syntax_Phases.term_of_typ ctxt T
   64.21        else raise Match);
   64.22 -  in map tr' [@{const_syntax Groups.one}, @{const_syntax Groups.zero}] end
   64.23 +  in map tr' [\<^const_syntax>\<open>Groups.one\<close>, \<^const_syntax>\<open>Groups.zero\<close>] end
   64.24  \<close> \<comment> \<open>show types that are presumably too general\<close>
   64.25  
   64.26  class plus =
    65.1 --- a/src/HOL/Groups_Big.thy	Fri Jan 04 21:49:06 2019 +0100
    65.2 +++ b/src/HOL/Groups_Big.thy	Fri Jan 04 23:22:53 2019 +0100
    65.3 @@ -519,7 +519,7 @@
    65.4  
    65.5  end
    65.6  
    65.7 -text \<open>Now: lots of fancy syntax. First, @{term "sum (\<lambda>x. e) A"} is written \<open>\<Sum>x\<in>A. e\<close>.\<close>
    65.8 +text \<open>Now: lots of fancy syntax. First, \<^term>\<open>sum (\<lambda>x. e) A\<close> is written \<open>\<Sum>x\<in>A. e\<close>.\<close>
    65.9  
   65.10  syntax (ASCII)
   65.11    "_sum" :: "pttrn \<Rightarrow> 'a set \<Rightarrow> 'b \<Rightarrow> 'b::comm_monoid_add"  ("(3SUM (_/:_)./ _)" [0, 51, 10] 10)
   65.12 @@ -528,7 +528,7 @@
   65.13  translations \<comment> \<open>Beware of argument permutation!\<close>
   65.14    "\<Sum>i\<in>A. b" \<rightleftharpoons> "CONST sum (\<lambda>i. b) A"
   65.15  
   65.16 -text \<open>Instead of @{term"\<Sum>x\<in>{x. P}. e"} we introduce the shorter \<open>\<Sum>x|P. e\<close>.\<close>
   65.17 +text \<open>Instead of \<^term>\<open>\<Sum>x\<in>{x. P}. e\<close> we introduce the shorter \<open>\<Sum>x|P. e\<close>.\<close>
   65.18  
   65.19  syntax (ASCII)
   65.20    "_qsum" :: "pttrn \<Rightarrow> bool \<Rightarrow> 'a \<Rightarrow> 'a"  ("(3SUM _ |/ _./ _)" [0, 0, 10] 10)
   65.21 @@ -539,7 +539,7 @@
   65.22  
   65.23  print_translation \<open>
   65.24  let
   65.25 -  fun sum_tr' [Abs (x, Tx, t), Const (@{const_syntax Collect}, _) $ Abs (y, Ty, P)] =
   65.26 +  fun sum_tr' [Abs (x, Tx, t), Const (\<^const_syntax>\<open>Collect\<close>, _) $ Abs (y, Ty, P)] =
   65.27          if x <> y then raise Match
   65.28          else
   65.29            let
   65.30 @@ -547,10 +547,10 @@
   65.31              val t' = subst_bound (x', t);
   65.32              val P' = subst_bound (x', P);
   65.33            in
   65.34 -            Syntax.const @{syntax_const "_qsum"} $ Syntax_Trans.mark_bound_abs (x, Tx) $ P' $ t'
   65.35 +            Syntax.const \<^syntax_const>\<open>_qsum\<close> $ Syntax_Trans.mark_bound_abs (x, Tx) $ P' $ t'
   65.36            end
   65.37      | sum_tr' _ = raise Match;
   65.38 -in [(@{const_syntax sum}, K sum_tr')] end
   65.39 +in [(\<^const_syntax>\<open>sum\<close>, K sum_tr')] end
   65.40  \<close>
   65.41  
   65.42  
   65.43 @@ -938,7 +938,7 @@
   65.44  qed simp_all
   65.45  
   65.46  
   65.47 -subsubsection \<open>Cardinality as special case of @{const sum}\<close>
   65.48 +subsubsection \<open>Cardinality as special case of \<^const>\<open>sum\<close>\<close>
   65.49  
   65.50  lemma card_eq_sum: "card A = sum (\<lambda>x. 1) A"
   65.51  proof -
   65.52 @@ -1134,7 +1134,7 @@
   65.53  translations \<comment> \<open>Beware of argument permutation!\<close>
   65.54    "\<Prod>i\<in>A. b" == "CONST prod (\<lambda>i. b) A"
   65.55  
   65.56 -text \<open>Instead of @{term"\<Prod>x\<in>{x. P}. e"} we introduce the shorter \<open>\<Prod>x|P. e\<close>.\<close>
   65.57 +text \<open>Instead of \<^term>\<open>\<Prod>x\<in>{x. P}. e\<close> we introduce the shorter \<open>\<Prod>x|P. e\<close>.\<close>
   65.58  
   65.59  syntax (ASCII)
   65.60    "_qprod" :: "pttrn \<Rightarrow> bool \<Rightarrow> 'a \<Rightarrow> 'a"  ("(4PROD _ |/ _./ _)" [0, 0, 10] 10)
    66.1 --- a/src/HOL/Groups_List.thy	Fri Jan 04 21:49:06 2019 +0100
    66.2 +++ b/src/HOL/Groups_List.thy	Fri Jan 04 23:22:53 2019 +0100
    66.3 @@ -252,7 +252,7 @@
    66.4    "sum_list (map f [k..l]) = sum f (set [k..l])"
    66.5    by (simp add: sum_list_distinct_conv_sum_set)
    66.6  
    66.7 -text \<open>General equivalence between @{const sum_list} and @{const sum}\<close>
    66.8 +text \<open>General equivalence between \<^const>\<open>sum_list\<close> and \<^const>\<open>sum\<close>\<close>
    66.9  lemma (in monoid_add) sum_list_sum_nth:
   66.10    "sum_list xs = (\<Sum> i = 0 ..< length xs. xs ! i)"
   66.11    using interv_sum_list_conv_sum_set_nat [of "(!) xs" 0 "length xs"] by (simp add: map_nth)
   66.12 @@ -327,7 +327,7 @@
   66.13  qed
   66.14  
   66.15  
   66.16 -subsection \<open>Further facts about @{const List.n_lists}\<close>
   66.17 +subsection \<open>Further facts about \<^const>\<open>List.n_lists\<close>\<close>
   66.18  
   66.19  lemma length_n_lists: "length (List.n_lists n xs) = length xs ^ n"
   66.20    by (induct n) (auto simp add: comp_def length_concat sum_list_triv)
    67.1 --- a/src/HOL/HOL.thy	Fri Jan 04 21:49:06 2019 +0100
    67.2 +++ b/src/HOL/HOL.thy	Fri Jan 04 23:22:53 2019 +0100
    67.3 @@ -45,11 +45,11 @@
    67.4  \<close>
    67.5  ML \<open>
    67.6    Plugin_Name.define_setup \<^binding>\<open>quickcheck\<close>
    67.7 -   [@{plugin quickcheck_exhaustive},
    67.8 -    @{plugin quickcheck_random},
    67.9 -    @{plugin quickcheck_bounded_forall},
   67.10 -    @{plugin quickcheck_full_exhaustive},
   67.11 -    @{plugin quickcheck_narrowing}]
   67.12 +   [\<^plugin>\<open>quickcheck_exhaustive\<close>,
   67.13 +    \<^plugin>\<open>quickcheck_random\<close>,
   67.14 +    \<^plugin>\<open>quickcheck_bounded_forall\<close>,
   67.15 +    \<^plugin>\<open>quickcheck_full_exhaustive\<close>,
   67.16 +    \<^plugin>\<open>quickcheck_narrowing\<close>]
   67.17  \<close>
   67.18  
   67.19  
   67.20 @@ -68,7 +68,7 @@
   67.21  
   67.22  setup \<open>Axclass.class_axiomatization (\<^binding>\<open>type\<close>, [])\<close>
   67.23  default_sort type
   67.24 -setup \<open>Object_Logic.add_base_sort @{sort type}\<close>
   67.25 +setup \<open>Object_Logic.add_base_sort \<^sort>\<open>type\<close>\<close>
   67.26  
   67.27  axiomatization where fun_arity: "OFCLASS('a \<Rightarrow> 'b, type_class)"
   67.28  instance "fun" :: (type, type) type by (rule fun_arity)
   67.29 @@ -129,7 +129,7 @@
   67.30  translations "\<exists>!x. P" \<rightleftharpoons> "CONST Ex1 (\<lambda>x. P)"
   67.31  
   67.32  print_translation \<open>
   67.33 - [Syntax_Trans.preserve_binder_abs_tr' @{const_syntax Ex1} @{syntax_const "_Ex1"}]
   67.34 + [Syntax_Trans.preserve_binder_abs_tr' \<^const_syntax>\<open>Ex1\<close> \<^syntax_const>\<open>_Ex1\<close>]
   67.35  \<close> \<comment> \<open>to avoid eta-contraction of body\<close>
   67.36  
   67.37  
   67.38 @@ -158,9 +158,9 @@
   67.39  syntax "_The" :: "[pttrn, bool] \<Rightarrow> 'a"  ("(3THE _./ _)" [0, 10] 10)
   67.40  translations "THE x. P" \<rightleftharpoons> "CONST The (\<lambda>x. P)"
   67.41  print_translation \<open>
   67.42 -  [(@{const_syntax The}, fn _ => fn [Abs abs] =>
   67.43 +  [(\<^const_syntax>\<open>The\<close>, fn _ => fn [Abs abs] =>
   67.44        let val (x, t) = Syntax_Trans.atomic_abs_tr' abs
   67.45 -      in Syntax.const @{syntax_const "_The"} $ x $ t end)]
   67.46 +      in Syntax.const \<^syntax_const>\<open>_The\<close> $ x $ t end)]
   67.47  \<close>  \<comment> \<open>To avoid eta-contraction of body\<close>
   67.48  
   67.49  nonterminal letbinds and letbind
   67.50 @@ -833,7 +833,7 @@
   67.51  setup \<open>
   67.52    (*prevent substitution on bool*)
   67.53    let
   67.54 -    fun non_bool_eq (@{const_name HOL.eq}, Type (_, [T, _])) = T <> @{typ bool}
   67.55 +    fun non_bool_eq (\<^const_name>\<open>HOL.eq\<close>, Type (_, [T, _])) = T <> \<^typ>\<open>bool\<close>
   67.56        | non_bool_eq _ = false;
   67.57      fun hyp_subst_tac' ctxt =
   67.58        SUBGOAL (fn (goal, i) =>
   67.59 @@ -866,7 +866,7 @@
   67.60  declare exE [elim!]
   67.61    allE [elim]
   67.62  
   67.63 -ML \<open>val HOL_cs = claset_of @{context}\<close>
   67.64 +ML \<open>val HOL_cs = claset_of \<^context>\<close>
   67.65  
   67.66  lemma contrapos_np: "\<not> Q \<Longrightarrow> (\<not> P \<Longrightarrow> Q) \<Longrightarrow> P"
   67.67    apply (erule swap)
   67.68 @@ -890,7 +890,7 @@
   67.69    apply (rule prem)
   67.70     apply assumption
   67.71    apply (rule allI)+
   67.72 -  apply (tactic \<open>eresolve_tac @{context} [Classical.dup_elim @{context} @{thm allE}] 1\<close>)
   67.73 +  apply (tactic \<open>eresolve_tac \<^context> [Classical.dup_elim \<^context> @{thm allE}] 1\<close>)
   67.74    apply iprover
   67.75    done
   67.76  
   67.77 @@ -899,8 +899,8 @@
   67.78    (
   67.79      structure Classical = Classical
   67.80      val Trueprop_const = dest_Const @{const Trueprop}
   67.81 -    val equality_name = @{const_name HOL.eq}
   67.82 -    val not_name = @{const_name Not}
   67.83 +    val equality_name = \<^const_name>\<open>HOL.eq\<close>
   67.84 +    val not_name = \<^const_name>\<open>Not\<close>
   67.85      val notE = @{thm notE}
   67.86      val ccontr = @{thm ccontr}
   67.87      val hyp_subst_tac = Hypsubst.blast_hyp_subst_tac
   67.88 @@ -1240,7 +1240,7 @@
   67.89        | count_loose (s $ t) k = count_loose s k + count_loose t k
   67.90        | count_loose (Abs (_, _, t)) k = count_loose  t (k + 1)
   67.91        | count_loose _ _ = 0;
   67.92 -    fun is_trivial_let (Const (@{const_name Let}, _) $ x $ t) =
   67.93 +    fun is_trivial_let (Const (\<^const_name>\<open>Let\<close>, _) $ x $ t) =
   67.94        (case t of
   67.95          Abs (_, _, t') => count_loose t' 0 <= 1
   67.96        | _ => true);
   67.97 @@ -1254,7 +1254,7 @@
   67.98            val ([t'], ctxt') = Variable.import_terms false [t] ctxt;
   67.99          in
  67.100            Option.map (hd o Variable.export ctxt' ctxt o single)
  67.101 -            (case t' of Const (@{const_name Let},_) $ x $ f => (* x and f are already in normal form *)
  67.102 +            (case t' of Const (\<^const_name>\<open>Let\<close>,_) $ x $ f => (* x and f are already in normal form *)
  67.103                if is_Free x orelse is_Bound x orelse is_Const x
  67.104                then SOME @{thm Let_def}
  67.105                else
  67.106 @@ -1366,7 +1366,7 @@
  67.107  lemmas [cong] = imp_cong simp_implies_cong
  67.108  lemmas [split] = if_split
  67.109  
  67.110 -ML \<open>val HOL_ss = simpset_of @{context}\<close>
  67.111 +ML \<open>val HOL_ss = simpset_of \<^context>\<close>
  67.112  
  67.113  text \<open>Simplifies \<open>x\<close> assuming \<open>c\<close> and \<open>y\<close> assuming \<open>\<not> c\<close>.\<close>
  67.114  lemma if_cong:
  67.115 @@ -1493,7 +1493,7 @@
  67.116    val rulify = @{thms induct_rulify'}
  67.117    val rulify_fallback = @{thms induct_rulify_fallback}
  67.118    val equal_def = @{thm induct_equal_def}
  67.119 -  fun dest_def (Const (@{const_name induct_equal}, _) $ t $ u) = SOME (t, u)
  67.120 +  fun dest_def (Const (\<^const_name>\<open>induct_equal\<close>, _) $ t $ u) = SOME (t, u)
  67.121      | dest_def _ = NONE
  67.122    fun trivial_tac ctxt = match_tac ctxt @{thms induct_trueI}
  67.123  )
  67.124 @@ -1504,22 +1504,22 @@
  67.125  declaration \<open>
  67.126    fn _ => Induct.map_simpset (fn ss => ss
  67.127      addsimprocs
  67.128 -      [Simplifier.make_simproc @{context} "swap_induct_false"
  67.129 -        {lhss = [@{term "induct_false \<Longrightarrow> PROP P \<Longrightarrow> PROP Q"}],
  67.130 +      [Simplifier.make_simproc \<^context> "swap_induct_false"
  67.131 +        {lhss = [\<^term>\<open>induct_false \<Longrightarrow> PROP P \<Longrightarrow> PROP Q\<close>],
  67.132           proc = fn _ => fn _ => fn ct =>
  67.133            (case Thm.term_of ct of
  67.134              _ $ (P as _ $ @{const induct_false}) $ (_ $ Q $ _) =>
  67.135                if P <> Q then SOME Drule.swap_prems_eq else NONE
  67.136            | _ => NONE)},
  67.137 -       Simplifier.make_simproc @{context} "induct_equal_conj_curry"
  67.138 -        {lhss = [@{term "induct_conj P Q \<Longrightarrow> PROP R"}],
  67.139 +       Simplifier.make_simproc \<^context> "induct_equal_conj_curry"
  67.140 +        {lhss = [\<^term>\<open>induct_conj P Q \<Longrightarrow> PROP R\<close>],
  67.141           proc = fn _ => fn _ => fn ct =>
  67.142            (case Thm.term_of ct of
  67.143              _ $ (_ $ P) $ _ =>
  67.144                let
  67.145                  fun is_conj (@{const induct_conj} $ P $ Q) =
  67.146                        is_conj P andalso is_conj Q
  67.147 -                  | is_conj (Const (@{const_name induct_equal}, _) $ _ $ _) = true
  67.148 +                  | is_conj (Const (\<^const_name>\<open>induct_equal\<close>, _) $ _ $ _) = true
  67.149                    | is_conj @{const induct_true} = true
  67.150                    | is_conj @{const induct_false} = true
  67.151                    | is_conj _ = false
  67.152 @@ -1597,7 +1597,7 @@
  67.153    val atomize_exL = @{thm atomize_exL};
  67.154    val atomize_conjL = @{thm atomize_conjL};
  67.155    val atomize_disjL = @{thm atomize_disjL};
  67.156 -  val operator_names = [@{const_name HOL.disj}, @{const_name HOL.conj}, @{const_name Ex}];
  67.157 +  val operator_names = [\<^const_name>\<open>HOL.disj\<close>, \<^const_name>\<open>HOL.conj\<close>, \<^const_name>\<open>Ex\<close>];
  67.158  );
  67.159  \<close>
  67.160  
  67.161 @@ -1762,7 +1762,7 @@
  67.162  \<close>
  67.163  
  67.164  text \<open>
  67.165 -  This setup ensures that a rewrite rule of the form @{term "NO_MATCH pat val \<Longrightarrow> t"}
  67.166 +  This setup ensures that a rewrite rule of the form \<^term>\<open>NO_MATCH pat val \<Longrightarrow> t\<close>
  67.167    is only applied, if the pattern \<open>pat\<close> does not match the value \<open>val\<close>.
  67.168  \<close>
  67.169  
  67.170 @@ -1838,18 +1838,18 @@
  67.171  setup \<open>
  67.172    Code_Preproc.map_pre (fn ctxt =>
  67.173      ctxt addsimprocs
  67.174 -      [Simplifier.make_simproc @{context} "equal"
  67.175 -        {lhss = [@{term HOL.eq}],
  67.176 +      [Simplifier.make_simproc \<^context> "equal"
  67.177 +        {lhss = [\<^term>\<open>HOL.eq\<close>],
  67.178           proc = fn _ => fn _ => fn ct =>
  67.179            (case Thm.term_of ct of
  67.180 -            Const (_, Type (@{type_name fun}, [Type _, _])) => SOME @{thm eq_equal}
  67.181 +            Const (_, Type (\<^type_name>\<open>fun\<close>, [Type _, _])) => SOME @{thm eq_equal}
  67.182            | _ => NONE)}])
  67.183  \<close>
  67.184  
  67.185  
  67.186  subsubsection \<open>Generic code generator foundation\<close>
  67.187  
  67.188 -text \<open>Datatype @{typ bool}\<close>
  67.189 +text \<open>Datatype \<^typ>\<open>bool\<close>\<close>
  67.190  
  67.191  code_datatype True False
  67.192  
  67.193 @@ -1874,7 +1874,7 @@
  67.194      and "(P \<longrightarrow> True) \<longleftrightarrow> True"
  67.195    by simp_all
  67.196  
  67.197 -text \<open>More about @{typ prop}\<close>
  67.198 +text \<open>More about \<^typ>\<open>prop\<close>\<close>
  67.199  
  67.200  lemma [code nbe]:
  67.201    shows "(True \<Longrightarrow> PROP Q) \<equiv> PROP Q"
  67.202 @@ -1905,14 +1905,14 @@
  67.203  lemma equal_itself_code [code]: "equal TYPE('a) TYPE('a) \<longleftrightarrow> True"
  67.204    by (simp add: equal)
  67.205  
  67.206 -setup \<open>Sign.add_const_constraint (@{const_name equal}, SOME @{typ "'a::type \<Rightarrow> 'a \<Rightarrow> bool"})\<close>
  67.207 +setup \<open>Sign.add_const_constraint (\<^const_name>\<open>equal\<close>, SOME \<^typ>\<open>'a::type \<Rightarrow> 'a \<Rightarrow> bool\<close>)\<close>
  67.208  
  67.209  lemma equal_alias_cert: "OFCLASS('a, equal_class) \<equiv> (((=) :: 'a \<Rightarrow> 'a \<Rightarrow> bool) \<equiv> equal)"
  67.210    (is "?ofclass \<equiv> ?equal")
  67.211  proof
  67.212    assume "PROP ?ofclass"
  67.213    show "PROP ?equal"
  67.214 -    by (tactic \<open>ALLGOALS (resolve_tac @{context} [Thm.unconstrainT @{thm eq_equal}])\<close>)
  67.215 +    by (tactic \<open>ALLGOALS (resolve_tac \<^context> [Thm.unconstrainT @{thm eq_equal}])\<close>)
  67.216        (fact \<open>PROP ?ofclass\<close>)
  67.217  next
  67.218    assume "PROP ?equal"
  67.219 @@ -1920,7 +1920,7 @@
  67.220    qed (simp add: \<open>PROP ?equal\<close>)
  67.221  qed
  67.222  
  67.223 -setup \<open>Sign.add_const_constraint (@{const_name equal}, SOME @{typ "'a::equal \<Rightarrow> 'a \<Rightarrow> bool"})\<close>
  67.224 +setup \<open>Sign.add_const_constraint (\<^const_name>\<open>equal\<close>, SOME \<^typ>\<open>'a::equal \<Rightarrow> 'a \<Rightarrow> bool\<close>)\<close>
  67.225  
  67.226  setup \<open>Nbe.add_const_alias @{thm equal_alias_cert}\<close>
  67.227  
  67.228 @@ -1933,7 +1933,7 @@
  67.229  
  67.230  setup \<open>
  67.231    Code.declare_case_global @{thm Let_case_cert} #>
  67.232 -  Code.declare_undefined_global @{const_name undefined}
  67.233 +  Code.declare_undefined_global \<^const_name>\<open>undefined\<close>
  67.234  \<close>
  67.235  
  67.236  declare [[code abort: undefined]]
  67.237 @@ -1941,7 +1941,7 @@
  67.238  
  67.239  subsubsection \<open>Generic code generator target languages\<close>
  67.240  
  67.241 -text \<open>type @{typ bool}\<close>
  67.242 +text \<open>type \<^typ>\<open>bool\<close>\<close>
  67.243  
  67.244  code_printing
  67.245    type_constructor bool \<rightharpoonup>
  67.246 @@ -2057,7 +2057,7 @@
  67.247  ML \<open>
  67.248    (* combination of (spec RS spec RS ...(j times) ... spec RS mp) *)
  67.249    local
  67.250 -    fun wrong_prem (Const (@{const_name All}, _) $ Abs (_, _, t)) = wrong_prem t
  67.251 +    fun wrong_prem (Const (\<^const_name>\<open>All\<close>, _) $ Abs (_, _, t)) = wrong_prem t
  67.252        | wrong_prem (Bound _) = true
  67.253        | wrong_prem _ = false;
  67.254      val filter_right = filter (not o wrong_prem o HOLogic.dest_Trueprop o hd o Thm.prems_of);
  67.255 @@ -2068,7 +2068,7 @@
  67.256  
  67.257    local
  67.258      val nnf_ss =
  67.259 -      simpset_of (put_simpset HOL_basic_ss @{context} addsimps @{thms simp_thms nnf_simps});
  67.260 +      simpset_of (put_simpset HOL_basic_ss \<^context> addsimps @{thms simp_thms nnf_simps});
  67.261    in
  67.262      fun nnf_conv ctxt = Simplifier.rewrite (put_simpset nnf_ss ctxt);
  67.263    end
    68.1 --- a/src/HOL/Hilbert_Choice.thy	Fri Jan 04 21:49:06 2019 +0100
    68.2 +++ b/src/HOL/Hilbert_Choice.thy	Fri Jan 04 23:22:53 2019 +0100
    68.3 @@ -26,9 +26,9 @@
    68.4    "SOME x. P" \<rightleftharpoons> "CONST Eps (\<lambda>x. P)"
    68.5  
    68.6  print_translation \<open>
    68.7 -  [(@{const_syntax Eps}, fn _ => fn [Abs abs] =>
    68.8 +  [(\<^const_syntax>\<open>Eps\<close>, fn _ => fn [Abs abs] =>
    68.9        let val (x, t) = Syntax_Trans.atomic_abs_tr' abs
   68.10 -      in Syntax.const @{syntax_const "_Eps"} $ x $ t end)]
   68.11 +      in Syntax.const \<^syntax_const>\<open>_Eps\<close> $ x $ t end)]
   68.12  \<close> \<comment> \<open>to avoid eta-contraction of body\<close>
   68.13  
   68.14  definition inv_into :: "'a set \<Rightarrow> ('a \<Rightarrow> 'b) \<Rightarrow> ('b \<Rightarrow> 'a)" where
   68.15 @@ -54,7 +54,7 @@
   68.16  
   68.17  text \<open>
   68.18    Easier to apply than \<open>someI\<close> because the conclusion has only one
   68.19 -  occurrence of @{term P}.
   68.20 +  occurrence of \<^term>\<open>P\<close>.
   68.21  \<close>
   68.22  lemma someI2: "P a \<Longrightarrow> (\<And>x. P x \<Longrightarrow> Q x) \<Longrightarrow> Q (SOME x. P x)"
   68.23    by (blast intro: someI)
   68.24 @@ -560,7 +560,7 @@
   68.25  
   68.26  subsection \<open>Other Consequences of Hilbert's Epsilon\<close>
   68.27  
   68.28 -text \<open>Hilbert's Epsilon and the @{term split} Operator\<close>
   68.29 +text \<open>Hilbert's Epsilon and the \<^term>\<open>split\<close> Operator\<close>
   68.30  
   68.31  text \<open>Looping simprule!\<close>
   68.32  lemma split_paired_Eps: "(SOME x. P x) = (SOME (a, b). P (a, b))"
    69.1 --- a/src/HOL/Inductive.thy	Fri Jan 04 21:49:06 2019 +0100
    69.2 +++ b/src/HOL/Inductive.thy	Fri Jan 04 23:22:53 2019 +0100
    69.3 @@ -270,8 +270,8 @@
    69.4  
    69.5  subsection \<open>Even Stronger Coinduction Rule, by Martin Coen\<close>
    69.6  
    69.7 -text \<open>Weakens the condition @{term "X \<subseteq> f X"} to one expressed using both
    69.8 -  @{term lfp} and @{term gfp}\<close>
    69.9 +text \<open>Weakens the condition \<^term>\<open>X \<subseteq> f X\<close> to one expressed using both
   69.10 +  \<^term>\<open>lfp\<close> and \<^term>\<open>gfp\<close>\<close>
   69.11  lemma coinduct3_mono_lemma: "mono f \<Longrightarrow> mono (\<lambda>x. f x \<union> X \<union> B)"
   69.12    by (iprover intro: subset_refl monoI Un_mono monoD)
   69.13  
   69.14 @@ -312,7 +312,7 @@
   69.15  lemma def_coinduct3: "A \<equiv> gfp f \<Longrightarrow> mono f \<Longrightarrow> a \<in> X \<Longrightarrow> X \<subseteq> f (lfp (\<lambda>x. f x \<union> X \<union> A)) \<Longrightarrow> a \<in> A"
   69.16    by (auto intro!: coinduct3)
   69.17  
   69.18 -text \<open>Monotonicity of @{term gfp}!\<close>
   69.19 +text \<open>Monotonicity of \<^term>\<open>gfp\<close>!\<close>
   69.20  lemma gfp_mono: "(\<And>Z. f Z \<le> g Z) \<Longrightarrow> gfp f \<le> gfp g"
   69.21    by (rule gfp_upperbound [THEN gfp_least]) (blast intro: order_trans)
   69.22  
   69.23 @@ -535,7 +535,7 @@
   69.24          val x = Syntax.free (fst (Name.variant "x" (Term.declare_term_frees cs Name.context)));
   69.25          val ft = Case_Translation.case_tr true ctxt [x, cs];
   69.26        in lambda x ft end
   69.27 -  in [(@{syntax_const "_lam_pats_syntax"}, fun_tr)] end
   69.28 +  in [(\<^syntax_const>\<open>_lam_pats_syntax\<close>, fun_tr)] end
   69.29  \<close>
   69.30  
   69.31  end
    70.1 --- a/src/HOL/Int.thy	Fri Jan 04 21:49:06 2019 +0100
    70.2 +++ b/src/HOL/Int.thy	Fri Jan 04 23:22:53 2019 +0100
    70.3 @@ -430,7 +430,7 @@
    70.4  
    70.5  end
    70.6  
    70.7 -text \<open>Comparisons involving @{term of_int}.\<close>
    70.8 +text \<open>Comparisons involving \<^term>\<open>of_int\<close>.\<close>
    70.9  
   70.10  lemma of_int_eq_numeral_iff [iff]: "of_int z = (numeral n :: 'a::ring_char_0) \<longleftrightarrow> z = numeral n"
   70.11    using of_int_eq_iff by fastforce
   70.12 @@ -493,7 +493,7 @@
   70.13  lemma nat_le_eq_zle: "0 < w \<or> 0 \<le> z \<Longrightarrow> nat w \<le> nat z \<longleftrightarrow> w \<le> z"
   70.14    by transfer (clarsimp, arith)
   70.15  
   70.16 -text \<open>An alternative condition is @{term "0 \<le> w"}.\<close>
   70.17 +text \<open>An alternative condition is \<^term>\<open>0 \<le> w\<close>.\<close>
   70.18  lemma nat_mono_iff: "0 < z \<Longrightarrow> nat w < nat z \<longleftrightarrow> w < z"
   70.19    by (simp add: nat_le_eq_zle linorder_not_le [symmetric])
   70.20  
   70.21 @@ -669,7 +669,7 @@
   70.22  lemma measure_function_int[measure_function]: "is_measure (nat \<circ> abs)" ..
   70.23  
   70.24  
   70.25 -subsection \<open>Lemmas about the Function @{term of_nat} and Orderings\<close>
   70.26 +subsection \<open>Lemmas about the Function \<^term>\<open>of_nat\<close> and Orderings\<close>
   70.27  
   70.28  lemma negative_zless_0: "- (int (Suc n)) < (0 :: int)"
   70.29    by (simp add: order_less_le del: of_nat_Suc)
   70.30 @@ -975,7 +975,7 @@
   70.31      by (cases "of_int b = 0") simp_all
   70.32  qed
   70.33  
   70.34 -text \<open>The premise involving @{term Ints} prevents @{term "a = 1/2"}.\<close>
   70.35 +text \<open>The premise involving \<^term>\<open>Ints\<close> prevents \<^term>\<open>a = 1/2\<close>.\<close>
   70.36  
   70.37  lemma Ints_double_eq_0_iff:
   70.38    fixes a :: "'a::ring_char_0"
   70.39 @@ -1037,7 +1037,7 @@
   70.40  qed
   70.41  
   70.42  
   70.43 -subsection \<open>@{term sum} and @{term prod}\<close>
   70.44 +subsection \<open>\<^term>\<open>sum\<close> and \<^term>\<open>prod\<close>\<close>
   70.45  
   70.46  context semiring_1
   70.47  begin
   70.48 @@ -1132,9 +1132,9 @@
   70.49      using Ints_nonzero_abs_ge1 [of x] by auto
   70.50      
   70.51  
   70.52 -subsection \<open>The functions @{term nat} and @{term int}\<close>
   70.53 +subsection \<open>The functions \<^term>\<open>nat\<close> and \<^term>\<open>int\<close>\<close>
   70.54  
   70.55 -text \<open>Simplify the term @{term "w + - z"}.\<close>
   70.56 +text \<open>Simplify the term \<^term>\<open>w + - z\<close>.\<close>
   70.57  
   70.58  lemma one_less_nat_eq [simp]: "Suc 0 < nat z \<longleftrightarrow> 1 < z"
   70.59    using zless_nat_conj [of 1 z] by auto
    71.1 --- a/src/HOL/Isar_Examples/Higher_Order_Logic.thy	Fri Jan 04 21:49:06 2019 +0100
    71.2 +++ b/src/HOL/Isar_Examples/Higher_Order_Logic.thy	Fri Jan 04 23:22:53 2019 +0100
    71.3 @@ -490,7 +490,7 @@
    71.4  qed
    71.5  
    71.6  text \<open>
    71.7 -  This means, the hypothetical predicate @{const classical} always holds
    71.8 +  This means, the hypothetical predicate \<^const>\<open>classical\<close> always holds
    71.9    unconditionally (with all consequences).
   71.10  \<close>
   71.11  
    72.1 --- a/src/HOL/Lattices.thy	Fri Jan 04 21:49:06 2019 +0100
    72.2 +++ b/src/HOL/Lattices.thy	Fri Jan 04 23:22:53 2019 +0100
    72.3 @@ -802,7 +802,7 @@
    72.4  qed
    72.5  
    72.6  
    72.7 -subsection \<open>Lattice on @{typ bool}\<close>
    72.8 +subsection \<open>Lattice on \<^typ>\<open>bool\<close>\<close>
    72.9  
   72.10  instantiation bool :: boolean_algebra
   72.11  begin
   72.12 @@ -829,7 +829,7 @@
   72.13    by auto
   72.14  
   72.15  
   72.16 -subsection \<open>Lattice on @{typ "_ \<Rightarrow> _"}\<close>
   72.17 +subsection \<open>Lattice on \<^typ>\<open>_ \<Rightarrow> _\<close>\<close>
   72.18  
   72.19  instantiation "fun" :: (type, semilattice_sup) semilattice_sup
   72.20  begin
    73.1 --- a/src/HOL/Lattices_Big.thy	Fri Jan 04 21:49:06 2019 +0100
    73.2 +++ b/src/HOL/Lattices_Big.thy	Fri Jan 04 23:22:53 2019 +0100
    73.3 @@ -478,7 +478,7 @@
    73.4    "MAX x. f"     \<rightleftharpoons> "CONST Max (CONST range (\<lambda>x. f))"
    73.5    "MAX x\<in>A. f"   \<rightleftharpoons> "CONST Max ((\<lambda>x. f) ` A)"
    73.6  
    73.7 -text \<open>An aside: @{const Min}/@{const Max} on linear orders as special case of @{const Inf_fin}/@{const Sup_fin}\<close>
    73.8 +text \<open>An aside: \<^const>\<open>Min\<close>/\<^const>\<open>Max\<close> on linear orders as special case of \<^const>\<open>Inf_fin\<close>/\<^const>\<open>Sup_fin\<close>\<close>
    73.9  
   73.10  lemma Inf_fin_Min:
   73.11    "Inf_fin = (Min :: 'a::{semilattice_inf, linorder} set \<Rightarrow> 'a)"
    74.1 --- a/src/HOL/Library/AList.thy	Fri Jan 04 21:49:06 2019 +0100
    74.2 +++ b/src/HOL/Library/AList.thy	Fri Jan 04 23:22:53 2019 +0100
    74.3 @@ -13,8 +13,8 @@
    74.4  
    74.5  text \<open>
    74.6    The operations preserve distinctness of keys and
    74.7 -  function @{term "clearjunk"} distributes over them. Since
    74.8 -  @{term clearjunk} enforces distinctness of keys it can be used
    74.9 +  function \<^term>\<open>clearjunk\<close> distributes over them. Since
   74.10 +  \<^term>\<open>clearjunk\<close> enforces distinctness of keys it can be used
   74.11    to establish the invariant, e.g. for inductive proofs.
   74.12  \<close>
   74.13  
   74.14 @@ -69,8 +69,8 @@
   74.15    by (induct al) auto
   74.16  
   74.17  text \<open>Note that the lists are not necessarily the same:
   74.18 -        @{term "update k v (update k' v' []) = [(k', v'), (k, v)]"} and
   74.19 -        @{term "update k' v' (update k v []) = [(k, v), (k', v')]"}.\<close>
   74.20 +        \<^term>\<open>update k v (update k' v' []) = [(k', v'), (k, v)]\<close> and
   74.21 +        \<^term>\<open>update k' v' (update k v []) = [(k, v), (k', v')]\<close>.\<close>
   74.22  
   74.23  lemma update_swap:
   74.24    "k \<noteq> k' \<Longrightarrow> map_of (update k v (update k' v' al)) = map_of (update k' v' (update k v al))"
   74.25 @@ -223,7 +223,7 @@
   74.26        (if (fst p = k) then (k, f (snd p)) # ps else p # update_with_aux v k f ps)"
   74.27  
   74.28  text \<open>
   74.29 -  The above @{term "delete"} traverses all the list even if it has found the key.
   74.30 +  The above \<^term>\<open>delete\<close> traverses all the list even if it has found the key.
   74.31    This one does not have to keep going because is assumes the invariant that keys are distinct.
   74.32  \<close>
   74.33  qualified fun delete_aux :: "'key \<Rightarrow> ('key \<times> 'val) list \<Rightarrow> ('key \<times> 'val) list"
    75.1 --- a/src/HOL/Library/Bit.thy	Fri Jan 04 21:49:06 2019 +0100
    75.2 +++ b/src/HOL/Library/Bit.thy	Fri Jan 04 23:22:53 2019 +0100
    75.3 @@ -87,7 +87,7 @@
    75.4    by (simp_all add: equal set_iff)
    75.5  
    75.6  
    75.7 -subsection \<open>Type @{typ bit} forms a field\<close>
    75.8 +subsection \<open>Type \<^typ>\<open>bit\<close> forms a field\<close>
    75.9  
   75.10  instantiation bit :: field
   75.11  begin
   75.12 @@ -128,7 +128,7 @@
   75.13    unfolding plus_bit_def by (simp split: bit.split)
   75.14  
   75.15  
   75.16 -subsection \<open>Numerals at type @{typ bit}\<close>
   75.17 +subsection \<open>Numerals at type \<^typ>\<open>bit\<close>\<close>
   75.18  
   75.19  text \<open>All numerals reduce to either 0 or 1.\<close>
   75.20  
   75.21 @@ -145,7 +145,7 @@
   75.22    by (simp only: numeral_Bit1 bit_add_self add_0_left)
   75.23  
   75.24  
   75.25 -subsection \<open>Conversion from @{typ bit}\<close>
   75.26 +subsection \<open>Conversion from \<^typ>\<open>bit\<close>\<close>
   75.27  
   75.28  context zero_neq_one
   75.29  begin
    76.1 --- a/src/HOL/Library/Cancellation/cancel.ML	Fri Jan 04 21:49:06 2019 +0100
    76.2 +++ b/src/HOL/Library/Cancellation/cancel.ML	Fri Jan 04 23:22:53 2019 +0100
    76.3 @@ -49,15 +49,15 @@
    76.4      val t = Thm.term_of ct
    76.5      val ([t'], ctxt') = Variable.import_terms true [t] ctxt
    76.6      val pre_simplified_ct = Simplifier.full_rewrite (clear_simpset ctxt addsimps
    76.7 -      Named_Theorems.get ctxt @{named_theorems cancelation_simproc_pre} addsimprocs
    76.8 -      [@{simproc NO_MATCH}]) (Thm.cterm_of ctxt t');
    76.9 +      Named_Theorems.get ctxt \<^named_theorems>\<open>cancelation_simproc_pre\<close> addsimprocs
   76.10 +      [\<^simproc>\<open>NO_MATCH\<close>]) (Thm.cterm_of ctxt t');
   76.11      val t' = Thm.term_of (Thm.rhs_of pre_simplified_ct)
   76.12      val export = singleton (Variable.export ctxt' ctxt)
   76.13  
   76.14      val (t1,_) = Data.dest_bal t'
   76.15 -    val sort_not_general_enough = ((fastype_of t1) = @{typ nat}) orelse
   76.16 +    val sort_not_general_enough = ((fastype_of t1) = \<^typ>\<open>nat\<close>) orelse
   76.17          Sorts.of_sort (Sign.classes_of (Proof_Context.theory_of ctxt))
   76.18 -         (fastype_of t1, @{sort "comm_ring_1"})
   76.19 +         (fastype_of t1, \<^sort>\<open>comm_ring_1\<close>)
   76.20      val _ =
   76.21         if sort_not_general_enough
   76.22         then raise SORT_NOT_GENERAL_ENOUGH("type too precise, another simproc should do the job",
   76.23 @@ -67,8 +67,8 @@
   76.24      fun add_pre_simplification thm = @{thm Pure.transitive} OF [pre_simplified_ct, thm]
   76.25      fun add_post_simplification thm =
   76.26        (let val post_simplified_ct = Simplifier.full_rewrite (clear_simpset ctxt addsimps
   76.27 -              Named_Theorems.get ctxt @{named_theorems cancelation_simproc_post} addsimprocs
   76.28 -              [@{simproc NO_MATCH}])
   76.29 +              Named_Theorems.get ctxt \<^named_theorems>\<open>cancelation_simproc_post\<close> addsimprocs
   76.30 +              [\<^simproc>\<open>NO_MATCH\<close>])
   76.31              (Thm.rhs_of thm)
   76.32          in @{thm Pure.transitive} OF [thm, post_simplified_ct] end)
   76.33    in
    77.1 --- a/src/HOL/Library/Cancellation/cancel_data.ML	Fri Jan 04 21:49:06 2019 +0100
    77.2 +++ b/src/HOL/Library/Cancellation/cancel_data.ML	Fri Jan 04 23:22:53 2019 +0100
    77.3 @@ -32,12 +32,12 @@
    77.4  fun fast_mk_iterate_add (n, mset) =
    77.5    let val T = fastype_of mset
    77.6    in
    77.7 -    Const (@{const_name "iterate_add"}, @{typ nat} --> T --> T) $ n $ mset
    77.8 +    Const (\<^const_name>\<open>iterate_add\<close>, \<^typ>\<open>nat\<close> --> T --> T) $ n $ mset
    77.9    end;
   77.10  
   77.11  (*iterate_add is not symmetric, unlike multiplication over natural numbers.*)
   77.12  fun mk_iterate_add (t, u) =
   77.13 -  (if fastype_of t = @{typ nat} then (t, u) else (u, t))
   77.14 +  (if fastype_of t = \<^typ>\<open>nat\<close> then (t, u) else (u, t))
   77.15    |> fast_mk_iterate_add;
   77.16  
   77.17  (*Maps n to #n for n = 1, 2*)
   77.18 @@ -45,7 +45,7 @@
   77.19    map (fn th => th RS sym) @{thms numeral_One numeral_2_eq_2 numeral_1_eq_Suc_0};
   77.20  
   77.21  val numeral_sym_ss =
   77.22 -  simpset_of (put_simpset HOL_basic_ss @{context} addsimps numeral_syms);
   77.23 +  simpset_of (put_simpset HOL_basic_ss \<^context> addsimps numeral_syms);
   77.24  
   77.25  fun mk_number 1 = HOLogic.numeral_const HOLogic.natT $ HOLogic.one_const
   77.26    | mk_number n = HOLogic.mk_number HOLogic.natT n;
   77.27 @@ -56,16 +56,16 @@
   77.28      handle TERM _ => find_first_numeral (t::past) terms)
   77.29    | find_first_numeral _ [] = raise TERM("find_first_numeral", []);
   77.30  
   77.31 -fun typed_zero T = Const (@{const_name "Groups.zero"}, T);
   77.32 +fun typed_zero T = Const (\<^const_name>\<open>Groups.zero\<close>, T);
   77.33  fun typed_one T = HOLogic.numeral_const T $ HOLogic.one_const
   77.34 -val mk_plus = HOLogic.mk_binop @{const_name Groups.plus};
   77.35 +val mk_plus = HOLogic.mk_binop \<^const_name>\<open>Groups.plus\<close>;
   77.36  
   77.37  (*Thus mk_sum[t] yields t+0; longer sums don't have a trailing zero.*)
   77.38  fun mk_sum T [] = typed_zero T
   77.39    | mk_sum _ [t,u] = mk_plus (t, u)
   77.40    | mk_sum T (t :: ts) = mk_plus (t, mk_sum T ts);
   77.41  
   77.42 -val dest_plus = HOLogic.dest_bin @{const_name Groups.plus} dummyT;
   77.43 +val dest_plus = HOLogic.dest_bin \<^const_name>\<open>Groups.plus\<close> dummyT;
   77.44  
   77.45  
   77.46  (*** Other simproc items ***)
   77.47 @@ -85,7 +85,7 @@
   77.48    | mk_prod _ [t] = t
   77.49    | mk_prod T (t :: ts) = if t = one then mk_prod T ts else mk_iterate_add (t, mk_prod T ts);
   77.50  
   77.51 -val dest_iterate_add = HOLogic.dest_bin @{const_name iterate_add} dummyT;
   77.52 +val dest_iterate_add = HOLogic.dest_bin \<^const_name>\<open>iterate_add\<close> dummyT;
   77.53  
   77.54  fun dest_iterate_adds t =
   77.55    let val (t,u) = dest_iterate_add t in
   77.56 @@ -121,7 +121,7 @@
   77.57  
   77.58  fun dest_sum t = dest_summation (t, []);
   77.59  
   77.60 -val rename_numerals = simplify (put_simpset numeral_sym_ss @{context}) o Thm.transfer @{theory};
   77.61 +val rename_numerals = simplify (put_simpset numeral_sym_ss \<^context>) o Thm.transfer \<^theory>;
   77.62  
   77.63  (*Simplify \<open>iterate_add (Suc 0) n\<close>, \<open>iterate_add n (Suc 0)\<close>, \<open>n+0\<close>, and \<open>0+n\<close> to \<open>n\<close>*)
   77.64  val add_0s  = map rename_numerals @{thms monoid_add_class.add_0_left monoid_add_class.add_0_right};
   77.65 @@ -130,7 +130,7 @@
   77.66  (*And these help the simproc return False when appropriate. We use the same list as the
   77.67  simproc for natural numbers, but adapted.*)
   77.68  fun contra_rules ctxt =
   77.69 -  @{thms le_zero_eq}  @ Named_Theorems.get ctxt @{named_theorems cancelation_simproc_eq_elim};
   77.70 +  @{thms le_zero_eq}  @ Named_Theorems.get ctxt \<^named_theorems>\<open>cancelation_simproc_eq_elim\<close>;
   77.71  
   77.72  fun simplify_meta_eq ctxt =
   77.73    Arith_Data.simplify_meta_eq
   77.74 @@ -148,11 +148,11 @@
   77.75  val trans_tac = Numeral_Simprocs.trans_tac;
   77.76  
   77.77  val norm_ss1 =
   77.78 -  simpset_of (put_simpset Numeral_Simprocs.num_ss @{context} addsimps
   77.79 +  simpset_of (put_simpset Numeral_Simprocs.num_ss \<^context> addsimps
   77.80      numeral_syms @ add_0s @ mult_1s @ @{thms ac_simps iterate_add_simps});
   77.81  
   77.82  val norm_ss2 =
   77.83 -  simpset_of (put_simpset Numeral_Simprocs.num_ss @{context} addsimps
   77.84 +  simpset_of (put_simpset Numeral_Simprocs.num_ss \<^context> addsimps
   77.85      bin_simps @
   77.86      @{thms ac_simps});
   77.87  
   77.88 @@ -161,7 +161,7 @@
   77.89    THEN ALLGOALS (simp_tac (put_simpset norm_ss2 ctxt));
   77.90  
   77.91  val mset_simps_ss =
   77.92 -  simpset_of (put_simpset HOL_basic_ss @{context} addsimps bin_simps);
   77.93 +  simpset_of (put_simpset HOL_basic_ss \<^context> addsimps bin_simps);
   77.94  
   77.95  fun numeral_simp_tac ctxt = ALLGOALS (simp_tac (put_simpset mset_simps_ss ctxt));
   77.96  
    78.1 --- a/src/HOL/Library/Cancellation/cancel_simprocs.ML	Fri Jan 04 21:49:06 2019 +0100
    78.2 +++ b/src/HOL/Library/Cancellation/cancel_simprocs.ML	Fri Jan 04 23:22:53 2019 +0100
    78.3 @@ -19,31 +19,31 @@
    78.4  structure Eq_Cancel_Comm_Monoid_add = Cancel_Fun
    78.5   (open Cancel_Data
    78.6    val mk_bal   = HOLogic.mk_eq
    78.7 -  val dest_bal = HOLogic.dest_bin @{const_name HOL.eq} dummyT
    78.8 +  val dest_bal = HOLogic.dest_bin \<^const_name>\<open>HOL.eq\<close> dummyT
    78.9    val bal_add1 = @{thm iterate_add_eq_add_iff1} RS trans
   78.10    val bal_add2 = @{thm iterate_add_eq_add_iff2} RS trans
   78.11  );
   78.12  
   78.13  structure Eq_Cancel_Comm_Monoid_less = Cancel_Fun
   78.14   (open Cancel_Data
   78.15 -  val mk_bal   = HOLogic.mk_binrel @{const_name Orderings.less}
   78.16 -  val dest_bal = HOLogic.dest_bin @{const_name Orderings.less} dummyT
   78.17 +  val mk_bal   = HOLogic.mk_binrel \<^const_name>\<open>Orderings.less\<close>
   78.18 +  val dest_bal = HOLogic.dest_bin \<^const_name>\<open>Orderings.less\<close> dummyT
   78.19    val bal_add1 = @{thm iterate_add_less_iff1} RS trans
   78.20    val bal_add2 = @{thm iterate_add_less_iff2} RS trans
   78.21  );
   78.22  
   78.23  structure Eq_Cancel_Comm_Monoid_less_eq = Cancel_Fun
   78.24   (open Cancel_Data
   78.25 -  val mk_bal   = HOLogic.mk_binrel @{const_name Orderings.less_eq}
   78.26 -  val dest_bal = HOLogic.dest_bin @{const_name Orderings.less_eq} dummyT
   78.27 +  val mk_bal   = HOLogic.mk_binrel \<^const_name>\<open>Orderings.less_eq\<close>
   78.28 +  val dest_bal = HOLogic.dest_bin \<^const_name>\<open>Orderings.less_eq\<close> dummyT
   78.29    val bal_add1 = @{thm iterate_add_less_eq_iff1} RS trans
   78.30    val bal_add2 = @{thm iterate_add_less_eq_iff2} RS trans
   78.31  );
   78.32  
   78.33  structure Diff_Cancel_Comm_Monoid_less_eq = Cancel_Fun
   78.34   (open Cancel_Data
   78.35 -  val mk_bal   = HOLogic.mk_binop @{const_name Groups.minus}
   78.36 -  val dest_bal = HOLogic.dest_bin @{const_name Groups.minus} dummyT
   78.37 +  val mk_bal   = HOLogic.mk_binop \<^const_name>\<open>Groups.minus\<close>
   78.38 +  val dest_bal = HOLogic.dest_bin \<^const_name>\<open>Groups.minus\<close> dummyT
   78.39    val bal_add1 = @{thm iterate_add_add_eq1} RS trans
   78.40    val bal_add2 = @{thm iterate_add_diff_add_eq2} RS trans
   78.41  );
    79.1 --- a/src/HOL/Library/Cardinality.thy	Fri Jan 04 21:49:06 2019 +0100
    79.2 +++ b/src/HOL/Library/Cardinality.thy	Fri Jan 04 23:22:53 2019 +0100
    79.3 @@ -36,9 +36,9 @@
    79.4  
    79.5  print_translation \<open>
    79.6    let
    79.7 -    fun card_univ_tr' ctxt [Const (@{const_syntax UNIV}, Type (_, [T]))] =
    79.8 -      Syntax.const @{syntax_const "_type_card"} $ Syntax_Phases.term_of_typ ctxt T
    79.9 -  in [(@{const_syntax card}, card_univ_tr')] end
   79.10 +    fun card_univ_tr' ctxt [Const (\<^const_syntax>\<open>UNIV\<close>, Type (_, [T]))] =
   79.11 +      Syntax.const \<^syntax_const>\<open>_type_card\<close> $ Syntax_Phases.term_of_typ ctxt T
   79.12 +  in [(\<^const_syntax>\<open>card\<close>, card_univ_tr')] end
   79.13  \<close>
   79.14  
   79.15  lemma card_prod [simp]: "CARD('a \<times> 'b) = CARD('a) * CARD('b)"
   79.16 @@ -377,11 +377,11 @@
   79.17  subsection \<open>Code setup for sets\<close>
   79.18  
   79.19  text \<open>
   79.20 -  Implement @{term "CARD('a)"} via @{term card_UNIV} and provide
   79.21 -  implementations for @{term "finite"}, @{term "card"}, @{term "(\<subseteq>)"}, 
   79.22 -  and @{term "(=)"}if the calling context already provides @{class finite_UNIV}
   79.23 -  and @{class card_UNIV} instances. If we implemented the latter
   79.24 -  always via @{term card_UNIV}, we would require instances of essentially all 
   79.25 +  Implement \<^term>\<open>CARD('a)\<close> via \<^term>\<open>card_UNIV\<close> and provide
   79.26 +  implementations for \<^term>\<open>finite\<close>, \<^term>\<open>card\<close>, \<^term>\<open>(\<subseteq>)\<close>, 
   79.27 +  and \<^term>\<open>(=)\<close>if the calling context already provides \<^class>\<open>finite_UNIV\<close>
   79.28 +  and \<^class>\<open>card_UNIV\<close> instances. If we implemented the latter
   79.29 +  always via \<^term>\<open>card_UNIV\<close>, we would require instances of essentially all 
   79.30    element types, i.e., a lot of instantiation proofs and -- at run time --
   79.31    possibly slow dictionary constructions.
   79.32  \<close>
   79.33 @@ -492,8 +492,8 @@
   79.34    Provide more informative exceptions than Match for non-rewritten cases.
   79.35    If generated code raises one these exceptions, then a code equation calls
   79.36    the mentioned operator for an element type that is not an instance of
   79.37 -  @{class card_UNIV} and is therefore not implemented via @{term card_UNIV}.
   79.38 -  Constrain the element type with sort @{class card_UNIV} to change this.
   79.39 +  \<^class>\<open>card_UNIV\<close> and is therefore not implemented via \<^term>\<open>card_UNIV\<close>.
   79.40 +  Constrain the element type with sort \<^class>\<open>card_UNIV\<close> to change this.
   79.41  \<close>
   79.42  
   79.43  lemma card_coset_error [code]:
    80.1 --- a/src/HOL/Library/Code_Abstract_Nat.thy	Fri Jan 04 21:49:06 2019 +0100
    80.2 +++ b/src/HOL/Library/Code_Abstract_Nat.thy	Fri Jan 04 23:22:53 2019 +0100
    80.3 @@ -10,7 +10,7 @@
    80.4  
    80.5  text \<open>
    80.6    When natural numbers are implemented in another than the
    80.7 -  conventional inductive @{term "0::nat"}/@{term Suc} representation,
    80.8 +  conventional inductive \<^term>\<open>0::nat\<close>/\<^term>\<open>Suc\<close> representation,
    80.9    it is necessary to avoid all pattern matching on natural numbers
   80.10    altogether.  This is accomplished by this theory (up to a certain
   80.11    extent).
   80.12 @@ -31,7 +31,7 @@
   80.13  subsection \<open>Preprocessors\<close>
   80.14  
   80.15  text \<open>
   80.16 -  The term @{term "Suc n"} is no longer a valid pattern.  Therefore,
   80.17 +  The term \<^term>\<open>Suc n\<close> is no longer a valid pattern.  Therefore,
   80.18    all occurrences of this term in a position where a pattern is
   80.19    expected (i.e.~on the left-hand side of a code equation) must be
   80.20    eliminated.  This can be accomplished -- as far as possible -- by
   80.21 @@ -62,7 +62,7 @@
   80.22      val lhs_of = snd o Thm.dest_comb o fst o Thm.dest_comb o Thm.cprop_of;
   80.23      val rhs_of = snd o Thm.dest_comb o Thm.cprop_of;
   80.24      fun find_vars ct = (case Thm.term_of ct of
   80.25 -        (Const (@{const_name Suc}, _) $ Var _) => [(cv, snd (Thm.dest_comb ct))]
   80.26 +        (Const (\<^const_name>\<open>Suc\<close>, _) $ Var _) => [(cv, snd (Thm.dest_comb ct))]
   80.27        | _ $ _ =>
   80.28          let val (ct1, ct2) = Thm.dest_comb ct
   80.29          in 
   80.30 @@ -97,7 +97,7 @@
   80.31  fun eqn_suc_base_preproc ctxt thms =
   80.32    let
   80.33      val dest = fst o Logic.dest_equals o Thm.prop_of;
   80.34 -    val contains_suc = exists_Const (fn (c, _) => c = @{const_name Suc});
   80.35 +    val contains_suc = exists_Const (fn (c, _) => c = \<^const_name>\<open>Suc\<close>);
   80.36    in
   80.37      if forall (can dest) thms andalso exists (contains_suc o dest) thms
   80.38        then thms |> perhaps_loop (remove_suc ctxt) |> (Option.map o map) Drule.zero_var_indexes
    81.1 --- a/src/HOL/Library/Code_Binary_Nat.thy	Fri Jan 04 21:49:06 2019 +0100
    81.2 +++ b/src/HOL/Library/Code_Binary_Nat.thy	Fri Jan 04 23:22:53 2019 +0100
    81.3 @@ -10,8 +10,8 @@
    81.4  
    81.5  text \<open>
    81.6    When generating code for functions on natural numbers, the
    81.7 -  canonical representation using @{term "0::nat"} and
    81.8 -  @{term Suc} is unsuitable for computations involving large
    81.9 +  canonical representation using \<^term>\<open>0::nat\<close> and
   81.10 +  \<^term>\<open>Suc\<close> is unsuitable for computations involving large
   81.11    numbers.  This theory refines the representation of
   81.12    natural numbers for code generation to use binary
   81.13    numerals, which do not grow linear in size but logarithmic.
    82.1 --- a/src/HOL/Library/Code_Lazy.thy	Fri Jan 04 21:49:06 2019 +0100
    82.2 +++ b/src/HOL/Library/Code_Lazy.thy	Fri Jan 04 23:22:53 2019 +0100
    82.3 @@ -60,7 +60,7 @@
    82.4    by (rule term_of_anything)
    82.5  
    82.6  text \<open>
    82.7 -  The implementations of @{typ "_ lazy"} using language primitives cache forced values.
    82.8 +  The implementations of \<^typ>\<open>_ lazy\<close> using language primitives cache forced values.
    82.9  
   82.10    Term reconstruction for lazy looks into the lazy value and reconstructs it to the depth it has been evaluated.
   82.11    This is not done for Haskell as we do not know of any portable way to inspect whether a lazy value
   82.12 @@ -119,7 +119,7 @@
   82.13  code_reserved SML Lazy
   82.14  
   82.15  code_printing \<comment> \<open>For code generation within the Isabelle environment, we reuse the thread-safe
   82.16 -  implementation of lazy from @{file "~~/src/Pure/Concurrent/lazy.ML"}\<close>
   82.17 +  implementation of lazy from \<^file>\<open>~~/src/Pure/Concurrent/lazy.ML\<close>\<close>
   82.18    code_module Lazy \<rightharpoonup> (Eval) \<open>\<close> for constant undefined
   82.19  | type_constructor lazy \<rightharpoonup> (Eval) "_ Lazy.lazy"
   82.20  | constant delay \<rightharpoonup> (Eval) "Lazy.lazy"
   82.21 @@ -220,7 +220,7 @@
   82.22  
   82.23  code_reserved Scala Lazy
   82.24  
   82.25 -text \<open>Make evaluation with the simplifier respect @{term delay}s.\<close>
   82.26 +text \<open>Make evaluation with the simplifier respect \<^term>\<open>delay\<close>s.\<close>
   82.27  
   82.28  lemma delay_lazy_cong: "delay f = delay f" by simp
   82.29  setup \<open>Code_Simp.map_ss (Simplifier.add_cong @{thm delay_lazy_cong})\<close>        
    83.1 --- a/src/HOL/Library/Code_Prolog.thy	Fri Jan 04 21:49:06 2019 +0100
    83.2 +++ b/src/HOL/Library/Code_Prolog.thy	Fri Jan 04 23:22:53 2019 +0100
    83.3 @@ -13,8 +13,8 @@
    83.4  
    83.5  section \<open>Setup for Numerals\<close>
    83.6  
    83.7 -setup \<open>Predicate_Compile_Data.ignore_consts [@{const_name numeral}]\<close>
    83.8 +setup \<open>Predicate_Compile_Data.ignore_consts [\<^const_name>\<open>numeral\<close>]\<close>
    83.9  
   83.10 -setup \<open>Predicate_Compile_Data.keep_functions [@{const_name numeral}]\<close>
   83.11 +setup \<open>Predicate_Compile_Data.keep_functions [\<^const_name>\<open>numeral\<close>]\<close>
   83.12  
   83.13  end
    84.1 --- a/src/HOL/Library/Code_Target_Nat.thy	Fri Jan 04 21:49:06 2019 +0100
    84.2 +++ b/src/HOL/Library/Code_Target_Nat.thy	Fri Jan 04 23:22:53 2019 +0100
    84.3 @@ -8,7 +8,7 @@
    84.4  imports Code_Abstract_Nat
    84.5  begin
    84.6  
    84.7 -subsection \<open>Implementation for @{typ nat}\<close>
    84.8 +subsection \<open>Implementation for \<^typ>\<open>nat\<close>\<close>
    84.9  
   84.10  context
   84.11  includes natural.lifting integer.lifting
   84.12 @@ -163,8 +163,8 @@
   84.13    by (cases c) (simp add: nat_of_char_def integer_of_char_def integer_of_nat_eq_of_nat)
   84.14  
   84.15  lemma term_of_nat_code [code]:
   84.16 -  \<comment> \<open>Use @{term Code_Numeral.nat_of_integer} in term reconstruction
   84.17 -        instead of @{term Code_Target_Nat.Nat} such that reconstructed
   84.18 +  \<comment> \<open>Use \<^term>\<open>Code_Numeral.nat_of_integer\<close> in term reconstruction
   84.19 +        instead of \<^term>\<open>Code_Target_Nat.Nat\<close> such that reconstructed
   84.20          terms can be fed back to the code generator\<close>
   84.21    "term_of_class.term_of n =
   84.22     Code_Evaluation.App
    85.1 --- a/src/HOL/Library/Code_Test.thy	Fri Jan 04 21:49:06 2019 +0100
    85.2 +++ b/src/HOL/Library/Code_Test.thy	Fri Jan 04 23:22:53 2019 +0100
    85.3 @@ -9,7 +9,7 @@
    85.4  keywords "test_code" :: diag
    85.5  begin
    85.6  
    85.7 -subsection \<open>YXML encoding for @{typ Code_Evaluation.term}\<close>
    85.8 +subsection \<open>YXML encoding for \<^typ>\<open>Code_Evaluation.term\<close>\<close>
    85.9  
   85.10  datatype (plugins del: code size "quickcheck") yxml_of_term = YXML
   85.11  
   85.12 @@ -24,7 +24,7 @@
   85.13  definition yot_concat :: "yxml_of_term list \<Rightarrow> yxml_of_term"
   85.14    where [code del]: "yot_concat _ = YXML"
   85.15  
   85.16 -text \<open>Serialise @{typ yxml_of_term} to native string of target language\<close>
   85.17 +text \<open>Serialise \<^typ>\<open>yxml_of_term\<close> to native string of target language\<close>
   85.18  
   85.19  code_printing type_constructor yxml_of_term
   85.20    \<rightharpoonup>  (SML) "string"
   85.21 @@ -55,7 +55,7 @@
   85.22  text \<open>
   85.23    Stripped-down implementations of Isabelle's XML tree with YXML encoding as
   85.24    defined in \<^file>\<open>~~/src/Pure/PIDE/xml.ML\<close>, \<^file>\<open>~~/src/Pure/PIDE/yxml.ML\<close>
   85.25 -  sufficient to encode @{typ "Code_Evaluation.term"} as in
   85.26 +  sufficient to encode \<^typ>\<open>Code_Evaluation.term\<close> as in
   85.27    \<^file>\<open>~~/src/Pure/term_xml.ML\<close>.
   85.28  \<close>
   85.29  
   85.30 @@ -114,7 +114,7 @@
   85.31  where "yxml_string_of_body ts = foldr yxml_string_of_xml_tree ts yot_empty"
   85.32  
   85.33  text \<open>
   85.34 -  Encoding @{typ Code_Evaluation.term} into XML trees as defined in
   85.35 +  Encoding \<^typ>\<open>Code_Evaluation.term\<close> into XML trees as defined in
   85.36    \<^file>\<open>~~/src/Pure/term_xml.ML\<close>.
   85.37  \<close>
   85.38  
   85.39 @@ -132,8 +132,8 @@
   85.40    "xml_of_term (Code_Evaluation.Const x ty) = [xml.tagged (STR ''0'') (Some x) (xml_of_typ ty)]"
   85.41    "xml_of_term (Code_Evaluation.App t1 t2)  = [xml.tagged (STR ''5'') None [xml.node (xml_of_term t1), xml.node (xml_of_term t2)]]"
   85.42    "xml_of_term (Code_Evaluation.Abs x ty t) = [xml.tagged (STR ''4'') (Some x) [xml.node (xml_of_typ ty), xml.node (xml_of_term t)]]"
   85.43 -  \<comment> \<open>FIXME: @{const Code_Evaluation.Free} is used only in @{theory "HOL.Quickcheck_Narrowing"} to represent
   85.44 -    uninstantiated parameters in constructors. Here, we always translate them to @{ML Free} variables.\<close>
   85.45 +  \<comment> \<open>FIXME: \<^const>\<open>Code_Evaluation.Free\<close> is used only in \<^theory>\<open>HOL.Quickcheck_Narrowing\<close> to represent
   85.46 +    uninstantiated parameters in constructors. Here, we always translate them to \<^ML>\<open>Free\<close> variables.\<close>
   85.47    "xml_of_term (Code_Evaluation.Free x ty)  = [xml.tagged (STR ''1'') (Some x) (xml_of_typ ty)]"
   85.48  by(simp_all add: xml_of_term_def xml_tree_anything)
   85.49  
    86.1 --- a/src/HOL/Library/Complete_Partial_Order2.thy	Fri Jan 04 21:49:06 2019 +0100
    86.2 +++ b/src/HOL/Library/Complete_Partial_Order2.thy	Fri Jan 04 23:22:53 2019 +0100
    86.3 @@ -355,7 +355,7 @@
    86.4  (* apply cont_intro rules as intro and try to solve 
    86.5     the remaining of the emerging subgoals with simp *)
    86.6  fun cont_intro_tac ctxt =
    86.7 -  REPEAT_ALL_NEW (resolve_tac ctxt (rev (Named_Theorems.get ctxt @{named_theorems cont_intro})))
    86.8 +  REPEAT_ALL_NEW (resolve_tac ctxt (rev (Named_Theorems.get ctxt \<^named_theorems>\<open>cont_intro\<close>)))
    86.9    THEN_ALL_NEW (SOLVED' (simp_tac ctxt))
   86.10  
   86.11  fun cont_intro_simproc ctxt ct =
   86.12 @@ -370,9 +370,9 @@
   86.13        | NONE => NONE
   86.14    in
   86.15      case Thm.term_of ct of
   86.16 -      t as Const (@{const_name ccpo.admissible}, _) $ _ $ _ $ _ => mk_thm t
   86.17 -    | t as Const (@{const_name mcont}, _) $ _ $ _ $ _ $ _ $ _ => mk_thm t
   86.18 -    | t as Const (@{const_name monotone}, _) $ _ $ _ $ _ => mk_thm t
   86.19 +      t as Const (\<^const_name>\<open>ccpo.admissible\<close>, _) $ _ $ _ $ _ => mk_thm t
   86.20 +    | t as Const (\<^const_name>\<open>mcont\<close>, _) $ _ $ _ $ _ $ _ $ _ => mk_thm t
   86.21 +    | t as Const (\<^const_name>\<open>monotone\<close>, _) $ _ $ _ $ _ => mk_thm t
   86.22      | _ => NONE
   86.23    end
   86.24    handle THM _ => NONE 
   86.25 @@ -997,7 +997,7 @@
   86.26  
   86.27  end
   86.28  
   86.29 -subsection \<open>@{term "(=)"} as order\<close>
   86.30 +subsection \<open>\<^term>\<open>(=)\<close> as order\<close>
   86.31  
   86.32  definition lub_singleton :: "('a set \<Rightarrow> 'a) \<Rightarrow> bool"
   86.33  where "lub_singleton lub \<longleftrightarrow> (\<forall>a. lub {a} = a)"
   86.34 @@ -1431,13 +1431,13 @@
   86.35  interpretation lfp: partial_function_definitions "(\<le>) :: _ :: complete_lattice \<Rightarrow> _" Sup
   86.36  by(rule complete_lattice_partial_function_definitions)
   86.37  
   86.38 -declaration \<open>Partial_Function.init "lfp" @{term lfp.fixp_fun} @{term lfp.mono_body}
   86.39 +declaration \<open>Partial_Function.init "lfp" \<^term>\<open>lfp.fixp_fun\<close> \<^term>\<open>lfp.mono_body\<close>
   86.40    @{thm lfp.fixp_rule_uc} @{thm lfp.fixp_induct_uc} NONE\<close>
   86.41  
   86.42  interpretation gfp: partial_function_definitions "(\<ge>) :: _ :: complete_lattice \<Rightarrow> _" Inf
   86.43  by(rule complete_lattice_partial_function_definitions_dual)
   86.44  
   86.45 -declaration \<open>Partial_Function.init "gfp" @{term gfp.fixp_fun} @{term gfp.mono_body}
   86.46 +declaration \<open>Partial_Function.init "gfp" \<^term>\<open>gfp.fixp_fun\<close> \<^term>\<open>gfp.mono_body\<close>
   86.47    @{thm gfp.fixp_rule_uc} @{thm gfp.fixp_induct_uc} NONE\<close>
   86.48  
   86.49  lemma insert_mono [partial_function_mono]:
    87.1 --- a/src/HOL/Library/Countable.thy	Fri Jan 04 21:49:06 2019 +0100
    87.2 +++ b/src/HOL/Library/Countable.thy	Fri Jan 04 23:22:53 2019 +0100
    87.3 @@ -168,7 +168,7 @@
    87.4        let
    87.5          val ty_name =
    87.6            (case goal of
    87.7 -            (_ $ Const (@{const_name Pure.type}, Type (@{type_name itself}, [Type (n, _)]))) => n
    87.8 +            (_ $ Const (\<^const_name>\<open>Pure.type\<close>, Type (\<^type_name>\<open>itself\<close>, [Type (n, _)]))) => n
    87.9            | _ => raise Match)
   87.10          val typedef_info = hd (Typedef.get_info ctxt ty_name)
   87.11          val typedef_thm = #type_definition (snd typedef_info)
   87.12 @@ -183,7 +183,7 @@
   87.13          val induct_thm = the (AList.lookup (op =) alist pred_name)
   87.14          val vars = rev (Term.add_vars (Thm.prop_of induct_thm) [])
   87.15          val insts = vars |> map (fn (_, T) => try (Thm.cterm_of ctxt)
   87.16 -          (Const (@{const_name Countable.finite_item}, T)))
   87.17 +          (Const (\<^const_name>\<open>Countable.finite_item\<close>, T)))
   87.18          val induct_thm' = Thm.instantiate' [] insts induct_thm
   87.19          val rules = @{thms finite_item.intros}
   87.20        in
    88.1 --- a/src/HOL/Library/Countable_Set_Type.thy	Fri Jan 04 21:49:06 2019 +0100
    88.2 +++ b/src/HOL/Library/Countable_Set_Type.thy	Fri Jan 04 23:22:53 2019 +0100
    88.3 @@ -413,7 +413,7 @@
    88.4  apply (rule equal_intr_rule)
    88.5  by (transfer, simp)+
    88.6  
    88.7 -subsubsection \<open>@{const cUnion}\<close>
    88.8 +subsubsection \<open>\<^const>\<open>cUnion\<close>\<close>
    88.9  
   88.10  lemma cUNION_cimage: "cUNION (cimage f A) g = cUNION A (g \<circ> f)"
   88.11    by transfer simp
    89.1 --- a/src/HOL/Library/DAList_Multiset.thy	Fri Jan 04 21:49:06 2019 +0100
    89.2 +++ b/src/HOL/Library/DAList_Multiset.thy	Fri Jan 04 23:22:53 2019 +0100
    89.3 @@ -202,7 +202,7 @@
    89.4  lemma mset_eq [code]: "HOL.equal (m1::'a::equal multiset) m2 \<longleftrightarrow> m1 \<subseteq># m2 \<and> m2 \<subseteq># m1"
    89.5    by (metis equal_multiset_def subset_mset.eq_iff)
    89.6  
    89.7 -text \<open>By default the code for \<open><\<close> is @{prop"xs < ys \<longleftrightarrow> xs \<le> ys \<and> \<not> xs = ys"}.
    89.8 +text \<open>By default the code for \<open><\<close> is \<^prop>\<open>xs < ys \<longleftrightarrow> xs \<le> ys \<and> \<not> xs = ys\<close>.
    89.9  With equality implemented by \<open>\<le>\<close>, this leads to three calls of  \<open>\<le>\<close>.
   89.10  Here is a more efficient version:\<close>
   89.11  lemma mset_less[code]: "xs \<subset># (ys :: 'a multiset) \<longleftrightarrow> xs \<subseteq># ys \<and> \<not> ys \<subseteq># xs"
    90.1 --- a/src/HOL/Library/Disjoint_Sets.thy	Fri Jan 04 21:49:06 2019 +0100
    90.2 +++ b/src/HOL/Library/Disjoint_Sets.thy	Fri Jan 04 23:22:53 2019 +0100
    90.3 @@ -234,7 +234,7 @@
    90.4  subsection \<open>Partitions\<close>
    90.5  
    90.6  text \<open>
    90.7 -  Partitions @{term P} of a set @{term A}. We explicitly disallow empty sets.
    90.8 +  Partitions \<^term>\<open>P\<close> of a set \<^term>\<open>A\<close>. We explicitly disallow empty sets.
    90.9  \<close>
   90.10  
   90.11  definition partition_on :: "'a set \<Rightarrow> 'a set set \<Rightarrow> bool"
    91.1 --- a/src/HOL/Library/Dlist.thy	Fri Jan 04 21:49:06 2019 +0100
    91.2 +++ b/src/HOL/Library/Dlist.thy	Fri Jan 04 23:22:53 2019 +0100
    91.3 @@ -25,7 +25,7 @@
    91.4    "list_of_dlist dxs = list_of_dlist dys \<Longrightarrow> dxs = dys"
    91.5    by (simp add: dlist_eq_iff)
    91.6  
    91.7 -text \<open>Formal, totalized constructor for @{typ "'a dlist"}:\<close>
    91.8 +text \<open>Formal, totalized constructor for \<^typ>\<open>'a dlist\<close>:\<close>
    91.9  
   91.10  definition Dlist :: "'a list \<Rightarrow> 'a dlist" where
   91.11    "Dlist xs = Abs_dlist (remdups xs)"
    92.1 --- a/src/HOL/Library/Extended_Nat.thy	Fri Jan 04 21:49:06 2019 +0100
    92.2 +++ b/src/HOL/Library/Extended_Nat.thy	Fri Jan 04 23:22:53 2019 +0100
    92.3 @@ -33,7 +33,7 @@
    92.4  
    92.5  typedef enat = "UNIV :: nat option set" ..
    92.6  
    92.7 -text \<open>TODO: introduce enat as coinductive datatype, enat is just @{const of_nat}\<close>
    92.8 +text \<open>TODO: introduce enat as coinductive datatype, enat is just \<^const>\<open>of_nat\<close>\<close>
    92.9  
   92.10  definition enat :: "nat \<Rightarrow> enat" where
   92.11    "enat n = Abs_enat (Some n)"
   92.12 @@ -537,7 +537,7 @@
   92.13            if u aconv t then (rev past @ terms)
   92.14            else find_first_t (t::past) u terms
   92.15  
   92.16 -  fun dest_summing (Const (@{const_name Groups.plus}, _) $ t $ u, ts) =
   92.17 +  fun dest_summing (Const (\<^const_name>\<open>Groups.plus\<close>, _) $ t $ u, ts) =
   92.18          dest_summing (t, dest_summing (u, ts))
   92.19      | dest_summing (t, ts) = t :: ts
   92.20  
   92.21 @@ -546,7 +546,7 @@
   92.22    val find_first = find_first_t []
   92.23    val trans_tac = Numeral_Simprocs.trans_tac
   92.24    val norm_ss =
   92.25 -    simpset_of (put_simpset HOL_basic_ss @{context}
   92.26 +    simpset_of (put_simpset HOL_basic_ss \<^context>
   92.27        addsimps @{thms ac_simps add_0_left add_0_right})
   92.28    fun norm_tac ctxt = ALLGOALS (simp_tac (put_simpset norm_ss ctxt))
   92.29    fun simplify_meta_eq ctxt cancel_th th =
   92.30 @@ -558,21 +558,21 @@
   92.31  structure Eq_Enat_Cancel = ExtractCommonTermFun
   92.32  (open Cancel_Enat_Common
   92.33    val mk_bal = HOLogic.mk_eq
   92.34 -  val dest_bal = HOLogic.dest_bin @{const_name HOL.eq} @{typ enat}
   92.35 +  val dest_bal = HOLogic.dest_bin \<^const_name>\<open>HOL.eq\<close> \<^typ>\<open>enat\<close>
   92.36    fun simp_conv _ _ = SOME @{thm enat_add_left_cancel}
   92.37  )
   92.38  
   92.39  structure Le_Enat_Cancel = ExtractCommonTermFun
   92.40  (open Cancel_Enat_Common
   92.41 -  val mk_bal = HOLogic.mk_binrel @{const_name Orderings.less_eq}
   92.42 -  val dest_bal = HOLogic.dest_bin @{const_name Orderings.less_eq} @{typ enat}
   92.43 +  val mk_bal = HOLogic.mk_binrel \<^const_name>\<open>Orderings.less_eq\<close>
   92.44 +  val dest_bal = HOLogic.dest_bin \<^const_name>\<open>Orderings.less_eq\<close> \<^typ>\<open>enat\<close>
   92.45    fun simp_conv _ _ = SOME @{thm enat_add_left_cancel_le}
   92.46  )
   92.47  
   92.48  structure Less_Enat_Cancel = ExtractCommonTermFun
   92.49  (open Cancel_Enat_Common
   92.50 -  val mk_bal = HOLogic.mk_binrel @{const_name Orderings.less}
   92.51 -  val dest_bal = HOLogic.dest_bin @{const_name Orderings.less} @{typ enat}
   92.52 +  val mk_bal = HOLogic.mk_binrel \<^const_name>\<open>Orderings.less\<close>
   92.53 +  val dest_bal = HOLogic.dest_bin \<^const_name>\<open>Orderings.less\<close> \<^typ>\<open>enat\<close>
   92.54    fun simp_conv _ _ = SOME @{thm enat_add_left_cancel_less}
   92.55  )
   92.56  \<close>
    93.1 --- a/src/HOL/Library/Extended_Nonnegative_Real.thy	Fri Jan 04 21:49:06 2019 +0100
    93.2 +++ b/src/HOL/Library/Extended_Nonnegative_Real.thy	Fri Jan 04 23:22:53 2019 +0100
    93.3 @@ -408,7 +408,7 @@
    93.4            if u aconv t then (rev past @ terms)
    93.5            else find_first_t (t::past) u terms
    93.6  
    93.7 -  fun dest_summing (Const (@{const_name Groups.plus}, _) $ t $ u, ts) =
    93.8 +  fun dest_summing (Const (\<^const_name>\<open>Groups.plus\<close>, _) $ t $ u, ts) =
    93.9          dest_summing (t, dest_summing (u, ts))
   93.10      | dest_summing (t, ts) = t :: ts
   93.11  
   93.12 @@ -417,7 +417,7 @@
   93.13    val find_first = find_first_t []
   93.14    val trans_tac = Numeral_Simprocs.trans_tac
   93.15    val norm_ss =
   93.16 -    simpset_of (put_simpset HOL_basic_ss @{context}
   93.17 +    simpset_of (put_simpset HOL_basic_ss \<^context>
   93.18        addsimps @{thms ac_simps add_0_left add_0_right})
   93.19    fun norm_tac ctxt = ALLGOALS (simp_tac (put_simpset norm_ss ctxt))
   93.20    fun simplify_meta_eq ctxt cancel_th th =
   93.21 @@ -429,21 +429,21 @@
   93.22  structure Eq_Ennreal_Cancel = ExtractCommonTermFun
   93.23  (open Cancel_Ennreal_Common
   93.24    val mk_bal = HOLogic.mk_eq
   93.25 -  val dest_bal = HOLogic.dest_bin @{const_name HOL.eq} @{typ ennreal}
   93.26 +  val dest_bal = HOLogic.dest_bin \<^const_name>\<open>HOL.eq\<close> \<^typ>\<open>ennreal\<close>
   93.27    fun simp_conv _ _ = SOME @{thm ennreal_add_left_cancel}
   93.28  )
   93.29  
   93.30  structure Le_Ennreal_Cancel = ExtractCommonTermFun
   93.31  (open Cancel_Ennreal_Common
   93.32 -  val mk_bal = HOLogic.mk_binrel @{const_name Orderings.less_eq}
   93.33 -  val dest_bal = HOLogic.dest_bin @{const_name Orderings.less_eq} @{typ ennreal}
   93.34 +  val mk_bal = HOLogic.mk_binrel \<^const_name>\<open>Orderings.less_eq\<close>
   93.35 +  val dest_bal = HOLogic.dest_bin \<^const_name>\<open>Orderings.less_eq\<close> \<^typ>\<open>ennreal\<close>
   93.36    fun simp_conv _ _ = SOME @{thm ennreal_add_left_cancel_le}
   93.37  )
   93.38  
   93.39  structure Less_Ennreal_Cancel = ExtractCommonTermFun
   93.40  (open Cancel_Ennreal_Common
   93.41 -  val mk_bal = HOLogic.mk_binrel @{const_name Orderings.less}
   93.42 -  val dest_bal = HOLogic.dest_bin @{const_name Orderings.less} @{typ ennreal}
   93.43 +  val mk_bal = HOLogic.mk_binrel \<^const_name>\<open>Orderings.less\<close>
   93.44 +  val dest_bal = HOLogic.dest_bin \<^const_name>\<open>Orderings.less\<close> \<^typ>\<open>ennreal\<close>
   93.45    fun simp_conv _ _ = SOME @{thm ennreal_add_left_cancel_less}
   93.46  )
   93.47  \<close>
   93.48 @@ -828,7 +828,7 @@
   93.49      by (cases a) (auto simp: top_ereal_def)
   93.50    done
   93.51  
   93.52 -subsection \<open>Coercion from @{typ real} to @{typ ennreal}\<close>
   93.53 +subsection \<open>Coercion from \<^typ>\<open>real\<close> to \<^typ>\<open>ennreal\<close>\<close>
   93.54  
   93.55  lift_definition ennreal :: "real \<Rightarrow> ennreal" is "sup 0 \<circ> ereal"
   93.56    by simp
   93.57 @@ -1059,7 +1059,7 @@
   93.58    by (cases x rule: ennreal_cases)
   93.59       (auto simp: ennreal_of_nat_eq_real_of_nat ennreal_less_iff reals_Archimedean2)
   93.60  
   93.61 -subsection \<open>Coercion from @{typ ennreal} to @{typ real}\<close>
   93.62 +subsection \<open>Coercion from \<^typ>\<open>ennreal\<close> to \<^typ>\<open>real\<close>\<close>
   93.63  
   93.64  definition "enn2real x = real_of_ereal (enn2ereal x)"
   93.65  
   93.66 @@ -1106,7 +1106,7 @@
   93.67  lemma enn2real_eq_1_iff[simp]: "enn2real x = 1 \<longleftrightarrow> x = 1"
   93.68    by (cases x) auto
   93.69  
   93.70 -subsection \<open>Coercion from @{typ enat} to @{typ ennreal}\<close>
   93.71 +subsection \<open>Coercion from \<^typ>\<open>enat\<close> to \<^typ>\<open>ennreal\<close>\<close>
   93.72  
   93.73  
   93.74  definition ennreal_of_enat :: "enat \<Rightarrow> ennreal"
   93.75 @@ -1174,7 +1174,7 @@
   93.76  lemma ennreal_of_enat_eSuc[simp]: "ennreal_of_enat (eSuc x) = 1 + ennreal_of_enat x"
   93.77    by (cases x) (auto simp: eSuc_enat)
   93.78  
   93.79 -subsection \<open>Topology on @{typ ennreal}\<close>
   93.80 +subsection \<open>Topology on \<^typ>\<open>ennreal\<close>\<close>
   93.81  
   93.82  lemma enn2ereal_Iio: "enn2ereal -` {..<a} = (if 0 \<le> a then {..< e2ennreal a} else {})"
   93.83    using enn2ereal_nonneg
   93.84 @@ -1774,7 +1774,7 @@
   93.85  lifting_forget ennreal.lifting
   93.86  
   93.87  
   93.88 -subsection \<open>@{typ ennreal} theorems\<close>
   93.89 +subsection \<open>\<^typ>\<open>ennreal\<close> theorems\<close>
   93.90  
   93.91  lemma neq_top_trans: fixes x y :: ennreal shows "\<lbrakk> y \<noteq> top; x \<le> y \<rbrakk> \<Longrightarrow> x \<noteq> top"
   93.92  by (auto simp: top_unique)
    94.1 --- a/src/HOL/Library/Extended_Real.thy	Fri Jan 04 21:49:06 2019 +0100
    94.2 +++ b/src/HOL/Library/Extended_Real.thy	Fri Jan 04 23:22:53 2019 +0100
    94.3 @@ -13,9 +13,8 @@
    94.4  begin
    94.5  
    94.6  text \<open>
    94.7 -  This should be part of @{theory "HOL-Library.Extended_Nat"} or @{theory
    94.8 -  "HOL-Library.Order_Continuity"}, but then the AFP-entry \<open>Jinja_Thread\<close> fails, as it does overload
    94.9 -  certain named from @{theory Complex_Main}.
   94.10 +  This should be part of \<^theory>\<open>HOL-Library.Extended_Nat\<close> or \<^theory>\<open>HOL-Library.Order_Continuity\<close>, but then the AFP-entry \<open>Jinja_Thread\<close> fails, as it does overload
   94.11 +  certain named from \<^theory>\<open>Complex_Main\<close>.
   94.12  \<close>
   94.13  
   94.14  lemma incseq_sumI2:
   94.15 @@ -468,7 +467,7 @@
   94.16    by (cases rule: ereal2_cases[of a b]) auto
   94.17  
   94.18  
   94.19 -subsubsection "Linear order on @{typ ereal}"
   94.20 +subsubsection "Linear order on \<^typ>\<open>ereal\<close>"
   94.21  
   94.22  instantiation ereal :: linorder
   94.23  begin
   94.24 @@ -2540,7 +2539,7 @@
   94.25    "A \<noteq> {} \<Longrightarrow> \<exists>f::nat \<Rightarrow> ereal. range f \<subseteq> g`A \<and> Sup (g ` A) = Sup (f ` UNIV)"
   94.26    using Sup_countable_SUP [of "g`A"] by auto
   94.27  
   94.28 -subsection "Relation to @{typ enat}"
   94.29 +subsection "Relation to \<^typ>\<open>enat\<close>"
   94.30  
   94.31  definition "ereal_of_enat n = (case n of enat n \<Rightarrow> ereal (real n) | \<infinity> \<Rightarrow> \<infinity>)"
   94.32  
   94.33 @@ -2629,7 +2628,7 @@
   94.34    "A \<noteq> {} \<Longrightarrow> ereal_of_enat (SUP a\<in>A. f a) = (SUP a \<in> A. ereal_of_enat (f a))"
   94.35    using ereal_of_enat_Sup[of "f`A"] by auto
   94.36  
   94.37 -subsection "Limits on @{typ ereal}"
   94.38 +subsection "Limits on \<^typ>\<open>ereal\<close>"
   94.39  
   94.40  lemma open_PInfty: "open A \<Longrightarrow> \<infinity> \<in> A \<Longrightarrow> (\<exists>x. {ereal x<..} \<subseteq> A)"
   94.41    unfolding open_ereal_generated
    95.1 --- a/src/HOL/Library/FSet.thy	Fri Jan 04 21:49:06 2019 +0100
    95.2 +++ b/src/HOL/Library/FSet.thy	Fri Jan 04 23:22:53 2019 +0100
    95.3 @@ -1207,7 +1207,7 @@
    95.4    including fset.lifting by transfer (auto intro: sum.reindex_cong subset_inj_on)
    95.5  
    95.6  setup \<open>
    95.7 -BNF_LFP_Size.register_size_global @{type_name fset} @{const_name size_fset}
    95.8 +BNF_LFP_Size.register_size_global \<^type_name>\<open>fset\<close> \<^const_name>\<open>size_fset\<close>
    95.9    @{thm size_fset_overloaded_def} @{thms size_fset_simps size_fset_overloaded_simps}
   95.10    @{thms fset_size_o_map}
   95.11  \<close>
    96.1 --- a/src/HOL/Library/Finite_Lattice.thy	Fri Jan 04 21:49:06 2019 +0100
    96.2 +++ b/src/HOL/Library/Finite_Lattice.thy	Fri Jan 04 23:22:53 2019 +0100
    96.3 @@ -8,14 +8,14 @@
    96.4  
    96.5  text \<open>A non-empty finite lattice is a complete lattice.
    96.6  Since types are never empty in Isabelle/HOL,
    96.7 -a type of classes @{class finite} and @{class lattice}
    96.8 -should also have class @{class complete_lattice}.
    96.9 +a type of classes \<^class>\<open>finite\<close> and \<^class>\<open>lattice\<close>
   96.10 +should also have class \<^class>\<open>complete_lattice\<close>.
   96.11  A type class is defined
   96.12 -that extends classes @{class finite} and @{class lattice}
   96.13 -with the operators @{const bot}, @{const top}, @{const Inf}, and @{const Sup},
   96.14 +that extends classes \<^class>\<open>finite\<close> and \<^class>\<open>lattice\<close>
   96.15 +with the operators \<^const>\<open>bot\<close>, \<^const>\<open>top\<close>, \<^const>\<open>Inf\<close>, and \<^const>\<open>Sup\<close>,
   96.16  along with assumptions that define these operators
   96.17 -in terms of the ones of classes @{class finite} and @{class lattice}.
   96.18 -The resulting class is a subclass of @{class complete_lattice}.\<close>
   96.19 +in terms of the ones of classes \<^class>\<open>finite\<close> and \<^class>\<open>lattice\<close>.
   96.20 +The resulting class is a subclass of \<^class>\<open>complete_lattice\<close>.\<close>
   96.21  
   96.22  class finite_lattice_complete = finite + lattice + bot + top + Inf + Sup +
   96.23    assumes bot_def: "bot = Inf_fin UNIV"
   96.24 @@ -24,8 +24,8 @@
   96.25    assumes Sup_def: "Sup A = Finite_Set.fold sup bot A"
   96.26  
   96.27  text \<open>The definitional assumptions
   96.28 -on the operators @{const bot} and @{const top}
   96.29 -of class @{class finite_lattice_complete}
   96.30 +on the operators \<^const>\<open>bot\<close> and \<^const>\<open>top\<close>
   96.31 +of class \<^class>\<open>finite_lattice_complete\<close>
   96.32  ensure that they yield bottom and top.\<close>
   96.33  
   96.34  lemma finite_lattice_complete_bot_least: "(bot::'a::finite_lattice_complete) \<le> x"
   96.35 @@ -43,8 +43,8 @@
   96.36  instance finite_lattice_complete \<subseteq> bounded_lattice ..
   96.37  
   96.38  text \<open>The definitional assumptions
   96.39 -on the operators @{const Inf} and @{const Sup}
   96.40 -of class @{class finite_lattice_complete}
   96.41 +on the operators \<^const>\<open>Inf\<close> and \<^const>\<open>Sup\<close>
   96.42 +of class \<^class>\<open>finite_lattice_complete\<close>
   96.43  ensure that they yield infimum and supremum.\<close>
   96.44  
   96.45  lemma finite_lattice_complete_Inf_empty: "Inf {} = (top :: 'a::finite_lattice_complete)"
   96.46 @@ -152,8 +152,8 @@
   96.47  subsection \<open>Finite Distributive Lattices\<close>
   96.48  
   96.49  text \<open>A finite distributive lattice is a complete lattice
   96.50 -whose @{const inf} and @{const sup} operators
   96.51 -distribute over @{const Sup} and @{const Inf}.\<close>
   96.52 +whose \<^const>\<open>inf\<close> and \<^const>\<open>sup\<close> operators
   96.53 +distribute over \<^const>\<open>Sup\<close> and \<^const>\<open>Inf\<close>.\<close>
   96.54  
   96.55  class finite_distrib_lattice_complete =
   96.56    distrib_lattice + finite_lattice_complete
   96.57 @@ -203,19 +203,19 @@
   96.58  
   96.59  text \<open>A linear order is a distributive lattice.
   96.60  A type class is defined
   96.61 -that extends class @{class linorder}
   96.62 -with the operators @{const inf} and @{const sup},
   96.63 +that extends class \<^class>\<open>linorder\<close>
   96.64 +with the operators \<^const>\<open>inf\<close> and \<^const>\<open>sup\<close>,
   96.65  along with assumptions that define these operators
   96.66 -in terms of the ones of class @{class linorder}.
   96.67 -The resulting class is a subclass of @{class distrib_lattice}.\<close>
   96.68 +in terms of the ones of class \<^class>\<open>linorder\<close>.
   96.69 +The resulting class is a subclass of \<^class>\<open>distrib_lattice\<close>.\<close>
   96.70  
   96.71  class linorder_lattice = linorder + inf + sup +
   96.72    assumes inf_def: "inf x y = (if x \<le> y then x else y)"
   96.73    assumes sup_def: "sup x y = (if x \<ge> y then x else y)"
   96.74  
   96.75  text \<open>The definitional assumptions
   96.76 -on the operators @{const inf} and @{const sup}
   96.77 -of class @{class linorder_lattice}
   96.78 +on the operators \<^const>\<open>inf\<close> and \<^const>\<open>sup\<close>
   96.79 +of class \<^class>\<open>linorder_lattice\<close>
   96.80  ensure that they yield infimum and supremum
   96.81  and that they distribute over each other.\<close>
   96.82  
   96.83 @@ -264,8 +264,8 @@
   96.84  instance finite_linorder_complete \<subseteq> complete_linorder ..
   96.85  
   96.86  text \<open>A (non-empty) finite linear order is a complete lattice
   96.87 -whose @{const inf} and @{const sup} operators
   96.88 -distribute over @{const Sup} and @{const Inf}.\<close>
   96.89 +whose \<^const>\<open>inf\<close> and \<^const>\<open>sup\<close> operators
   96.90 +distribute over \<^const>\<open>Sup\<close> and \<^const>\<open>Inf\<close>.\<close>
   96.91  
   96.92  instance finite_linorder_complete \<subseteq> finite_distrib_lattice_complete ..
   96.93  
    97.1 --- a/src/HOL/Library/Finite_Map.thy	Fri Jan 04 21:49:06 2019 +0100
    97.2 +++ b/src/HOL/Library/Finite_Map.thy	Fri Jan 04 23:22:53 2019 +0100
    97.3 @@ -9,7 +9,7 @@
    97.4    abbrevs "(=" = "\<subseteq>\<^sub>f"
    97.5  begin
    97.6  
    97.7 -subsection \<open>Auxiliary constants and lemmas over @{type map}\<close>
    97.8 +subsection \<open>Auxiliary constants and lemmas over \<^type>\<open>map\<close>\<close>
    97.9  
   97.10  parametric_constant map_add_transfer[transfer_rule]: map_add_def
   97.11  parametric_constant map_of_transfer[transfer_rule]: map_of_def
   97.12 @@ -1029,7 +1029,7 @@
   97.13  by transfer' (auto simp: set_of_map_def)
   97.14  
   97.15  
   97.16 -subsection \<open>@{const size} setup\<close>
   97.17 +subsection \<open>\<^const>\<open>size\<close> setup\<close>
   97.18  
   97.19  definition size_fmap :: "('a \<Rightarrow> nat) \<Rightarrow> ('b \<Rightarrow> nat) \<Rightarrow> ('a, 'b) fmap \<Rightarrow> nat" where
   97.20  [simp]: "size_fmap f g m = size_fset (\<lambda>(a, b). f a + g b) (fset_of_fmap m)"
   97.21 @@ -1060,7 +1060,7 @@
   97.22    done
   97.23  
   97.24  setup \<open>
   97.25 -BNF_LFP_Size.register_size_global @{type_name fmap} @{const_name size_fmap}
   97.26 +BNF_LFP_Size.register_size_global \<^type_name>\<open>fmap\<close> \<^const_name>\<open>size_fmap\<close>
   97.27    @{thm size_fmap_overloaded_def} @{thms size_fmap_def size_fmap_overloaded_simps}
   97.28    @{thms fmap_size_o_map}
   97.29  \<close>
   97.30 @@ -1431,7 +1431,7 @@
   97.31    fmfilter fmadd fmmap fmmap_keys fmcomp
   97.32    checking SML Scala Haskell? OCaml?
   97.33  
   97.34 -\<comment> \<open>\<open>lifting\<close> through @{type fmap}\<close>
   97.35 +\<comment> \<open>\<open>lifting\<close> through \<^type>\<open>fmap\<close>\<close>
   97.36  
   97.37  experiment begin
   97.38  
    98.1 --- a/src/HOL/Library/Float.thy	Fri Jan 04 21:49:06 2019 +0100
    98.2 +++ b/src/HOL/Library/Float.thy	Fri Jan 04 23:22:53 2019 +0100
    98.3 @@ -639,7 +639,7 @@
    98.4  end
    98.5  
    98.6  
    98.7 -subsection \<open>Lemmas for types @{typ real}, @{typ nat}, @{typ int}\<close>
    98.8 +subsection \<open>Lemmas for types \<^typ>\<open>real\<close>, \<^typ>\<open>nat\<close>, \<^typ>\<open>int\<close>\<close>
    98.9  
   98.10  lemmas real_of_ints =
   98.11    of_int_add
    99.1 --- a/src/HOL/Library/FuncSet.thy	Fri Jan 04 21:49:06 2019 +0100
    99.2 +++ b/src/HOL/Library/FuncSet.thy	Fri Jan 04 23:22:53 2019 +0100
    99.3 @@ -33,7 +33,7 @@
    99.4    where "compose A g f = (\<lambda>x\<in>A. g (f x))"
    99.5  
    99.6  
    99.7 -subsection \<open>Basic Properties of @{term Pi}\<close>
    99.8 +subsection \<open>Basic Properties of \<^term>\<open>Pi\<close>\<close>
    99.9  
   99.10  lemma Pi_I[intro!]: "(\<And>x. x \<in> A \<Longrightarrow> f x \<in> B x) \<Longrightarrow> f \<in> Pi A B"
   99.11    by (simp add: Pi_def)
   99.12 @@ -72,7 +72,7 @@
   99.13    apply (simp add: Pi_def)
   99.14    apply auto
   99.15    txt \<open>Converse direction requires Axiom of Choice to exhibit a function
   99.16 -  picking an element from each non-empty @{term "B x"}\<close>
   99.17 +  picking an element from each non-empty \<^term>\<open>B x\<close>\<close>
   99.18    apply (drule_tac x = "\<lambda>u. SOME y. y \<in> B u" in spec)
   99.19    apply auto
   99.20    apply (cut_tac P = "\<lambda>y. y \<in> B x" in some_eq_ex)
   99.21 @@ -156,7 +156,7 @@
   99.22    done
   99.23  
   99.24  
   99.25 -subsection \<open>Composition With a Restricted Domain: @{term compose}\<close>
   99.26 +subsection \<open>Composition With a Restricted Domain: \<^term>\<open>compose\<close>\<close>
   99.27  
   99.28  lemma funcset_compose: "f \<in> A \<rightarrow> B \<Longrightarrow> g \<in> B \<rightarrow> C \<Longrightarrow> compose A g f \<in> A \<rightarrow> C"
   99.29    by (simp add: Pi_def compose_def restrict_def)
   99.30 @@ -173,7 +173,7 @@
   99.31    by (auto simp add: image_def compose_eq)
   99.32  
   99.33  
   99.34 -subsection \<open>Bounded Abstraction: @{term restrict}\<close>
   99.35 +subsection \<open>Bounded Abstraction: \<^term>\<open>restrict\<close>\<close>
   99.36  
   99.37  lemma restrict_cong: "I = J \<Longrightarrow> (\<And>i. i \<in> J =simp=> f i = g i) \<Longrightarrow> restrict f I = restrict g J"
   99.38    by (auto simp: restrict_def fun_eq_iff simp_implies_def)
   99.39 @@ -223,8 +223,8 @@
   99.40  
   99.41  subsection \<open>Bijections Between Sets\<close>
   99.42  
   99.43 -text \<open>The definition of @{const bij_betw} is in \<open>Fun.thy\<close>, but most of
   99.44 -the theorems belong here, or need at least @{term Hilbert_Choice}.\<close>
   99.45 +text \<open>The definition of \<^const>\<open>bij_betw\<close> is in \<open>Fun.thy\<close>, but most of
   99.46 +the theorems belong here, or need at least \<^term>\<open>Hilbert_Choice\<close>.\<close>
   99.47  
   99.48  lemma bij_betwI:
   99.49    assumes "f \<in> A \<rightarrow> B"
   100.1 --- a/src/HOL/Library/Function_Division.thy	Fri Jan 04 21:49:06 2019 +0100
   100.2 +++ b/src/HOL/Library/Function_Division.thy	Fri Jan 04 23:22:53 2019 +0100
   100.3 @@ -32,7 +32,7 @@
   100.4  text \<open>
   100.5    Unfortunately, we cannot lift this operations to algebraic type
   100.6    classes for division: being different from the constant
   100.7 -  zero function @{term "f \<noteq> 0"} is too weak as precondition.
   100.8 +  zero function \<^term>\<open>f \<noteq> 0\<close> is too weak as precondition.
   100.9    So we must introduce our own set of lemmas.
  100.10  \<close>
  100.11  
  100.12 @@ -58,8 +58,8 @@
  100.13  
  100.14  text \<open>
  100.15    Another possibility would be a reformulation of the division type
  100.16 -  classes to user a @{term zero_free} predicate rather than
  100.17 -  a direct @{term "a \<noteq> 0"} condition.
  100.18 +  classes to user a \<^term>\<open>zero_free\<close> predicate rather than
  100.19 +  a direct \<^term>\<open>a \<noteq> 0\<close> condition.
  100.20  \<close>
  100.21  
  100.22  end
   101.1 --- a/src/HOL/Library/Going_To_Filter.thy	Fri Jan 04 21:49:06 2019 +0100
   101.2 +++ b/src/HOL/Library/Going_To_Filter.thy	Fri Jan 04 23:22:53 2019 +0100
   101.3 @@ -20,26 +20,26 @@
   101.4      where "f going_to F \<equiv> f going_to F within UNIV"
   101.5  
   101.6  text \<open>
   101.7 -  The \<open>going_to\<close> filter is, in a sense, the opposite of @{term filtermap}. 
   101.8 +  The \<open>going_to\<close> filter is, in a sense, the opposite of \<^term>\<open>filtermap\<close>. 
   101.9    It corresponds to the intuition of, given a function $f: A \to B$ and a filter $F$ on the 
  101.10    range of $B$, looking at such values of $x$ that $f(x)$ approaches $F$. This can be 
  101.11 -  written as @{term "f going_to F"}.
  101.12 +  written as \<^term>\<open>f going_to F\<close>.
  101.13    
  101.14 -  A classic example is the @{term "at_infinity"} filter, which describes the neigbourhood
  101.15 +  A classic example is the \<^term>\<open>at_infinity\<close> filter, which describes the neigbourhood
  101.16    of infinity (i.\,e.\ all values sufficiently far away from the zero). This can also be written
  101.17 -  as @{term "norm going_to at_top"}.
  101.18 +  as \<^term>\<open>norm going_to at_top\<close>.
  101.19  
  101.20    Additionally, the \<open>going_to\<close> filter can be restricted with an optional `within' parameter.
  101.21    For instance, if one would would want to consider the filter of complex numbers near infinity
  101.22    that do not lie on the negative real line, one could write 
  101.23 -  @{term "norm going_to at_top within - complex_of_real ` {..0}"}.
  101.24 +  \<^term>\<open>norm going_to at_top within - complex_of_real ` {..0}\<close>.
  101.25  
  101.26    A third, less mathematical example lies in the complexity analysis of algorithms.
  101.27    Suppose we wanted to say that an algorithm on lists takes $O(n^2)$ time where $n$ is 
  101.28    the length of the input list. We can write this using the Landau symbols from the AFP,
  101.29 -  where the underlying filter is @{term "length going_to at_top"}. If, on the other hand,
  101.30 +  where the underlying filter is \<^term>\<open>length going_to at_top\<close>. If, on the other hand,
  101.31    we want to look the complexity of the algorithm on sorted lists, we could use the filter
  101.32 -  @{term "length going_to at_top within {xs. sorted xs}"}.
  101.33 +  \<^term>\<open>length going_to at_top within {xs. sorted xs}\<close>.
  101.34  \<close>
  101.35  
  101.36  lemma going_to_def: "f going_to F = filtercomap f F"
   102.1 --- a/src/HOL/Library/IArray.thy	Fri Jan 04 21:49:06 2019 +0100
   102.2 +++ b/src/HOL/Library/IArray.thy	Fri Jan 04 23:22:53 2019 +0100
   102.3 @@ -188,7 +188,7 @@
   102.4  
   102.5  subsection \<open>Code Generation for Haskell\<close>
   102.6  
   102.7 -text \<open>We map @{typ "'a iarray"}s in Isabelle/HOL to \<open>Data.Array.IArray.array\<close>
   102.8 +text \<open>We map \<^typ>\<open>'a iarray\<close>s in Isabelle/HOL to \<open>Data.Array.IArray.array\<close>
   102.9    in Haskell.  Performance mapping to \<open>Data.Array.Unboxed.Array\<close> and
  102.10    \<open>Data.Array.Array\<close> is similar.\<close>
  102.11  
   103.1 --- a/src/HOL/Library/Infinite_Set.thy	Fri Jan 04 21:49:06 2019 +0100
   103.2 +++ b/src/HOL/Library/Infinite_Set.thy	Fri Jan 04 23:22:53 2019 +0100
   103.3 @@ -214,7 +214,7 @@
   103.4  
   103.5  text \<open>
   103.6    Could be generalized to
   103.7 -    @{prop "enumerate' S n = (SOME t. t \<in> s \<and> finite {s\<in>S. s < t} \<and> card {s\<in>S. s < t} = n)"}.
   103.8 +    \<^prop>\<open>enumerate' S n = (SOME t. t \<in> s \<and> finite {s\<in>S. s < t} \<and> card {s\<in>S. s < t} = n)\<close>.
   103.9  \<close>
  103.10  
  103.11  primrec (in wellorder) enumerate :: "'a set \<Rightarrow> nat \<Rightarrow> 'a"
   104.1 --- a/src/HOL/Library/LaTeXsugar.thy	Fri Jan 04 21:49:06 2019 +0100
   104.2 +++ b/src/HOL/Library/LaTeXsugar.thy	Fri Jan 04 23:22:53 2019 +0100
   104.3 @@ -112,13 +112,13 @@
   104.4      let
   104.5        val rhs_vars = Term.add_vars rhs [];
   104.6        fun dummy (v as Var (ixn as (_, T))) =
   104.7 -            if member ((=) ) rhs_vars ixn then v else Const (@{const_name DUMMY}, T)
   104.8 +            if member ((=) ) rhs_vars ixn then v else Const (\<^const_name>\<open>DUMMY\<close>, T)
   104.9          | dummy (t $ u) = dummy t $ dummy u
  104.10          | dummy (Abs (n, T, b)) = Abs (n, T, dummy b)
  104.11          | dummy t = t;
  104.12      in wrap $ (eq $ dummy lhs $ rhs) end
  104.13  in
  104.14 -  Term_Style.setup @{binding dummy_pats} (Scan.succeed (K dummy_pats))
  104.15 +  Term_Style.setup \<^binding>\<open>dummy_pats\<close> (Scan.succeed (K dummy_pats))
  104.16  end
  104.17  \<close>
  104.18  
  104.19 @@ -145,7 +145,7 @@
  104.20  val style_eta_expand =
  104.21    (Scan.repeat Args.name) >> (fn xs => fn ctxt => fn t => fst (eta_expand [] t xs))
  104.22  
  104.23 -in Term_Style.setup @{binding eta_expand} style_eta_expand end
  104.24 +in Term_Style.setup \<^binding>\<open>eta_expand\<close> style_eta_expand end
  104.25  \<close>
  104.26  
  104.27  end
   105.1 --- a/src/HOL/Library/Lub_Glb.thy	Fri Jan 04 21:49:06 2019 +0100
   105.2 +++ b/src/HOL/Library/Lub_Glb.thy	Fri Jan 04 23:22:53 2019 +0100
   105.3 @@ -45,7 +45,7 @@
   105.4    where "ubs R S = Collect (isUb R S)"
   105.5  
   105.6  
   105.7 -subsection \<open>Rules about the Operators @{term leastP}, @{term ub} and @{term lub}\<close>
   105.8 +subsection \<open>Rules about the Operators \<^term>\<open>leastP\<close>, \<^term>\<open>ub\<close> and \<^term>\<open>lub\<close>\<close>
   105.9  
  105.10  lemma leastPD1: "leastP P x \<Longrightarrow> P x"
  105.11    by (simp add: leastP_def)
  105.12 @@ -118,7 +118,7 @@
  105.13    where "lbs R S = Collect (isLb R S)"
  105.14  
  105.15  
  105.16 -subsection \<open>Rules about the Operators @{term greatestP}, @{term isLb} and @{term isGlb}\<close>
  105.17 +subsection \<open>Rules about the Operators \<^term>\<open>greatestP\<close>, \<^term>\<open>isLb\<close> and \<^term>\<open>isGlb\<close>\<close>
  105.18  
  105.19  lemma greatestPD1: "greatestP P x \<Longrightarrow> P x"
  105.20    by (simp add: greatestP_def)
   106.1 --- a/src/HOL/Library/Monad_Syntax.thy	Fri Jan 04 21:49:06 2019 +0100
   106.2 +++ b/src/HOL/Library/Monad_Syntax.thy	Fri Jan 04 23:22:53 2019 +0100
   106.3 @@ -11,7 +11,7 @@
   106.4  
   106.5  text \<open>
   106.6    We provide a convenient do-notation for monadic expressions
   106.7 -  well-known from Haskell.  @{const Let} is printed
   106.8 +  well-known from Haskell.  \<^const>\<open>Let\<close> is printed
   106.9    specially in do-expressions.
  106.10  \<close>
  106.11  
   107.1 --- a/src/HOL/Library/Multiset.thy	Fri Jan 04 21:49:06 2019 +0100
   107.2 +++ b/src/HOL/Library/Multiset.thy	Fri Jan 04 23:22:53 2019 +0100
   107.3 @@ -31,7 +31,7 @@
   107.4  lemma multiset_eqI: "(\<And>x. count A x = count B x) \<Longrightarrow> A = B"
   107.5    using multiset_eq_iff by auto
   107.6  
   107.7 -text \<open>Preservation of the representing set @{term multiset}.\<close>
   107.8 +text \<open>Preservation of the representing set \<^term>\<open>multiset\<close>.\<close>
   107.9  
  107.10  lemma const0_in_multiset: "(\<lambda>a. 0) \<in> multiset"
  107.11    by (simp add: multiset_def)
  107.12 @@ -1653,10 +1653,10 @@
  107.13  
  107.14  text \<open>
  107.15    A note on code generation: When defining some function containing a
  107.16 -  subterm @{term "fold_mset F"}, code generation is not automatic. When
  107.17 +  subterm \<^term>\<open>fold_mset F\<close>, code generation is not automatic. When
  107.18    interpreting locale \<open>left_commutative\<close> with \<open>F\<close>, the
  107.19 -  would be code thms for @{const fold_mset} become thms like
  107.20 -  @{term "fold_mset F z {#} = z"} where \<open>F\<close> is not a pattern but
  107.21 +  would be code thms for \<^const>\<open>fold_mset\<close> become thms like
  107.22 +  \<^term>\<open>fold_mset F z {#} = z\<close> where \<open>F\<close> is not a pattern but
  107.23    contains defined symbols, i.e.\ is not a code thm. Hence a separate
  107.24    constant with its own code thms needs to be introduced for \<open>F\<close>. See the image operator below.
  107.25  \<close>
  107.26 @@ -1746,10 +1746,10 @@
  107.27    "{#e | x\<in>#M. P#}" \<rightharpoonup> "{#e. x \<in># {# x\<in>#M. P#}#}"
  107.28  
  107.29  text \<open>
  107.30 -  This allows to write not just filters like @{term "{#x\<in>#M. x<c#}"}
  107.31 -  but also images like @{term "{#x+x. x\<in>#M #}"} and @{term [source]
  107.32 +  This allows to write not just filters like \<^term>\<open>{#x\<in>#M. x<c#}\<close>
  107.33 +  but also images like \<^term>\<open>{#x+x. x\<in>#M #}\<close> and @{term [source]
  107.34    "{#x+x|x\<in>#M. x<c#}"}, where the latter is currently displayed as
  107.35 -  @{term "{#x+x|x\<in>#M. x<c#}"}.
  107.36 +  \<^term>\<open>{#x+x|x\<in>#M. x<c#}\<close>.
  107.37  \<close>
  107.38  
  107.39  lemma in_image_mset: "y \<in># {#f x. x \<in># M#} \<longleftrightarrow> y \<in> f ` set_mset M"
  107.40 @@ -1965,7 +1965,7 @@
  107.41    qed
  107.42    then show "PROP ?P" "PROP ?Q" "PROP ?R"
  107.43    by (auto elim!: Set.set_insert)
  107.44 -qed \<comment> \<open>TODO: maybe define @{const mset_set} also in terms of @{const Abs_multiset}\<close>
  107.45 +qed \<comment> \<open>TODO: maybe define \<^const>\<open>mset_set\<close> also in terms of \<^const>\<open>Abs_multiset\<close>\<close>
  107.46  
  107.47  lemma elem_mset_set[simp, intro]: "finite A \<Longrightarrow> x \<in># mset_set A \<longleftrightarrow> x \<in> A"
  107.48    by (induct A rule: finite_induct) simp_all
  107.49 @@ -3245,14 +3245,14 @@
  107.50  
  107.51  setup \<open>
  107.52    let
  107.53 -    fun msetT T = Type (@{type_name multiset}, [T]);
  107.54 -
  107.55 -    fun mk_mset T [] = Const (@{const_abbrev Mempty}, msetT T)
  107.56 +    fun msetT T = Type (\<^type_name>\<open>multiset\<close>, [T]);
  107.57 +
  107.58 +    fun mk_mset T [] = Const (\<^const_abbrev>\<open>Mempty\<close>, msetT T)
  107.59        | mk_mset T [x] =
  107.60 -        Const (@{const_name add_mset}, T --> msetT T --> msetT T) $ x $
  107.61 -          Const (@{const_abbrev Mempty}, msetT T)
  107.62 +        Const (\<^const_name>\<open>add_mset\<close>, T --> msetT T --> msetT T) $ x $
  107.63 +          Const (\<^const_abbrev>\<open>Mempty\<close>, msetT T)
  107.64        | mk_mset T (x :: xs) =
  107.65 -        Const (@{const_name plus}, msetT T --> msetT T --> msetT T) $
  107.66 +        Const (\<^const_name>\<open>plus\<close>, msetT T --> msetT T --> msetT T) $
  107.67            mk_mset T [x] $ mk_mset T xs
  107.68  
  107.69      fun mset_member_tac ctxt m i =
  107.70 @@ -3267,7 +3267,7 @@
  107.71        resolve_tac ctxt @{thms nonempty_single}
  107.72  
  107.73      fun regroup_munion_conv ctxt =
  107.74 -      Function_Lib.regroup_conv ctxt @{const_abbrev Mempty} @{const_name plus}
  107.75 +      Function_Lib.regroup_conv ctxt \<^const_abbrev>\<open>Mempty\<close> \<^const_name>\<open>plus\<close>
  107.76          (map (fn t => t RS eq_reflection) (@{thms ac_simps} @ @{thms empty_neutral}))
  107.77  
  107.78      fun unfold_pwleq_tac ctxt i =
  107.79 @@ -3358,13 +3358,13 @@
  107.80            in
  107.81              (case maps elems_for (all_values elem_T) @
  107.82                   (if maybe_opt then [Const (Nitpick_Model.unrep_mixfix (), elem_T)] else []) of
  107.83 -              [] => Const (@{const_name zero_class.zero}, T)
  107.84 +              [] => Const (\<^const_name>\<open>zero_class.zero\<close>, T)
  107.85              | ts =>
  107.86 -                foldl1 (fn (s, t) => Const (@{const_name add_mset}, elem_T --> T --> T) $ s $ t)
  107.87 +                foldl1 (fn (s, t) => Const (\<^const_name>\<open>add_mset\<close>, elem_T --> T --> T) $ s $ t)
  107.88                    ts)
  107.89            end
  107.90        | multiset_postproc _ _ _ _ t = t
  107.91 -  in Nitpick_Model.register_term_postprocessor @{typ "'a multiset"} multiset_postproc end
  107.92 +  in Nitpick_Model.register_term_postprocessor \<^typ>\<open>'a multiset\<close> multiset_postproc end
  107.93  \<close>
  107.94  
  107.95  
  107.96 @@ -3513,8 +3513,8 @@
  107.97  qed
  107.98  
  107.99  text \<open>
 107.100 -  Exercise for the casual reader: add implementations for @{term "(\<le>)"}
 107.101 -  and @{term "(<)"} (multiset order).
 107.102 +  Exercise for the casual reader: add implementations for \<^term>\<open>(\<le>)\<close>
 107.103 +  and \<^term>\<open>(<)\<close> (multiset order).
 107.104  \<close>
 107.105  
 107.106  text \<open>Quickcheck generators\<close>
 107.107 @@ -3865,7 +3865,7 @@
 107.108  lemma rel_mset_rel_mset': "rel_mset R M N = rel_mset' R M N"
 107.109    using rel_mset_imp_rel_mset' rel_mset'_imp_rel_mset by auto
 107.110  
 107.111 -text \<open>The main end product for @{const rel_mset}: inductive characterization:\<close>
 107.112 +text \<open>The main end product for \<^const>\<open>rel_mset\<close>: inductive characterization:\<close>
 107.113  lemmas rel_mset_induct[case_names empty add, induct pred: rel_mset] =
 107.114    rel_mset'.induct[unfolded rel_mset_rel_mset'[symmetric]]
 107.115  
 107.116 @@ -3878,7 +3878,7 @@
 107.117    done
 107.118  
 107.119  setup \<open>
 107.120 -  BNF_LFP_Size.register_size_global @{type_name multiset} @{const_name size_multiset}
 107.121 +  BNF_LFP_Size.register_size_global \<^type_name>\<open>multiset\<close> \<^const_name>\<open>size_multiset\<close>
 107.122      @{thm size_multiset_overloaded_def}
 107.123      @{thms size_multiset_empty size_multiset_single size_multiset_union size_empty size_single
 107.124        size_union}
   108.1 --- a/src/HOL/Library/Nat_Bijection.thy	Fri Jan 04 21:49:06 2019 +0100
   108.2 +++ b/src/HOL/Library/Nat_Bijection.thy	Fri Jan 04 23:22:53 2019 +0100
   108.3 @@ -12,7 +12,7 @@
   108.4    imports Main
   108.5  begin
   108.6  
   108.7 -subsection \<open>Type @{typ "nat \<times> nat"}\<close>
   108.8 +subsection \<open>Type \<^typ>\<open>nat \<times> nat\<close>\<close>
   108.9  
  108.10  text \<open>Triangle numbers: 0, 1, 3, 6, 10, 15, ...\<close>
  108.11  
  108.12 @@ -28,7 +28,7 @@
  108.13  definition prod_encode :: "nat \<times> nat \<Rightarrow> nat"
  108.14    where "prod_encode = (\<lambda>(m, n). triangle (m + n) + m)"
  108.15  
  108.16 -text \<open>In this auxiliary function, @{term "triangle k + m"} is an invariant.\<close>
  108.17 +text \<open>In this auxiliary function, \<^term>\<open>triangle k + m\<close> is an invariant.\<close>
  108.18  
  108.19  fun prod_decode_aux :: "nat \<Rightarrow> nat \<Rightarrow> nat \<times> nat"
  108.20    where "prod_decode_aux k m =
  108.21 @@ -98,7 +98,7 @@
  108.22    by (induct b) (simp_all add: prod_encode_def)
  108.23  
  108.24  
  108.25 -subsection \<open>Type @{typ "nat + nat"}\<close>
  108.26 +subsection \<open>Type \<^typ>\<open>nat + nat\<close>\<close>
  108.27  
  108.28  definition sum_encode :: "nat + nat \<Rightarrow> nat"
  108.29    where "sum_encode x = (case x of Inl a \<Rightarrow> 2 * a | Inr b \<Rightarrow> Suc (2 * b))"
  108.30 @@ -137,7 +137,7 @@
  108.31    by (rule inj_sum_decode [THEN inj_eq])
  108.32  
  108.33  
  108.34 -subsection \<open>Type @{typ "int"}\<close>
  108.35 +subsection \<open>Type \<^typ>\<open>int\<close>\<close>
  108.36  
  108.37  definition int_encode :: "int \<Rightarrow> nat"
  108.38    where "int_encode i = sum_encode (if 0 \<le> i then Inl (nat i) else Inr (nat (- i - 1)))"
  108.39 @@ -177,7 +177,7 @@
  108.40    by (rule inj_int_decode [THEN inj_eq])
  108.41  
  108.42  
  108.43 -subsection \<open>Type @{typ "nat list"}\<close>
  108.44 +subsection \<open>Type \<^typ>\<open>nat list\<close>\<close>
  108.45  
  108.46  fun list_encode :: "nat list \<Rightarrow> nat"
  108.47    where
   109.1 --- a/src/HOL/Library/Nonpos_Ints.thy	Fri Jan 04 21:49:06 2019 +0100
   109.2 +++ b/src/HOL/Library/Nonpos_Ints.thy	Fri Jan 04 23:22:53 2019 +0100
   109.3 @@ -11,7 +11,7 @@
   109.4  subsection\<open>Non-positive integers\<close>
   109.5  text \<open>
   109.6    The set of non-positive integers on a ring. (in analogy to the set of non-negative
   109.7 -  integers @{term "\<nat>"}) This is useful e.g. for the Gamma function.
   109.8 +  integers \<^term>\<open>\<nat>\<close>) This is useful e.g. for the Gamma function.
   109.9  \<close>
  109.10  
  109.11  definition nonpos_Ints ("\<int>\<^sub>\<le>\<^sub>0") where "\<int>\<^sub>\<le>\<^sub>0 = {of_int n |n. n \<le> 0}"
   110.1 --- a/src/HOL/Library/Numeral_Type.thy	Fri Jan 04 21:49:06 2019 +0100
   110.2 +++ b/src/HOL/Library/Numeral_Type.thy	Fri Jan 04 23:22:53 2019 +0100
   110.3 @@ -182,7 +182,7 @@
   110.4  
   110.5  text \<open>
   110.6    Unfortunately \<open>ring_1\<close> instance is not possible for
   110.7 -  @{typ num1}, since 0 and 1 are not distinct.
   110.8 +  \<^typ>\<open>num1\<close>, since 0 and 1 are not distinct.
   110.9  \<close>
  110.10  
  110.11  instantiation num1 :: "{comm_ring,comm_monoid_mult,numeral}"
  110.12 @@ -317,7 +317,7 @@
  110.13  
  110.14  subsection \<open>Code setup and type classes for code generation\<close>
  110.15  
  110.16 -text \<open>Code setup for @{typ num0} and @{typ num1}\<close>
  110.17 +text \<open>Code setup for \<^typ>\<open>num0\<close> and \<^typ>\<open>num1\<close>\<close>
  110.18  
  110.19  definition Num0 :: num0 where "Num0 = Abs_num0 0"
  110.20  code_datatype Num0
  110.21 @@ -365,7 +365,7 @@
  110.22  end
  110.23  
  110.24  
  110.25 -text \<open>Code setup for @{typ "'a bit0"} and @{typ "'a bit1"}\<close>
  110.26 +text \<open>Code setup for \<^typ>\<open>'a bit0\<close> and \<^typ>\<open>'a bit1\<close>\<close>
  110.27  
  110.28  declare
  110.29    bit0.Rep_inverse[code abstype]
  110.30 @@ -477,11 +477,11 @@
  110.31    let
  110.32      fun mk_bintype n =
  110.33        let
  110.34 -        fun mk_bit 0 = Syntax.const @{type_syntax bit0}
  110.35 -          | mk_bit 1 = Syntax.const @{type_syntax bit1};
  110.36 +        fun mk_bit 0 = Syntax.const \<^type_syntax>\<open>bit0\<close>
  110.37 +          | mk_bit 1 = Syntax.const \<^type_syntax>\<open>bit1\<close>;
  110.38          fun bin_of n =
  110.39 -          if n = 1 then Syntax.const @{type_syntax num1}
  110.40 -          else if n = 0 then Syntax.const @{type_syntax num0}
  110.41 +          if n = 1 then Syntax.const \<^type_syntax>\<open>num1\<close>
  110.42 +          else if n = 0 then Syntax.const \<^type_syntax>\<open>num0\<close>
  110.43            else if n = ~1 then raise TERM ("negative type numeral", [])
  110.44            else
  110.45              let val (q, r) = Integer.div_mod n 2;
  110.46 @@ -491,7 +491,7 @@
  110.47      fun numeral_tr [Free (str, _)] = mk_bintype (the (Int.fromString str))
  110.48        | numeral_tr ts = raise TERM ("numeral_tr", ts);
  110.49  
  110.50 -  in [(@{syntax_const "_NumeralType"}, K numeral_tr)] end
  110.51 +  in [(\<^syntax_const>\<open>_NumeralType\<close>, K numeral_tr)] end
  110.52  \<close>
  110.53  
  110.54  print_translation \<open>
  110.55 @@ -499,10 +499,10 @@
  110.56      fun int_of [] = 0
  110.57        | int_of (b :: bs) = b + 2 * int_of bs;
  110.58  
  110.59 -    fun bin_of (Const (@{type_syntax num0}, _)) = []
  110.60 -      | bin_of (Const (@{type_syntax num1}, _)) = [1]
  110.61 -      | bin_of (Const (@{type_syntax bit0}, _) $ bs) = 0 :: bin_of bs
  110.62 -      | bin_of (Const (@{type_syntax bit1}, _) $ bs) = 1 :: bin_of bs
  110.63 +    fun bin_of (Const (\<^type_syntax>\<open>num0\<close>, _)) = []
  110.64 +      | bin_of (Const (\<^type_syntax>\<open>num1\<close>, _)) = [1]
  110.65 +      | bin_of (Const (\<^type_syntax>\<open>bit0\<close>, _) $ bs) = 0 :: bin_of bs
  110.66 +      | bin_of (Const (\<^type_syntax>\<open>bit1\<close>, _) $ bs) = 1 :: bin_of bs
  110.67        | bin_of t = raise TERM ("bin_of", [t]);
  110.68  
  110.69      fun bit_tr' b [t] =
  110.70 @@ -511,12 +511,12 @@
  110.71              val i = int_of rev_digs;
  110.72              val num = string_of_int (abs i);
  110.73            in
  110.74 -            Syntax.const @{syntax_const "_NumeralType"} $ Syntax.free num
  110.75 +            Syntax.const \<^syntax_const>\<open>_NumeralType\<close> $ Syntax.free num
  110.76            end
  110.77        | bit_tr' b _ = raise Match;
  110.78    in
  110.79 -   [(@{type_syntax bit0}, K (bit_tr' 0)),
  110.80 -    (@{type_syntax bit1}, K (bit_tr' 1))]
  110.81 +   [(\<^type_syntax>\<open>bit0\<close>, K (bit_tr' 0)),
  110.82 +    (\<^type_syntax>\<open>bit1\<close>, K (bit_tr' 1))]
  110.83    end
  110.84  \<close>
  110.85  
   111.1 --- a/src/HOL/Library/Open_State_Syntax.thy	Fri Jan 04 21:49:06 2019 +0100
   111.2 +++ b/src/HOL/Library/Open_State_Syntax.thy	Fri Jan 04 23:22:53 2019 +0100
   111.3 @@ -59,20 +59,20 @@
   111.4  notation scomp (infixl "\<circ>\<rightarrow>" 60)
   111.5  
   111.6  text \<open>
   111.7 -  Given two transformations @{term f} and @{term g}, they may be
   111.8 -  directly composed using the @{term "(\<circ>>)"} combinator, forming a
   111.9 -  forward composition: @{prop "(f \<circ>> g) s = f (g s)"}.
  111.10 +  Given two transformations \<^term>\<open>f\<close> and \<^term>\<open>g\<close>, they may be
  111.11 +  directly composed using the \<^term>\<open>(\<circ>>)\<close> combinator, forming a
  111.12 +  forward composition: \<^prop>\<open>(f \<circ>> g) s = f (g s)\<close>.
  111.13  
  111.14    After any yielding transformation, we bind the side result
  111.15    immediately using a lambda abstraction.  This is the purpose of the
  111.16 -  @{term "(\<circ>\<rightarrow>)"} combinator: @{prop "(f \<circ>\<rightarrow> (\<lambda>x. g)) s = (let (x, s')
  111.17 -  = f s in g s')"}.
  111.18 +  \<^term>\<open>(\<circ>\<rightarrow>)\<close> combinator: \<^prop>\<open>(f \<circ>\<rightarrow> (\<lambda>x. g)) s = (let (x, s')
  111.19 +  = f s in g s')\<close>.
  111.20  
  111.21 -  For queries, the existing @{term "Let"} is appropriate.
  111.22 +  For queries, the existing \<^term>\<open>Let\<close> is appropriate.
  111.23  
  111.24    Naturally, a computation may yield a side result by pairing it to
  111.25    the state from the left; we introduce the suggestive abbreviation
  111.26 -  @{term return} for this purpose.
  111.27 +  \<^term>\<open>return\<close> for this purpose.
  111.28  
  111.29    The most crucial distinction to Haskell is that we do not need to
  111.30    introduce distinguished type constructors for different kinds of
   112.1 --- a/src/HOL/Library/Pattern_Aliases.thy	Fri Jan 04 21:49:06 2019 +0100
   112.2 +++ b/src/HOL/Library/Pattern_Aliases.thy	Fri Jan 04 23:22:53 2019 +0100
   112.3 @@ -14,8 +14,8 @@
   112.4    well for function definitions (see usage below). All features are packed into a @{command bundle}.
   112.5  
   112.6    The following caveats should be kept in mind:
   112.7 -  \<^item> The translation expects a term of the form @{prop "f x y = rhs"}, where \<open>x\<close> and \<open>y\<close> are patterns
   112.8 -    that may contain aliases. The result of the translation is a nested @{const Let}-expression on
   112.9 +  \<^item> The translation expects a term of the form \<^prop>\<open>f x y = rhs\<close>, where \<open>x\<close> and \<open>y\<close> are patterns
  112.10 +    that may contain aliases. The result of the translation is a nested \<^const>\<open>Let\<close>-expression on
  112.11      the right hand side. The code generator \<^emph>\<open>does not\<close> print Isabelle pattern aliases to target
  112.12      language pattern aliases.
  112.13    \<^item> The translation does not process nested equalities; only the top-level equality is translated.
  112.14 @@ -26,13 +26,13 @@
  112.15      additionally introduced variables are bound using a ``fake quantifier'' that does not
  112.16      appear in the output.
  112.17    \<^item> To obtain reasonable induction principles in function definitions, the bundle also declares
  112.18 -    a custom congruence rule for @{const Let} that only affects @{command fun}. This congruence
  112.19 +    a custom congruence rule for \<^const>\<open>Let\<close> that only affects @{command fun}. This congruence
  112.20      rule might lead to an explosion in term size (although that is rare)! In some circumstances
  112.21      (using \<open>let\<close> to destructure tuples), the internal construction of functions stumbles over this
  112.22      rule and prints an error. To mitigate this, either
  112.23 -    \<^item> activate the bundle locally (@{theory_text \<open>context includes ... begin\<close>}) or
  112.24 -    \<^item> rewrite the \<open>let\<close>-expression to use \<open>case\<close>: @{term \<open>let (a, b) = x in (b, a)\<close>} becomes
  112.25 -      @{term \<open>case x of (a, b) \<Rightarrow> (b, a)\<close>}.
  112.26 +    \<^item> activate the bundle locally (\<^theory_text>\<open>context includes ... begin\<close>) or
  112.27 +    \<^item> rewrite the \<open>let\<close>-expression to use \<open>case\<close>: \<^term>\<open>let (a, b) = x in (b, a)\<close> becomes
  112.28 +      \<^term>\<open>case x of (a, b) \<Rightarrow> (b, a)\<close>.
  112.29    \<^item> The bundle also adds the @{thm Let_def} rule to the simpset.
  112.30  \<close>
  112.31  
  112.32 @@ -84,7 +84,7 @@
  112.33    in fst (go t) end
  112.34  
  112.35  (* adapted from logic.ML *)
  112.36 -fun fake_const T = Const (@{const_name fake_quant}, (T --> propT) --> propT);
  112.37 +fun fake_const T = Const (\<^const_name>\<open>fake_quant\<close>, (T --> propT) --> propT);
  112.38  
  112.39  fun dependent_fake_name v t =
  112.40    let
  112.41 @@ -97,14 +97,14 @@
  112.42  
  112.43  fun check_pattern_syntax t =
  112.44    case strip_all t of
  112.45 -    (vars, @{const Trueprop} $ (Const (@{const_name HOL.eq}, _) $ lhs $ rhs)) =>
  112.46 +    (vars, @{const Trueprop} $ (Const (\<^const_name>\<open>HOL.eq\<close>, _) $ lhs $ rhs)) =>
  112.47        let
  112.48 -        fun go (Const (@{const_name as}, _) $ pat $ var, rhs) =
  112.49 +        fun go (Const (\<^const_name>\<open>as\<close>, _) $ pat $ var, rhs) =
  112.50                let
  112.51                  val (pat', rhs') = go (pat, rhs)
  112.52                  val _ = if is_Free var then () else error "Right-hand side of =: must be a free variable"
  112.53                  val rhs'' =
  112.54 -                  Const (@{const_name Let}, let_typ (fastype_of var) (fastype_of rhs)) $
  112.55 +                  Const (\<^const_name>\<open>Let\<close>, let_typ (fastype_of var) (fastype_of rhs)) $
  112.56                      pat' $ lambda var rhs'
  112.57                in
  112.58                  (pat', rhs'')
  112.59 @@ -126,15 +126,15 @@
  112.60  
  112.61  fun uncheck_pattern_syntax ctxt t =
  112.62    case strip_all t of
  112.63 -    (vars, @{const Trueprop} $ (Const (@{const_name HOL.eq}, _) $ lhs $ rhs)) =>
  112.64 +    (vars, @{const Trueprop} $ (Const (\<^const_name>\<open>HOL.eq\<close>, _) $ lhs $ rhs)) =>
  112.65        let
  112.66          (* restricted to going down abstractions; ignores eta-contracted rhs *)
  112.67 -        fun go lhs (rhs as Const (@{const_name Let}, _) $ pat $ Abs (name, typ, t)) ctxt frees =
  112.68 +        fun go lhs (rhs as Const (\<^const_name>\<open>Let\<close>, _) $ pat $ Abs (name, typ, t)) ctxt frees =
  112.69                if exists_subterm (fn t' => t' = pat) lhs then
  112.70                  let
  112.71                    val ([name'], ctxt') = Variable.variant_fixes [name] ctxt
  112.72                    val free = Free (name', typ)
  112.73 -                  val subst = (pat, Const (@{const_name as}, as_typ typ) $ pat $ free)
  112.74 +                  val subst = (pat, Const (\<^const_name>\<open>as\<close>, as_typ typ) $ pat $ free)
  112.75                    val lhs' = subst_once subst lhs
  112.76                    val rhs' = subst_bound (free, t)
  112.77                  in
  112.78 @@ -199,10 +199,10 @@
  112.79    val actual =
  112.80      @{thm test_2.simps(1)}
  112.81      |> Thm.prop_of
  112.82 -    |> Syntax.string_of_term @{context}
  112.83 +    |> Syntax.string_of_term \<^context>
  112.84      |> YXML.content_of
  112.85    val expected = "test_2 (?y # (?y' # ?ys =: x') =: x) = x @ x' @ x'"
  112.86 -in @{assert} (actual = expected) end
  112.87 +in \<^assert> (actual = expected) end
  112.88  \<close>
  112.89  
  112.90  end
   113.1 --- a/src/HOL/Library/Periodic_Fun.thy	Fri Jan 04 21:49:06 2019 +0100
   113.2 +++ b/src/HOL/Library/Periodic_Fun.thy	Fri Jan 04 23:22:53 2019 +0100
   113.3 @@ -13,10 +13,10 @@
   113.4    for some period $p$ and gets derived results like $f(x - p) = f(x)$ and $f(x + 2p) = f(x)$
   113.5    for free.
   113.6  
   113.7 -  @{term g} and @{term gm} are ``plus/minus k periods'' functions. 
   113.8 -  @{term g1} and @{term gn1} are ``plus/minus one period'' functions.
   113.9 +  \<^term>\<open>g\<close> and \<^term>\<open>gm\<close> are ``plus/minus k periods'' functions. 
  113.10 +  \<^term>\<open>g1\<close> and \<^term>\<open>gn1\<close> are ``plus/minus one period'' functions.
  113.11    This is useful e.g. if the period is one; the lemmas one gets are then 
  113.12 -  @{term "f (x + 1) = f x"} instead of @{term "f (x + 1 * 1) = f x"} etc.
  113.13 +  \<^term>\<open>f (x + 1) = f x\<close> instead of \<^term>\<open>f (x + 1 * 1) = f x\<close> etc.
  113.14  \<close>
  113.15  locale periodic_fun = 
  113.16    fixes f :: "('a :: {ring_1}) \<Rightarrow> 'b" and g gm :: "'a \<Rightarrow> 'a \<Rightarrow> 'a" and g1 gn1 :: "'a \<Rightarrow> 'a"
  113.17 @@ -63,8 +63,8 @@
  113.18  
  113.19  
  113.20  text \<open>
  113.21 -  Specialised case of the @{term periodic_fun} locale for periods that are not 1.
  113.22 -  Gives lemmas @{term "f (x - period) = f x"} etc.
  113.23 +  Specialised case of the \<^term>\<open>periodic_fun\<close> locale for periods that are not 1.
  113.24 +  Gives lemmas \<^term>\<open>f (x - period) = f x\<close> etc.
  113.25  \<close>
  113.26  locale periodic_fun_simple = 
  113.27    fixes f :: "('a :: {ring_1}) \<Rightarrow> 'b" and period :: 'a
  113.28 @@ -77,8 +77,8 @@
  113.29  
  113.30  
  113.31  text \<open>
  113.32 -  Specialised case of the @{term periodic_fun} locale for period 1.
  113.33 -  Gives lemmas @{term "f (x - 1) = f x"} etc.
  113.34 +  Specialised case of the \<^term>\<open>periodic_fun\<close> locale for period 1.
  113.35 +  Gives lemmas \<^term>\<open>f (x - 1) = f x\<close> etc.
  113.36  \<close>
  113.37  locale periodic_fun_simple' = 
  113.38    fixes f :: "('a :: {ring_1}) \<Rightarrow> 'b"
   114.1 --- a/src/HOL/Library/Phantom_Type.thy	Fri Jan 04 21:49:06 2019 +0100
   114.2 +++ b/src/HOL/Library/Phantom_Type.thy	Fri Jan 04 23:22:53 2019 +0100
   114.3 @@ -23,11 +23,11 @@
   114.4  
   114.5  typed_print_translation \<open>
   114.6    let
   114.7 -    fun phantom_tr' ctxt (Type (@{type_name fun}, [_, Type (@{type_name phantom}, [T, _])])) ts =
   114.8 +    fun phantom_tr' ctxt (Type (\<^type_name>\<open>fun\<close>, [_, Type (\<^type_name>\<open>phantom\<close>, [T, _])])) ts =
   114.9            list_comb
  114.10 -            (Syntax.const @{syntax_const "_Phantom"} $ Syntax_Phases.term_of_typ ctxt T, ts)
  114.11 +            (Syntax.const \<^syntax_const>\<open>_Phantom\<close> $ Syntax_Phases.term_of_typ ctxt T, ts)
  114.12        | phantom_tr' _ _ _ = raise Match;
  114.13 -  in [(@{const_syntax phantom}, phantom_tr')] end
  114.14 +  in [(\<^const_syntax>\<open>phantom\<close>, phantom_tr')] end
  114.15  \<close>
  114.16  
  114.17  lemma of_phantom_inject [simp]:
   115.1 --- a/src/HOL/Library/Predicate_Compile_Alternative_Defs.thy	Fri Jan 04 21:49:06 2019 +0100
   115.2 +++ b/src/HOL/Library/Predicate_Compile_Alternative_Defs.thy	Fri Jan 04 23:22:53 2019 +0100
   115.3 @@ -22,16 +22,16 @@
   115.4    "((A::bool) \<noteq> (B::bool)) = ((A \<and> \<not> B) \<or> (B \<and> \<not> A))"
   115.5  by fast
   115.6  
   115.7 -setup \<open>Predicate_Compile_Data.ignore_consts [@{const_name Let}]\<close>
   115.8 +setup \<open>Predicate_Compile_Data.ignore_consts [\<^const_name>\<open>Let\<close>]\<close>
   115.9  
  115.10  section \<open>Pairs\<close>
  115.11  
  115.12 -setup \<open>Predicate_Compile_Data.ignore_consts [@{const_name fst}, @{const_name snd}, @{const_name case_prod}]\<close>
  115.13 +setup \<open>Predicate_Compile_Data.ignore_consts [\<^const_name>\<open>fst\<close>, \<^const_name>\<open>snd\<close>, \<^const_name>\<open>case_prod\<close>]\<close>
  115.14  
  115.15  section \<open>Filters\<close>
  115.16  
  115.17  (*TODO: shouldn't this be done by typedef? *)
  115.18 -setup \<open>Predicate_Compile_Data.ignore_consts [@{const_name Abs_filter}, @{const_name Rep_filter}]\<close>
  115.19 +setup \<open>Predicate_Compile_Data.ignore_consts [\<^const_name>\<open>Abs_filter\<close>, \<^const_name>\<open>Rep_filter\<close>]\<close>
  115.20  
  115.21  section \<open>Bounded quantifiers\<close>
  115.22  
  115.23 @@ -54,12 +54,12 @@
  115.24  
  115.25  section \<open>Setup for Numerals\<close>
  115.26  
  115.27 -setup \<open>Predicate_Compile_Data.ignore_consts [@{const_name numeral}]\<close>
  115.28 -setup \<open>Predicate_Compile_Data.keep_functions [@{const_name numeral}]\<close>
  115.29 -setup \<open>Predicate_Compile_Data.ignore_consts [@{const_name Char}]\<close>
  115.30 -setup \<open>Predicate_Compile_Data.keep_functions [@{const_name Char}]\<close>
  115.31 +setup \<open>Predicate_Compile_Data.ignore_consts [\<^const_name>\<open>numeral\<close>]\<close>
  115.32 +setup \<open>Predicate_Compile_Data.keep_functions [\<^const_name>\<open>numeral\<close>]\<close>
  115.33 +setup \<open>Predicate_Compile_Data.ignore_consts [\<^const_name>\<open>Char\<close>]\<close>
  115.34 +setup \<open>Predicate_Compile_Data.keep_functions [\<^const_name>\<open>Char\<close>]\<close>
  115.35  
  115.36 -setup \<open>Predicate_Compile_Data.ignore_consts [@{const_name divide}, @{const_name modulo}, @{const_name times}]\<close>
  115.37 +setup \<open>Predicate_Compile_Data.ignore_consts [\<^const_name>\<open>divide\<close>, \<^const_name>\<open>modulo\<close>, \<^const_name>\<open>times\<close>]\<close>
  115.38  
  115.39  section \<open>Arithmetic operations\<close>
  115.40  
  115.41 @@ -95,57 +95,57 @@
  115.42    val ioi = Fun (Input, Fun (Output, Fun (Input, Bool)))
  115.43    val oii = Fun (Output, Fun (Input, Fun (Input, Bool)))
  115.44    val ooi = Fun (Output, Fun (Output, Fun (Input, Bool)))
  115.45 -  val plus_nat = Core_Data.functional_compilation @{const_name plus} iio