Skip to content

Commit 30c06e3

Browse files
committed
Adaptations for Isabelle2025
1 parent 6280f47 commit 30c06e3

10 files changed

Lines changed: 31 additions & 46 deletions

Countable_Set_Extra.thy

Lines changed: 0 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -87,13 +87,6 @@ lemma cset_CollectD: "(a :: 'a::countable) \<in>\<^sub>c {x. P x}\<^sub>c \<Long
8787
lemma cset_Collect_cong: "(\<And>x. P x = Q x) ==> {x. P x}\<^sub>c = {x. Q x}\<^sub>c"
8888
by simp
8989

90-
text \<open> Avoid eta-contraction for robust pretty-printing. \<close>
91-
92-
print_translation \<open>
93-
[Syntax_Trans.preserve_binder_abs_tr'
94-
@{const_syntax cset_Collect} @{syntax_const "_cColl"}]
95-
\<close>
96-
9790
lift_definition cset_set :: "'a list \<Rightarrow> 'a cset" is set
9891
using countable_finite by blast
9992

Finite_Fun.thy

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -459,6 +459,4 @@ text \<open> Hide implementation details for finite functions \<close>
459459
lifting_update ffun.lifting
460460
lifting_forget ffun.lifting
461461

462-
unbundle no_lattice_syntax
463-
464462
end

Function_Toolkit.thy

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -58,17 +58,17 @@ consts
5858
disjoint :: "'f \<Rightarrow> bool"
5959

6060
adhoc_overloading
61-
disjoint rel_disjoint and
62-
disjoint pfun_disjoint and
63-
disjoint list_disjoint
61+
disjoint \<rightleftharpoons> rel_disjoint and
62+
disjoint \<rightleftharpoons> pfun_disjoint and
63+
disjoint \<rightleftharpoons> list_disjoint
6464

6565
subsection \<open> Partitions \<close>
6666

6767
consts partitions :: "'f \<Rightarrow> 'a set \<Rightarrow> bool" (infix "partitions" 65)
6868

6969
adhoc_overloading
70-
partitions rel_partitions and
71-
partitions pfun_partitions and
72-
partitions list_partitions
70+
partitions \<rightleftharpoons> rel_partitions and
71+
partitions \<rightleftharpoons> pfun_partitions and
72+
partitions \<rightleftharpoons> list_partitions
7373

7474
end

Overriding.thy

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -37,6 +37,4 @@ lemma override_compat_iff: "P ## Q \<Longrightarrow> (P \<oplus> Q) ## R \<longl
3737

3838
end
3939

40-
unbundle no_lattice_syntax
41-
4240
end

Partial_Fun.thy

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1439,6 +1439,4 @@ text \<open> Hide implementation details for partial functions \<close>
14391439
lifting_update pfun.lifting
14401440
lifting_forget pfun.lifting
14411441

1442-
unbundle no_lattice_syntax
1443-
14441442
end

Partial_Inj.thy

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -203,6 +203,4 @@ lemma pfun_of_pinj_of_alist [code]:
203203

204204
declare pinj_of_alist.simps [simp del]
205205

206-
unbundle no_lattice_syntax
207-
208206
end

Relation_Toolkit.thy

Lines changed: 21 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -48,11 +48,11 @@ hide_const (open) dom
4848
consts dom :: "'f \<Rightarrow> 'a set"
4949

5050
adhoc_overloading
51-
dom Map.dom and
52-
dom Relation.Domain and
53-
dom Partial_Fun.pdom and
54-
dom Finite_Fun.fdom and
55-
dom Partial_Inj.pidom
51+
dom \<rightleftharpoons> Map.dom and
52+
dom \<rightleftharpoons> Relation.Domain and
53+
dom \<rightleftharpoons> Partial_Fun.pdom and
54+
dom \<rightleftharpoons> Finite_Fun.fdom and
55+
dom \<rightleftharpoons> Partial_Inj.pidom
5656

5757
subsection \<open> Range \<close>
5858

@@ -61,11 +61,11 @@ hide_const (open) ran
6161
consts ran :: "'f \<Rightarrow> 'a set"
6262

6363
adhoc_overloading
64-
ran Map.ran and
65-
ran Relation.Range and
66-
ran Partial_Fun.pran and
67-
ran Finite_Fun.fran and
68-
ran Partial_Inj.piran
64+
ran \<rightleftharpoons> Map.ran and
65+
ran \<rightleftharpoons> Relation.Range and
66+
ran \<rightleftharpoons> Partial_Fun.pran and
67+
ran \<rightleftharpoons> Finite_Fun.fran and
68+
ran \<rightleftharpoons> Partial_Inj.piran
6969

7070
subsection \<open> Identity relation \<close>
7171

@@ -86,9 +86,9 @@ text \<open> Composition is probably the most difficult of the Z functions to im
8686
consts zcomp :: "'f \<Rightarrow> 'g \<Rightarrow> 'h"
8787

8888
adhoc_overloading
89-
zcomp Fun.comp and
90-
zcomp pfun_comp and
91-
zcomp ffun_comp
89+
zcomp \<rightleftharpoons> Fun.comp and
90+
zcomp \<rightleftharpoons> pfun_comp and
91+
zcomp \<rightleftharpoons> ffun_comp
9292

9393
text \<open> Once we overload @{term Fun.comp}, we need to at least have output syntax set up. \<close>
9494

@@ -109,10 +109,10 @@ consts dom_res :: "'a set \<Rightarrow> 'r \<Rightarrow> 'r" (infixr "\<Zdres>"
109109
abbreviation ndres (infixr "\<Zndres>" 85) where "ndres A P \<equiv> CONST dom_res (- A) P"
110110

111111
adhoc_overloading
112-
dom_res rel_domres
113-
and dom_res pdom_res
114-
and dom_res fdom_res
115-
and dom_res pinj_dres
112+
dom_res \<rightleftharpoons> rel_domres
113+
and dom_res \<rightleftharpoons> pdom_res
114+
and dom_res \<rightleftharpoons> fdom_res
115+
and dom_res \<rightleftharpoons> pinj_dres
116116

117117
syntax "_ndres" :: "logic \<Rightarrow> logic \<Rightarrow> logic"
118118
translations "_ndres A P" == "CONST dom_res (- A) P"
@@ -124,10 +124,10 @@ consts ran_res :: "'r \<Rightarrow> 'a set \<Rightarrow> 'r" (infixl "\<Zrres>"
124124
abbreviation nrres (infixl "\<Znrres>" 86) where "nrres P A \<equiv> CONST ran_res P (- A)"
125125

126126
adhoc_overloading
127-
ran_res rel_ranres
128-
and ran_res pran_res
129-
and ran_res fran_res
130-
and ran_res pinj_rres
127+
ran_res \<rightleftharpoons> rel_ranres
128+
and ran_res \<rightleftharpoons> pran_res
129+
and ran_res \<rightleftharpoons> fran_res
130+
and ran_res \<rightleftharpoons> pinj_rres
131131

132132
subsection \<open> Relational inversion \<close>
133133

Sequence_Toolkit.thy

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -139,14 +139,14 @@ subsection \<open> Domain \<close>
139139
definition dom_seq :: "'a list \<Rightarrow> \<nat> set" where
140140
[simp]: "dom_seq xs = {0..<#xs}"
141141

142-
adhoc_overloading dom dom_seq
142+
adhoc_overloading dom \<rightleftharpoons> dom_seq
143143

144144
subsection \<open> Range \<close>
145145

146146
definition ran_seq :: "'a list \<Rightarrow> 'a set" where
147147
[simp]: "ran_seq xs = set xs"
148148

149-
adhoc_overloading ran ran_seq
149+
adhoc_overloading ran \<rightleftharpoons> ran_seq
150150

151151
subsection \<open> Filter \<close>
152152

Set_Toolkit.thy

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
section \<open> Set Toolkit \<close>
22

33
theory Set_Toolkit
4-
imports "HOL-Library.Adhoc_Overloading" "HOL-Library.Multiset" "Relation_Lib"
4+
imports "HOL-Library.Multiset" "Relation_Lib"
55
begin
66

77
text \<open> The majority of the Z set toolkit is implemented in the core libraries of HOL. We could

Tabulate_Command.thy

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -51,7 +51,7 @@ fun tabulate_cmd raw_t state =
5151
val t' = HOLogic.tupled_lambda xp t
5252
(* Close the term, apply the tabulate function, and evaluate *)
5353
val ts' = dest_list (Value_Command.value ctx (check_term ctx (const @{const_name "tabulate"} $ t')));
54-
fun term_string t = YXML.content_of (symbolic_string_of (pretty_term ctx' t));
54+
fun term_string t = XML.content_of (YXML.parse_body (symbolic_string_of (pretty_term ctx' t)));
5555
val heads = (map term_string (map Free (rev xs)) @ [term_string t])
5656
val rows = (map ((fn (x, y) => (map term_string (strip_tuple x) @ [term_string y])) o dest_prod) ts');
5757
in Pretty.writeln ((print_table heads rows)) end;

0 commit comments

Comments
 (0)