6161    Any ,
6262    Iterable ,
6363    Sequence ,
64-     TypeGuard ,
6564    TypeVar ,
6665    Self ,
6766    Union ,
@@ -464,7 +463,7 @@ def py_value(self):
464463        return  None 
465464
466465
467- def  is_ast (a  : Any ) ->  TypeGuard [ AstRef ] :
466+ def  is_ast (a  : Any ) ->  bool :
468467    """Return `True` if `a` is an AST node. 
469468
470469    >>> is_ast(10) 
@@ -660,7 +659,7 @@ def __hash__(self):
660659        return  AstRef .__hash__ (self )
661660
662661
663- def  is_sort (s  : Any ) ->  TypeGuard [ SortRef ] :
662+ def  is_sort (s  : Any ) ->  bool :
664663    """Return `True` if `s` is a Z3 sort. 
665664
666665    >>> is_sort(IntSort()) 
@@ -1641,7 +1640,7 @@ def py_value(self):
16411640
16421641
16431642
1644- def  is_bool (a  : Any ) ->  TypeGuard [ BoolRef ] :
1643+ def  is_bool (a  : Any ) ->  bool :
16451644    """Return `True` if `a` is a Z3 Boolean expression. 
16461645
16471646    >>> p = Bool('p') 
@@ -1659,7 +1658,7 @@ def is_bool(a : Any) -> TypeGuard[BoolRef]:
16591658    return  isinstance (a , BoolRef )
16601659
16611660
1662- def  is_true (a  : Any ) ->  TypeGuard [ BoolRef ] :
1661+ def  is_true (a  : Any ) ->  bool :
16631662    """Return `True` if `a` is the Z3 true expression. 
16641663
16651664    >>> p = Bool('p') 
@@ -1677,7 +1676,7 @@ def is_true(a : Any) -> TypeGuard[BoolRef]:
16771676    return  is_app_of (a , Z3_OP_TRUE )
16781677
16791678
1680- def  is_false (a  : Any ) ->  TypeGuard [ BoolRef ] :
1679+ def  is_false (a  : Any ) ->  bool :
16811680    """Return `True` if `a` is the Z3 false expression. 
16821681
16831682    >>> p = Bool('p') 
@@ -1691,7 +1690,7 @@ def is_false(a : Any) -> TypeGuard[BoolRef]:
16911690    return  is_app_of (a , Z3_OP_FALSE )
16921691
16931692
1694- def  is_and (a  : Any ) ->  TypeGuard [ BoolRef ] :
1693+ def  is_and (a  : Any ) ->  bool :
16951694    """Return `True` if `a` is a Z3 and expression. 
16961695
16971696    >>> p, q = Bools('p q') 
@@ -1703,7 +1702,7 @@ def is_and(a : Any) -> TypeGuard[BoolRef]:
17031702    return  is_app_of (a , Z3_OP_AND )
17041703
17051704
1706- def  is_or (a  : Any ) ->  TypeGuard [ BoolRef ] :
1705+ def  is_or (a  : Any ) ->  bool :
17071706    """Return `True` if `a` is a Z3 or expression. 
17081707
17091708    >>> p, q = Bools('p q') 
@@ -1715,7 +1714,7 @@ def is_or(a : Any) -> TypeGuard[BoolRef]:
17151714    return  is_app_of (a , Z3_OP_OR )
17161715
17171716
1718- def  is_implies (a  : Any ) ->  TypeGuard [ BoolRef ] :
1717+ def  is_implies (a  : Any ) ->  bool :
17191718    """Return `True` if `a` is a Z3 implication expression. 
17201719
17211720    >>> p, q = Bools('p q') 
@@ -1727,7 +1726,7 @@ def is_implies(a : Any) -> TypeGuard[BoolRef]:
17271726    return  is_app_of (a , Z3_OP_IMPLIES )
17281727
17291728
1730- def  is_not (a  : Any ) ->  TypeGuard [ BoolRef ] :
1729+ def  is_not (a  : Any ) ->  bool :
17311730    """Return `True` if `a` is a Z3 not expression. 
17321731
17331732    >>> p = Bool('p') 
@@ -1739,7 +1738,7 @@ def is_not(a : Any) -> TypeGuard[BoolRef]:
17391738    return  is_app_of (a , Z3_OP_NOT )
17401739
17411740
1742- def  is_eq (a  : Any ) ->  TypeGuard [ BoolRef ] :
1741+ def  is_eq (a  : Any ) ->  bool :
17431742    """Return `True` if `a` is a Z3 equality expression. 
17441743
17451744    >>> x, y = Ints('x y') 
@@ -1749,7 +1748,7 @@ def is_eq(a : Any) -> TypeGuard[BoolRef]:
17491748    return  is_app_of (a , Z3_OP_EQ )
17501749
17511750
1752- def  is_distinct (a  : Any ) ->  TypeGuard [ BoolRef ] :
1751+ def  is_distinct (a  : Any ) ->  bool :
17531752    """Return `True` if `a` is a Z3 distinct expression. 
17541753
17551754    >>> x, y, z = Ints('x y z') 
@@ -2444,7 +2443,7 @@ def cast(self, val):
24442443                _z3_assert (False , msg  %  self )
24452444
24462445
2447- def  is_arith_sort (s  : Any ) ->  TypeGuard [ ArithSortRef ] :
2446+ def  is_arith_sort (s  : Any ) ->  bool :
24482447    """Return `True` if s is an arithmetical sort (type). 
24492448
24502449    >>> is_arith_sort(IntSort()) 
@@ -2766,7 +2765,7 @@ def is_arith(a):
27662765    return  isinstance (a , ArithRef )
27672766
27682767
2769- def  is_int (a ) ->  TypeGuard [ ArithRef ] :
2768+ def  is_int (a ) ->  bool :
27702769    """Return `True` if `a` is an integer expression. 
27712770
27722771    >>> x = Int('x') 
@@ -2872,7 +2871,7 @@ def is_algebraic_value(a):
28722871    return  is_arith (a ) and  a .is_real () and  _is_algebraic (a .ctx , a .as_ast ())
28732872
28742873
2875- def  is_add (a  : Any ) ->  TypeGuard [ ArithRef ] :
2874+ def  is_add (a  : Any ) ->  bool :
28762875    """Return `True` if `a` is an expression of the form b + c. 
28772876
28782877    >>> x, y = Ints('x y') 
@@ -2884,7 +2883,7 @@ def is_add(a : Any) -> TypeGuard[ArithRef]:
28842883    return  is_app_of (a , Z3_OP_ADD )
28852884
28862885
2887- def  is_mul (a  : Any ) ->  TypeGuard [ ArithRef ] :
2886+ def  is_mul (a  : Any ) ->  bool :
28882887    """Return `True` if `a` is an expression of the form b * c. 
28892888
28902889    >>> x, y = Ints('x y') 
@@ -2896,7 +2895,7 @@ def is_mul(a : Any) -> TypeGuard[ArithRef]:
28962895    return  is_app_of (a , Z3_OP_MUL )
28972896
28982897
2899- def  is_sub (a  : Any ) ->  TypeGuard [ ArithRef ] :
2898+ def  is_sub (a  : Any ) ->  bool :
29002899    """Return `True` if `a` is an expression of the form b - c. 
29012900
29022901    >>> x, y = Ints('x y') 
@@ -2908,7 +2907,7 @@ def is_sub(a : Any) -> TypeGuard[ArithRef]:
29082907    return  is_app_of (a , Z3_OP_SUB )
29092908
29102909
2911- def  is_div (a  : Any ) ->  TypeGuard [ ArithRef ] :
2910+ def  is_div (a  : Any ) ->  bool :
29122911    """Return `True` if `a` is an expression of the form b / c. 
29132912
29142913    >>> x, y = Reals('x y') 
@@ -2925,7 +2924,7 @@ def is_div(a : Any) -> TypeGuard[ArithRef]:
29252924    return  is_app_of (a , Z3_OP_DIV )
29262925
29272926
2928- def  is_idiv (a  : Any ) ->  TypeGuard [ ArithRef ] :
2927+ def  is_idiv (a  : Any ) ->  bool :
29292928    """Return `True` if `a` is an expression of the form b div c. 
29302929
29312930    >>> x, y = Ints('x y') 
@@ -2937,7 +2936,7 @@ def is_idiv(a : Any) -> TypeGuard[ArithRef]:
29372936    return  is_app_of (a , Z3_OP_IDIV )
29382937
29392938
2940- def  is_mod (a  : Any ) ->  TypeGuard [ ArithRef ] :
2939+ def  is_mod (a  : Any ) ->  bool :
29412940    """Return `True` if `a` is an expression of the form b % c. 
29422941
29432942    >>> x, y = Ints('x y') 
@@ -2949,7 +2948,7 @@ def is_mod(a : Any) -> TypeGuard[ArithRef]:
29492948    return  is_app_of (a , Z3_OP_MOD )
29502949
29512950
2952- def  is_le (a  : Any ) ->  TypeGuard [ ArithRef ] :
2951+ def  is_le (a  : Any ) ->  bool :
29532952    """Return `True` if `a` is an expression of the form b <= c. 
29542953
29552954    >>> x, y = Ints('x y') 
@@ -2961,7 +2960,7 @@ def is_le(a : Any) -> TypeGuard[ArithRef]:
29612960    return  is_app_of (a , Z3_OP_LE )
29622961
29632962
2964- def  is_lt (a  : Any ) ->  TypeGuard [ ArithRef ] :
2963+ def  is_lt (a  : Any ) ->  bool :
29652964    """Return `True` if `a` is an expression of the form b < c. 
29662965
29672966    >>> x, y = Ints('x y') 
@@ -2973,7 +2972,7 @@ def is_lt(a : Any) -> TypeGuard[ArithRef]:
29732972    return  is_app_of (a , Z3_OP_LT )
29742973
29752974
2976- def  is_ge (a  : Any ) ->  TypeGuard [ ArithRef ] :
2975+ def  is_ge (a  : Any ) ->  bool :
29772976    """Return `True` if `a` is an expression of the form b >= c. 
29782977
29792978    >>> x, y = Ints('x y') 
@@ -2985,7 +2984,7 @@ def is_ge(a : Any) -> TypeGuard[ArithRef]:
29852984    return  is_app_of (a , Z3_OP_GE )
29862985
29872986
2988- def  is_gt (a  : Any ) ->  TypeGuard [ ArithRef ] :
2987+ def  is_gt (a  : Any ) ->  bool :
29892988    """Return `True` if `a` is an expression of the form b > c. 
29902989
29912990    >>> x, y = Ints('x y') 
@@ -3009,7 +3008,7 @@ def is_is_int(a : Any) -> bool:
30093008    return  is_app_of (a , Z3_OP_IS_INT )
30103009
30113010
3012- def  is_to_real (a  : Any ) ->  TypeGuard [ ArithRef ] :
3011+ def  is_to_real (a  : Any ) ->  bool :
30133012    """Return `True` if `a` is an expression of the form ToReal(b). 
30143013
30153014    >>> x = Int('x') 
@@ -3024,7 +3023,7 @@ def is_to_real(a : Any) -> TypeGuard[ArithRef]:
30243023    return  is_app_of (a , Z3_OP_TO_REAL )
30253024
30263025
3027- def  is_to_int (a  : Any ) ->  TypeGuard [ ArithRef ] :
3026+ def  is_to_int (a  : Any ) ->  bool :
30283027    """Return `True` if `a` is an expression of the form ToInt(b). 
30293028
30303029    >>> x = Real('x') 
@@ -4700,7 +4699,7 @@ def is_array_sort(a):
47004699    return  Z3_get_sort_kind (a .ctx .ref (), Z3_get_sort (a .ctx .ref (), a .ast )) ==  Z3_ARRAY_SORT 
47014700
47024701
4703- def  is_array (a  : Any ) ->  TypeGuard [ ArrayRef ] :
4702+ def  is_array (a  : Any ) ->  bool :
47044703    """Return `True` if `a` is a Z3 array expression. 
47054704
47064705    >>> a = Array('a', IntSort(), IntSort()) 
@@ -11151,15 +11150,15 @@ def is_seq(a):
1115111150    return  isinstance (a , SeqRef )
1115211151
1115311152
11154- def  is_string (a : Any ) ->  TypeGuard [ SeqRef ] :
11153+ def  is_string (a : Any ) ->  bool :
1115511154    """Return `True` if `a` is a Z3 string expression. 
1115611155    >>> print (is_string(StringVal("ab"))) 
1115711156    True 
1115811157    """ 
1115911158    return  isinstance (a , SeqRef ) and  a .is_string ()
1116011159
1116111160
11162- def  is_string_value (a : Any ) ->  TypeGuard [ SeqRef ] :
11161+ def  is_string_value (a : Any ) ->  bool :
1116311162    """return 'True' if 'a' is a Z3 string constant expression. 
1116411163    >>> print (is_string_value(StringVal("a"))) 
1116511164    True 
0 commit comments