@@ -240,19 +240,19 @@ def GenericDispatch(default_factory) -> SortDispatch:
240240
241241or_ = SortDispatch (name = "or_" , pointwise = True )
242242"""Sort based dispatch for `|` syntax"""
243- smt .ExprRef .__or__ = lambda x , y : or_ (x , y ) # type: ignore
243+ smt .ExprRef .__or__ = lambda x , y : or_ (x , y ) # type: ignore[invalid-assignment]
244244smt .QuantifierRef .__or__ = lambda x , y : or_ (x , y ) # type: ignore
245245or_ .register (smt .BoolSort (), smt .Or )
246246
247247invert = SortDispatch (name = "invert" , pointwise = True )
248248"""Sort based dispatch for `~` syntax"""
249- smt .ExprRef .__invert__ = lambda x : invert (x ) # type: ignore
249+ smt .ExprRef .__invert__ = lambda x : invert (x ) # type: ignore[invalid-assignment]
250250smt .QuantifierRef .__invert__ = lambda x : invert (x ) # type: ignore
251251invert .register (smt .BoolSort (), smt .Not )
252252
253253lt = SortDispatch (name = "lt" , pointwise = True )
254254"""Sort based dispatch for `<` syntax"""
255- smt .ExprRef .__lt__ = lambda x , y : lt (x , y ) # type: ignore
255+ smt .ExprRef .__lt__ = lambda x , y : lt (x , y ) # type: ignore[invalid-assignment]
256256lt .register (smt .IntSort (), lambda x , y : x < y )
257257lt .register (smt .RealSort (), lambda x , y : x < y )
258258# Conceptually this kind of makes sense, but SubSet is the more natural thing.
@@ -261,51 +261,51 @@ def GenericDispatch(default_factory) -> SortDispatch:
261261
262262le = SortDispatch (name = "le" , pointwise = True )
263263"""Sort based dispatch for `<=` syntax"""
264- smt .ExprRef .__le__ = lambda x , y : le (x , y ) # type: ignore
264+ smt .ExprRef .__le__ = lambda x , y : le (x , y ) # type: ignore[invalid-assignment]
265265le .register (smt .IntSort (), lambda x , y : x <= y )
266266le .register (smt .RealSort (), lambda x , y : x <= y )
267267# le.register(smt.BoolSort(), lambda x, y: smt.Implies(x, y))
268268
269269ge = SortDispatch (name = "ge" , pointwise = True )
270270"""Sort based dispatch for `>=` syntax"""
271- smt .ExprRef .__ge__ = lambda x , y : ge (x , y ) # type: ignore
271+ smt .ExprRef .__ge__ = lambda x , y : ge (x , y ) # type: ignore[invalid-assignment]
272272ge .register (smt .IntSort (), lambda x , y : x >= y )
273273ge .register (smt .RealSort (), lambda x , y : x >= y )
274274# ge.register(smt.BoolSort(), lambda x, y: smt.Implies(y, x))
275275
276276gt = SortDispatch (name = "gt" , pointwise = True )
277277"""Sort based dispatch for `>` syntax"""
278- smt .ExprRef .__gt__ = lambda x , y : gt (x , y ) # type: ignore
278+ smt .ExprRef .__gt__ = lambda x , y : gt (x , y ) # type: ignore[invalid-assignment]
279279gt .register (smt .IntSort (), lambda x , y : x > y )
280280gt .register (smt .RealSort (), lambda x , y : x > y )
281281# gt.register(smt.BoolSort(), lambda x, y: smt.And(x, smt.Not(y)))
282282
283283# contains cannot work because python demands a concrete bool.
284284# contains = SortDispatch(name="contains")
285- # smt.ExprRef.__contains__ = lambda x, y: contains(x, y) # type: ignore
285+ # smt.ExprRef.__contains__ = lambda x, y: contains(x, y)
286286
287287eq = SortDispatch (name = "eq" , default = smt .Eq )
288288"""Sort based dispatch for `==` syntax"""
289- smt .ExprRef .__eq__ = lambda x , y : eq (x , y ) # type: ignore
289+ smt .ExprRef .__eq__ = lambda x , y : eq (x , y ) # type: ignore[invalid-assignment]
290290
291291
292292ne = SortDispatch (name = "ne" , default = smt .NEq )
293293"""Sort based dispatch for `!=` syntax"""
294- smt .ExprRef .__ne__ = lambda x , y : ne (x , y ) # type: ignore
294+ smt .ExprRef .__ne__ = lambda x , y : ne (x , y ) # type: ignore[invalid-assignment]
295295
296296wf = SortDispatch (name = "wf" )
297297"""`wf` is a special predicate for well-formedness. It is auto inserted by QForAll and QExists."""
298- smt .ExprRef .wf = lambda x : wf (x ) # type: ignore
298+ smt .ExprRef .wf = lambda x : wf (x )
299299
300300measure = SortDispatch (name = "measure" )
301301"""`measure is an Int value associated with an ExprRef for use in defining well-founded recursion."""
302- # smt.ExprRef.measure = lambda x: measure(x) # type: ignore
303- measure .register (smt .IntSort (), lambda x : smt .Abs (x )) # type: ignore
302+ # smt.ExprRef.measure = lambda x: measure(x)
303+ measure .register (smt .IntSort (), lambda x : smt .Abs (x ))
304304measure .register (smt .BoolSort (), lambda x : smt .If (x , smt .IntVal (1 ), smt .IntVal (0 )))
305305
306306choose = SortDispatch (name = "choose" )
307307"""Sort based dispatch for Hilbert choice operator."""
308- # smt.ExprRef.choose = lambda P: choose(P) # type: ignore
308+ # smt.ExprRef.choose = lambda P: choose(P)
309309
310310# These are of questionable utility, but conceptually should be here.
311311forall = SortDispatch (name = "forall" )
@@ -356,7 +356,7 @@ def induct_default(x, P):
356356
357357induct = SortDispatch (name = "induct" , default = induct_default )
358358"""Sort based dispatch for induction principles. Should instantiate an induction scheme for variable x and predicate P"""
359- smt .ExprRef .induct = lambda x , P : induct (x , P ) # type: ignore
359+ smt .ExprRef .induct = lambda x , P : induct (x , P )
360360
361361
362362def induct_int (x , P ):
0 commit comments