Skip to content

Commit 91dc2b3

Browse files
committed
Updates for Isabelle 2025
1 parent 866ea6f commit 91dc2b3

File tree

4 files changed

+10
-5
lines changed

4 files changed

+10
-5
lines changed

lib/isabelle/Add_Cancel_Distinct.thy

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -119,7 +119,12 @@ fun cancel_step ctxt ct = let
119119
val choose2 = if length choose < Int.min (length lhs_sort, length rhs_sort)
120120
then choose else List.tl choose
121121
val _ = List.hd choose2 (* raise Empty if no progress can be made *)
122-
val x = Variable.variant_frees ctxt [t] [("x", @{typ unit})]
122+
(* TODO: Double-check the following lines, which had to be changed for
123+
Isabelle 2025 due to an API change from variant_frees (which called
124+
declare_names internally) to variant_names. The updated code aims
125+
to preserve the previous behaviour. *)
126+
val ctxt' = Variable.declare_names t ctxt
127+
val x = Variable.variant_names ctxt' [("x", @{typ unit})]
123128
|> the_single |> Free
124129
val conv = tag_sum_conv ctxt choose2 x then_conv split_by_var_conv ctxt x
125130
val lhs_split = conv lhs
@@ -293,4 +298,4 @@ have "distinct (rev [12 ..< 80])"
293298

294299
end
295300

296-
end
301+
end

lib/isabelle/Sail2_monadic_combinators_lemmas.thy

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -177,7 +177,7 @@ lemma of_bl_bin_word_of_int:
177177
lemma get_slice_int_0_bin_to_bl[simp]:
178178
"len > 0 \<Longrightarrow> get_slice_int len n 0 = of_bl (bin_to_bl (nat len) n)"
179179
unfolding get_slice_int_def get_slice_int_bv_def subrange_list_def
180-
by (auto simp: subrange_list_dec_drop_take len_bin_to_bl_aux)
180+
by (auto simp: subrange_list_dec_drop_take size_bin_to_bl_aux)
181181

182182
lemma to_bl_of_bl[simp]:
183183
fixes bl :: "bool list"

lib/isabelle/Sail2_operators_mwords_lemmas.thy

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -111,7 +111,7 @@ lemma of_bl_bin_word_of_int:
111111
lemma get_slice_int_0_bin_to_bl[simp]:
112112
"len > 0 \<Longrightarrow> get_slice_int len n 0 = of_bl (bin_to_bl (nat len) n)"
113113
unfolding get_slice_int_def get_slice_int_bv_def subrange_list_def
114-
by (auto simp: subrange_list_dec_drop_take len_bin_to_bl_aux)
114+
by (auto simp: subrange_list_dec_drop_take size_bin_to_bl_aux)
115115

116116
lemma to_bl_of_bl[simp]:
117117
fixes bl :: "bool list"

lib/isabelle/Sail2_values_lemmas.thy

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -91,7 +91,7 @@ proof (use assms in \<open>induction xs n arbitrary: i rule: repeat.induct[case_
9191
show ?case
9292
using Step.prems Step.IH[of "i - length xs"]
9393
unfolding repeat.simps[of xs n]
94-
by (auto simp: nth_append Divides.mod_geq[symmetric] nat_diff_distrib diff_mult_distrib)
94+
by (auto simp: nth_append le_mod_geq[symmetric] nat_diff_distrib diff_mult_distrib)
9595
qed
9696

9797
termination index_list

0 commit comments

Comments
 (0)