702 Type ("fun", [Type ("nat", []), Type ("nat", [])])])) => t |
702 Type ("fun", [Type ("nat", []), Type ("nat", [])])])) => t |
703 | Const (@{const_name HOL.minus}, Type ("fun", [Type ("nat", []), |
703 | Const (@{const_name HOL.minus}, Type ("fun", [Type ("nat", []), |
704 Type ("fun", [Type ("nat", []), Type ("nat", [])])])) => t |
704 Type ("fun", [Type ("nat", []), Type ("nat", [])])])) => t |
705 | Const (@{const_name HOL.times}, Type ("fun", [Type ("nat", []), |
705 | Const (@{const_name HOL.times}, Type ("fun", [Type ("nat", []), |
706 Type ("fun", [Type ("nat", []), Type ("nat", [])])])) => t |
706 Type ("fun", [Type ("nat", []), Type ("nat", [])])])) => t |
707 | Const ("List.op @", _) => t |
707 | Const ("List.append", _) => t |
708 | Const ("Lfp.lfp", _) => t |
708 | Const ("Lfp.lfp", _) => t |
709 | Const ("Gfp.gfp", _) => t |
709 | Const ("Gfp.gfp", _) => t |
710 | Const ("fst", _) => t |
710 | Const ("fst", _) => t |
711 | Const ("snd", _) => t |
711 | Const ("snd", _) => t |
712 (* simply-typed lambda calculus *) |
712 (* simply-typed lambda calculus *) |
893 Type ("fun", [Type ("nat", []), Type ("nat", [])])])) => |
893 Type ("fun", [Type ("nat", []), Type ("nat", [])])])) => |
894 collect_type_axioms (axs, T) |
894 collect_type_axioms (axs, T) |
895 | Const (@{const_name HOL.times}, T as Type ("fun", [Type ("nat", []), |
895 | Const (@{const_name HOL.times}, T as Type ("fun", [Type ("nat", []), |
896 Type ("fun", [Type ("nat", []), Type ("nat", [])])])) => |
896 Type ("fun", [Type ("nat", []), Type ("nat", [])])])) => |
897 collect_type_axioms (axs, T) |
897 collect_type_axioms (axs, T) |
898 | Const ("List.op @", T) => collect_type_axioms (axs, T) |
898 | Const ("List.append", T) => collect_type_axioms (axs, T) |
899 | Const ("Lfp.lfp", T) => collect_type_axioms (axs, T) |
899 | Const ("Lfp.lfp", T) => collect_type_axioms (axs, T) |
900 | Const ("Gfp.gfp", T) => collect_type_axioms (axs, T) |
900 | Const ("Gfp.gfp", T) => collect_type_axioms (axs, T) |
901 | Const ("fst", T) => collect_type_axioms (axs, T) |
901 | Const ("fst", T) => collect_type_axioms (axs, T) |
902 | Const ("snd", T) => collect_type_axioms (axs, T) |
902 | Const ("snd", T) => collect_type_axioms (axs, T) |
903 (* simply-typed lambda calculus *) |
903 (* simply-typed lambda calculus *) |
2725 NONE; |
2725 NONE; |
2726 |
2726 |
2727 (* theory -> model -> arguments -> Term.term -> |
2727 (* theory -> model -> arguments -> Term.term -> |
2728 (interpretation * model * arguments) option *) |
2728 (interpretation * model * arguments) option *) |
2729 |
2729 |
2730 (* only an optimization: 'op @' could in principle be interpreted with *) |
2730 (* only an optimization: 'append' could in principle be interpreted with *) |
2731 (* interpreters available already (using its definition), but the code *) |
2731 (* interpreters available already (using its definition), but the code *) |
2732 (* below is more efficient *) |
2732 (* below is more efficient *) |
2733 |
2733 |
2734 fun List_append_interpreter thy model args t = |
2734 fun List_append_interpreter thy model args t = |
2735 case t of |
2735 case t of |
2736 Const ("List.op @", Type ("fun", [Type ("List.list", [T]), Type ("fun", |
2736 Const ("List.append", Type ("fun", [Type ("List.list", [T]), Type ("fun", |
2737 [Type ("List.list", [_]), Type ("List.list", [_])])])) => |
2737 [Type ("List.list", [_]), Type ("List.list", [_])])])) => |
2738 let |
2738 let |
2739 val (i_elem, _, _) = interpret thy model |
2739 val (i_elem, _, _) = interpret thy model |
2740 {maxvars=0, def_eq=false, next_idx=1, bounds=[], wellformed=True} |
2740 {maxvars=0, def_eq=false, next_idx=1, bounds=[], wellformed=True} |
2741 (Free ("dummy", T)) |
2741 (Free ("dummy", T)) |
3213 add_interpreter "Finite_Set.finite" Finite_Set_finite_interpreter #> |
3213 add_interpreter "Finite_Set.finite" Finite_Set_finite_interpreter #> |
3214 add_interpreter "Nat_Orderings.less" Nat_less_interpreter #> |
3214 add_interpreter "Nat_Orderings.less" Nat_less_interpreter #> |
3215 add_interpreter "Nat_HOL.plus" Nat_plus_interpreter #> |
3215 add_interpreter "Nat_HOL.plus" Nat_plus_interpreter #> |
3216 add_interpreter "Nat_HOL.minus" Nat_minus_interpreter #> |
3216 add_interpreter "Nat_HOL.minus" Nat_minus_interpreter #> |
3217 add_interpreter "Nat_HOL.times" Nat_times_interpreter #> |
3217 add_interpreter "Nat_HOL.times" Nat_times_interpreter #> |
3218 add_interpreter "List.op @" List_append_interpreter #> |
3218 add_interpreter "List.append" List_append_interpreter #> |
3219 add_interpreter "Lfp.lfp" Lfp_lfp_interpreter #> |
3219 add_interpreter "Lfp.lfp" Lfp_lfp_interpreter #> |
3220 add_interpreter "Gfp.gfp" Gfp_gfp_interpreter #> |
3220 add_interpreter "Gfp.gfp" Gfp_gfp_interpreter #> |
3221 add_interpreter "fst" Product_Type_fst_interpreter #> |
3221 add_interpreter "fst" Product_Type_fst_interpreter #> |
3222 add_interpreter "snd" Product_Type_snd_interpreter #> |
3222 add_interpreter "snd" Product_Type_snd_interpreter #> |
3223 add_printer "stlc" stlc_printer #> |
3223 add_printer "stlc" stlc_printer #> |