You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: pyk/src/pyk/k2lean4/Prelude.lean
+59-11Lines changed: 59 additions & 11 deletions
Original file line number
Diff line number
Diff line change
@@ -81,25 +81,73 @@ axiom nodupAx : forall m, List.Nodup (keysAx K m)
81
81
noncomputabledefMapHook (K V : Type) : MapHookSig K V :=
82
82
{ map := mapCAx,
83
83
unit := unitAx,
84
-
cons := (consAx K V),
85
-
lookup := (lookupAx K V),
86
-
lookup? := (lookupAx? K V),
87
-
update := (updateAx K V),
88
-
delete := (deleteAx K),
84
+
cons := consAx K V,
85
+
lookup := lookupAx K V,
86
+
lookup? := lookupAx? K V,
87
+
update := updateAx K V,
88
+
delete := deleteAx K,
89
89
concat := concatAx,
90
90
difference := differenceAx,
91
91
updateMap := updateMapAx,
92
-
removeAll := (removeAllAx K),
93
-
keys := (keysAx K),
94
-
in_keys := (in_keysAx K),
95
-
values := (valuesAx V),
92
+
removeAll := removeAllAx K,
93
+
keys := keysAx K,
94
+
in_keys := in_keysAx K,
95
+
values := valuesAx V,
96
96
size := sizeAx,
97
97
includes := includesAx,
98
-
choice := (choiceAx K),
99
-
nodup := (nodupAx K) }
98
+
choice := choiceAx K,
99
+
nodup := nodupAx K }
100
100
101
101
end MapHookDef
102
102
103
+
namespace SetHookDef
104
+
/-
105
+
Implementation of immutable, associative, commutative sets of `KItem`.
106
+
The sets are nilpotent, i.e., the concatenation of two sets containing elements in common is `#False` (note however, this may be silently allowed during concrete execution).
107
+
If you intend to add an element to a set that might already be present in the set, use the `|Set` operator instead.
108
+
-/
109
+
110
+
structureSetHookSig (T : Type) where
111
+
set : Type-- Carrier, such as `T → Prop`
112
+
unit : set
113
+
concat : set → set → Option set
114
+
setItem : T → set
115
+
union : set → set → set
116
+
intersection : set → set → set
117
+
difference : set → set → set
118
+
inSet : T → set → Bool
119
+
inclusion : set → set → Bool
120
+
size : set → Int
121
+
choice : set → T
122
+
123
+
variable (T : Type)
124
+
axiomsetCAx : Type
125
+
axiomunitAx : setCAx
126
+
axiomconcatAx : setCAx → setCAx → Option setCAx
127
+
axiomsetItemAx : T → setCAx
128
+
axiomunionAx : setCAx → setCAx → setCAx
129
+
axiomintersectionAx : setCAx → setCAx → setCAx
130
+
axiomdifferenceAx : setCAx → setCAx → setCAx
131
+
axiominSetAx : T → setCAx → Bool
132
+
axiominclusionAx : setCAx → setCAx → Bool
133
+
axiomsizeAx : setCAx → Int
134
+
axiomchoiceAx : setCAx → T
135
+
136
+
noncomputabledefSetHook (T : Type) : SetHookSig T :=
0 commit comments