;; created by `python python/tests/test_array_api.py`
(push 1)
(sort egglog.exp.array_api.DType)
(constructor egglog_exp_array_api_DType_float64 () egglog.exp.array_api.DType)
(let $__expr_1 (egglog_exp_array_api_DType_float64 ))
(sort egglog.exp.array_api.Boolean)
(constructor egglog_exp_array_api_DType___eq__ (egglog.exp.array_api.DType egglog.exp.array_api.DType) egglog.exp.array_api.Boolean)
(sort egglog.exp.array_api.NDArray)
(constructor egglog_exp_array_api_NDArray_dtype (egglog.exp.array_api.NDArray) egglog.exp.array_api.DType)
(constructor egglog_exp_array_api_assume_isfinite (egglog.exp.array_api.NDArray) egglog.exp.array_api.NDArray)
(sort egglog.exp.array_api.TupleInt)
(constructor egglog_exp_array_api_assume_shape (egglog.exp.array_api.NDArray egglog.exp.array_api.TupleInt) egglog.exp.array_api.NDArray)
(constructor egglog_exp_array_api_assume_dtype (egglog.exp.array_api.NDArray egglog.exp.array_api.DType) egglog.exp.array_api.NDArray)
(constructor egglog_exp_array_api_NDArray_var (String) egglog.exp.array_api.NDArray :cost 200)
(sort egglog.exp.array_api.Int)
(sort egglog.builtins.Vec[egglog.exp.array_api.Int] (Vec egglog.exp.array_api.Int))
(constructor egglog_exp_array_api_TupleInt___init__ (egglog.builtins.Vec[egglog.exp.array_api.Int]) egglog.exp.array_api.TupleInt)
(constructor egglog_exp_array_api_Int___init__ (i64) egglog.exp.array_api.Int)
(let $__expr_0 (egglog_exp_array_api_DType___eq__ $__expr_1 (egglog_exp_array_api_NDArray_dtype (egglog_exp_array_api_assume_isfinite (egglog_exp_array_api_assume_shape (egglog_exp_array_api_assume_dtype (egglog_exp_array_api_NDArray_var "X") $__expr_1) (egglog_exp_array_api_TupleInt___init__ (vec-of (egglog_exp_array_api_Int___init__ 150) (egglog_exp_array_api_Int___init__ 4))))))))
(ruleset egglog.exp.array_api.array_api_ruleset)
(sort egglog.exp.array_api.Value)
(sort egglog.exp.array_api.TupleValue)
(constructor _lambda_0 (egglog.exp.array_api.TupleValue egglog.exp.array_api.TupleInt) egglog.exp.array_api.Value)
(constructor egglog_exp_array_api_TupleValue___getitem__ (egglog.exp.array_api.TupleValue egglog.exp.array_api.Int) egglog.exp.array_api.Value)
(constructor egglog_exp_array_api_TupleInt___getitem__ (egglog.exp.array_api.TupleInt egglog.exp.array_api.Int) egglog.exp.array_api.Int)
(rewrite (_lambda_0 _tv _idx) (egglog_exp_array_api_TupleValue___getitem__ _tv (egglog_exp_array_api_TupleInt___getitem__ _idx (egglog_exp_array_api_Int___init__ 0))) :subsume :ruleset egglog.exp.array_api.array_api_ruleset)
(constructor egglog_exp_array_api_NDArray_from_tuple_value (egglog.exp.array_api.TupleValue) egglog.exp.array_api.NDArray :unextractable)
(sort egglog.builtins.UnstableFn[egglog.exp.array_api.Value,egglog.exp.array_api.TupleInt] (UnstableFn (egglog.exp.array_api.TupleInt ) egglog.exp.array_api.Value))
(constructor egglog_exp_array_api_NDArray_fn (egglog.exp.array_api.TupleInt egglog.exp.array_api.DType egglog.builtins.UnstableFn[egglog.exp.array_api.Value,egglog.exp.array_api.TupleInt]) egglog.exp.array_api.NDArray)
(constructor egglog_exp_array_api_TupleValue_length (egglog.exp.array_api.TupleValue) egglog.exp.array_api.Int)
(constructor egglog_exp_array_api_Value_dtype (egglog.exp.array_api.Value) egglog.exp.array_api.DType)
(rewrite (egglog_exp_array_api_NDArray_from_tuple_value _tv) (egglog_exp_array_api_NDArray_fn (egglog_exp_array_api_TupleInt___init__ (vec-of (egglog_exp_array_api_TupleValue_length _tv))) (egglog_exp_array_api_Value_dtype (egglog_exp_array_api_TupleValue___getitem__ _tv (egglog_exp_array_api_Int___init__ 0))) (unstable-fn "_lambda_0" _tv)) :ruleset egglog.exp.array_api.array_api_ruleset)
(constructor _lambda_1 (egglog.exp.array_api.NDArray egglog.exp.array_api.Int) egglog.exp.array_api.Value)
(constructor egglog_exp_array_api_NDArray_index (egglog.exp.array_api.NDArray egglog.exp.array_api.TupleInt) egglog.exp.array_api.Value)
(rewrite (_lambda_1 _self _i) (egglog_exp_array_api_NDArray_index _self (egglog_exp_array_api_TupleInt___init__ (vec-of _i))) :subsume :ruleset egglog.exp.array_api.array_api_ruleset)
(constructor egglog_exp_array_api_NDArray_to_tuple_values (egglog.exp.array_api.NDArray) egglog.exp.array_api.TupleValue :unextractable)
(sort egglog.builtins.UnstableFn[egglog.exp.array_api.Value,egglog.exp.array_api.Int] (UnstableFn (egglog.exp.array_api.Int ) egglog.exp.array_api.Value))
(constructor egglog_exp_array_api_TupleValue_fn (egglog.exp.array_api.Int egglog.builtins.UnstableFn[egglog.exp.array_api.Value,egglog.exp.array_api.Int]) egglog.exp.array_api.TupleValue)
(constructor egglog_exp_array_api_NDArray_shape (egglog.exp.array_api.NDArray) egglog.exp.array_api.TupleInt)
(rewrite (egglog_exp_array_api_NDArray_to_tuple_values _self) (egglog_exp_array_api_TupleValue_fn (egglog_exp_array_api_TupleInt___getitem__ (egglog_exp_array_api_NDArray_shape _self) (egglog_exp_array_api_Int___init__ 0)) (unstable-fn "_lambda_1" _self)) :ruleset egglog.exp.array_api.array_api_ruleset)
(constructor egglog_exp_array_api_NDArray_ndim (egglog.exp.array_api.NDArray) egglog.exp.array_api.Int)
(constructor egglog_exp_array_api_TupleInt_length (egglog.exp.array_api.TupleInt) egglog.exp.array_api.Int)
(rewrite (egglog_exp_array_api_NDArray_ndim _self) (egglog_exp_array_api_TupleInt_length (egglog_exp_array_api_NDArray_shape _self)) :ruleset egglog.exp.array_api.array_api_ruleset)
(constructor _lambda_2 (egglog.exp.array_api.NDArray egglog.exp.array_api.TupleInt) egglog.exp.array_api.Value)
(rewrite (_lambda_2 _self _idx) (egglog_exp_array_api_NDArray_index _self (egglog_exp_array_api_TupleInt___init__ (vec-of (egglog_exp_array_api_TupleInt___getitem__ _idx (egglog_exp_array_api_Int___init__ 1)) (egglog_exp_array_api_TupleInt___getitem__ _idx (egglog_exp_array_api_Int___init__ 0))))) :subsume :ruleset egglog.exp.array_api.array_api_ruleset)
(constructor egglog_exp_array_api_NDArray_T (egglog.exp.array_api.NDArray) egglog.exp.array_api.NDArray)
(rewrite (egglog_exp_array_api_NDArray_T _self) (egglog_exp_array_api_NDArray_fn (egglog_exp_array_api_TupleInt___init__ (vec-of (egglog_exp_array_api_TupleInt___getitem__ (egglog_exp_array_api_NDArray_shape _self) (egglog_exp_array_api_Int___init__ 1)) (egglog_exp_array_api_TupleInt___getitem__ (egglog_exp_array_api_NDArray_shape _self) (egglog_exp_array_api_Int___init__ 0)))) (egglog_exp_array_api_NDArray_dtype _self) (unstable-fn "_lambda_2" _self)) :ruleset egglog.exp.array_api.array_api_ruleset)
(constructor _lambda_3 (egglog.exp.array_api.NDArray egglog.exp.array_api.NDArray egglog.exp.array_api.TupleInt) egglog.exp.array_api.Value)
(constructor egglog_exp_array_api_Value_diff (egglog.exp.array_api.Value egglog.exp.array_api.Value) egglog.exp.array_api.Value :cost 100000000)
(constructor egglog_exp_array_api_TupleInt_drop (egglog.exp.array_api.TupleInt egglog.exp.array_api.Int) egglog.exp.array_api.TupleInt :unextractable)
(constructor egglog_exp_array_api_TupleInt_take (egglog.exp.array_api.TupleInt egglog.exp.array_api.Int) egglog.exp.array_api.TupleInt :unextractable)
(rewrite (_lambda_3 _v _self _idx) (egglog_exp_array_api_Value_diff (egglog_exp_array_api_NDArray_index _self (egglog_exp_array_api_TupleInt_drop _idx (egglog_exp_array_api_TupleInt_length (egglog_exp_array_api_NDArray_shape _v)))) (egglog_exp_array_api_NDArray_index _v (egglog_exp_array_api_TupleInt_take _idx (egglog_exp_array_api_TupleInt_length (egglog_exp_array_api_NDArray_shape _v))))) :subsume :ruleset egglog.exp.array_api.array_api_ruleset)
(constructor egglog_exp_array_api_NDArray_diff (egglog.exp.array_api.NDArray egglog.exp.array_api.NDArray) egglog.exp.array_api.NDArray :unextractable)
(constructor egglog_exp_array_api_TupleInt___add__ (egglog.exp.array_api.TupleInt egglog.exp.array_api.TupleInt) egglog.exp.array_api.TupleInt :unextractable)
(rewrite (egglog_exp_array_api_NDArray_diff _self _v) (egglog_exp_array_api_NDArray_fn (egglog_exp_array_api_TupleInt___add__ (egglog_exp_array_api_NDArray_shape _v) (egglog_exp_array_api_NDArray_shape _self)) (egglog_exp_array_api_NDArray_dtype _self) (unstable-fn "_lambda_3" _v _self)) :ruleset egglog.exp.array_api.array_api_ruleset)
(constructor _lambda_4 (egglog.exp.array_api.NDArray) egglog.exp.array_api.NDArray)
(rewrite (_lambda_4 _i) _i :subsume :ruleset egglog.exp.array_api.array_api_ruleset)
(sort egglog.exp.array_api.TupleNDArray)
(constructor _lambda_5 (egglog.exp.array_api.TupleNDArray egglog.exp.array_api.Int) egglog.exp.array_api.NDArray)
(constructor egglog_exp_array_api_TupleNDArray___getitem__ (egglog.exp.array_api.TupleNDArray egglog.exp.array_api.Int) egglog.exp.array_api.NDArray)
(rewrite (_lambda_5 _self _j) (egglog_exp_array_api_TupleNDArray___getitem__ _self _j) :subsume :ruleset egglog.exp.array_api.array_api_ruleset)
(constructor _lambda_6 (egglog.exp.array_api.TupleNDArray egglog.exp.array_api.NDArray egglog.exp.array_api.Int) egglog.exp.array_api.NDArray)
(sort egglog.builtins.UnstableFn[egglog.exp.array_api.NDArray] (UnstableFn () egglog.exp.array_api.NDArray))
(constructor egglog_exp_array_api_NDArray_if_ (egglog.exp.array_api.Boolean egglog.builtins.UnstableFn[egglog.exp.array_api.NDArray] egglog.builtins.UnstableFn[egglog.exp.array_api.NDArray]) egglog.exp.array_api.NDArray)
(constructor egglog_exp_array_api_Int___eq__ (egglog.exp.array_api.Int egglog.exp.array_api.Int) egglog.exp.array_api.Boolean)
(constructor egglog_exp_array_api_TupleNDArray_length (egglog.exp.array_api.TupleNDArray) egglog.exp.array_api.Int)
(rewrite (_lambda_6 _self _i _j) (egglog_exp_array_api_NDArray_if_ (egglog_exp_array_api_Int___eq__ _j (egglog_exp_array_api_TupleNDArray_length _self)) (unstable-fn "_lambda_4" _i) (unstable-fn "_lambda_5" _self _j)) :subsume :ruleset egglog.exp.array_api.array_api_ruleset)
(constructor egglog_exp_array_api_TupleNDArray_append (egglog.exp.array_api.TupleNDArray egglog.exp.array_api.NDArray) egglog.exp.array_api.TupleNDArray :unextractable)
(sort egglog.builtins.UnstableFn[egglog.exp.array_api.NDArray,egglog.exp.array_api.Int] (UnstableFn (egglog.exp.array_api.Int ) egglog.exp.array_api.NDArray))
(constructor egglog_exp_array_api_TupleNDArray_fn (egglog.exp.array_api.Int egglog.builtins.UnstableFn[egglog.exp.array_api.NDArray,egglog.exp.array_api.Int]) egglog.exp.array_api.TupleNDArray)
(constructor egglog_exp_array_api_Int___add__ (egglog.exp.array_api.Int egglog.exp.array_api.Int) egglog.exp.array_api.Int)
(rewrite (egglog_exp_array_api_TupleNDArray_append _self _i) (egglog_exp_array_api_TupleNDArray_fn (egglog_exp_array_api_Int___add__ (egglog_exp_array_api_TupleNDArray_length _self) (egglog_exp_array_api_Int___init__ 1)) (unstable-fn "_lambda_6" _self _i)) :ruleset egglog.exp.array_api.array_api_ruleset)
(constructor _lambda_7 (egglog.exp.array_api.TupleNDArray egglog.exp.array_api.Int) egglog.exp.array_api.NDArray)
(rewrite (_lambda_7 _self _i) (egglog_exp_array_api_TupleNDArray___getitem__ _self _i) :subsume :ruleset egglog.exp.array_api.array_api_ruleset)
(constructor _lambda_8 (egglog.exp.array_api.TupleNDArray egglog.exp.array_api.TupleValue egglog.exp.array_api.Int) egglog.exp.array_api.NDArray)
(sort egglog.exp.array_api.RecursiveValue)
(constructor egglog_exp_array_api_NDArray___init__ (egglog.exp.array_api.RecursiveValue) egglog.exp.array_api.NDArray)
(constructor egglog_exp_array_api_RecursiveValue___init__ (egglog.exp.array_api.Value) egglog.exp.array_api.RecursiveValue)
(constructor egglog_exp_array_api_Int___sub__ (egglog.exp.array_api.Int egglog.exp.array_api.Int) egglog.exp.array_api.Int)
(rewrite (_lambda_8 _self _other _i) (egglog_exp_array_api_NDArray___init__ (egglog_exp_array_api_RecursiveValue___init__ (egglog_exp_array_api_TupleValue___getitem__ _other (egglog_exp_array_api_Int___sub__ _i (egglog_exp_array_api_TupleNDArray_length _self))))) :subsume :ruleset egglog.exp.array_api.array_api_ruleset)
(constructor _lambda_9 (egglog.exp.array_api.TupleNDArray egglog.exp.array_api.TupleValue egglog.exp.array_api.Int) egglog.exp.array_api.NDArray)
(constructor egglog_exp_array_api_Int___lt__ (egglog.exp.array_api.Int egglog.exp.array_api.Int) egglog.exp.array_api.Boolean)
(rewrite (_lambda_9 _self _other _i) (egglog_exp_array_api_NDArray_if_ (egglog_exp_array_api_Int___lt__ _i (egglog_exp_array_api_TupleNDArray_length _self)) (unstable-fn "_lambda_7" _self _i) (unstable-fn "_lambda_8" _self _other _i)) :subsume :ruleset egglog.exp.array_api.array_api_ruleset)
(constructor egglog_exp_array_api_TupleNDArray___add__ (egglog.exp.array_api.TupleNDArray egglog.exp.array_api.TupleValue) egglog.exp.array_api.TupleNDArray :unextractable)
(rewrite (egglog_exp_array_api_TupleNDArray___add__ _self _other) (egglog_exp_array_api_TupleNDArray_fn (egglog_exp_array_api_Int___add__ (egglog_exp_array_api_TupleNDArray_length _self) (egglog_exp_array_api_TupleValue_length _other)) (unstable-fn "_lambda_9" _self _other)) :ruleset egglog.exp.array_api.array_api_ruleset)
(constructor egglog_exp_array_api_TupleNDArray_drop_last (egglog.exp.array_api.TupleNDArray) egglog.exp.array_api.TupleNDArray :unextractable)
(rewrite (egglog_exp_array_api_TupleNDArray_drop_last _self) (egglog_exp_array_api_TupleNDArray_fn (egglog_exp_array_api_Int___sub__ (egglog_exp_array_api_TupleNDArray_length _self) (egglog_exp_array_api_Int___init__ 1)) (unstable-fn "egglog_exp_array_api_TupleNDArray___getitem__" _self)) :ruleset egglog.exp.array_api.array_api_ruleset)
(constructor egglog_exp_array_api_TupleNDArray_last (egglog.exp.array_api.TupleNDArray) egglog.exp.array_api.NDArray :unextractable)
(rewrite (egglog_exp_array_api_TupleNDArray_last _self) (egglog_exp_array_api_TupleNDArray___getitem__ _self (egglog_exp_array_api_Int___sub__ (egglog_exp_array_api_TupleNDArray_length _self) (egglog_exp_array_api_Int___init__ 1))) :ruleset egglog.exp.array_api.array_api_ruleset)
(constructor _lambda_10 (egglog.exp.array_api.Value) egglog.exp.array_api.Value)
(rewrite (_lambda_10 _i) _i :subsume :ruleset egglog.exp.array_api.array_api_ruleset)
(constructor _lambda_11 (egglog.exp.array_api.Int egglog.exp.array_api.TupleValue) egglog.exp.array_api.Value)
(rewrite (_lambda_11 _j _self) (egglog_exp_array_api_TupleValue___getitem__ _self _j) :subsume :ruleset egglog.exp.array_api.array_api_ruleset)
(constructor _lambda_12 (egglog.exp.array_api.TupleValue egglog.exp.array_api.Value egglog.exp.array_api.Int) egglog.exp.array_api.Value)
(sort egglog.builtins.UnstableFn[egglog.exp.array_api.Value] (UnstableFn () egglog.exp.array_api.Value))
(constructor egglog_exp_array_api_Value_if_ (egglog.exp.array_api.Boolean egglog.builtins.UnstableFn[egglog.exp.array_api.Value] egglog.builtins.UnstableFn[egglog.exp.array_api.Value]) egglog.exp.array_api.Value)
(rewrite (_lambda_12 _self _i _j) (egglog_exp_array_api_Value_if_ (egglog_exp_array_api_Int___eq__ _j (egglog_exp_array_api_TupleValue_length _self)) (unstable-fn "_lambda_10" _i) (unstable-fn "_lambda_11" _j _self)) :subsume :ruleset egglog.exp.array_api.array_api_ruleset)
(constructor egglog_exp_array_api_TupleValue_append (egglog.exp.array_api.TupleValue egglog.exp.array_api.Value) egglog.exp.array_api.TupleValue :unextractable)
(rewrite (egglog_exp_array_api_TupleValue_append _self _i) (egglog_exp_array_api_TupleValue_fn (egglog_exp_array_api_Int___add__ (egglog_exp_array_api_TupleValue_length _self) (egglog_exp_array_api_Int___init__ 1)) (unstable-fn "_lambda_12" _self _i)) :ruleset egglog.exp.array_api.array_api_ruleset)
(constructor _lambda_13 (egglog.exp.array_api.Int egglog.exp.array_api.TupleValue) egglog.exp.array_api.Value)
(rewrite (_lambda_13 _i _self) (egglog_exp_array_api_TupleValue___getitem__ _self _i) :subsume :ruleset egglog.exp.array_api.array_api_ruleset)
(constructor _lambda_14 (egglog.exp.array_api.TupleValue egglog.exp.array_api.Int egglog.exp.array_api.TupleValue) egglog.exp.array_api.Value)
(rewrite (_lambda_14 _other _i _self) (egglog_exp_array_api_TupleValue___getitem__ _other (egglog_exp_array_api_Int___sub__ _i (egglog_exp_array_api_TupleValue_length _self))) :subsume :ruleset egglog.exp.array_api.array_api_ruleset)
(constructor _lambda_15 (egglog.exp.array_api.TupleValue egglog.exp.array_api.TupleValue egglog.exp.array_api.Int) egglog.exp.array_api.Value)
(rewrite (_lambda_15 _other _self _i) (egglog_exp_array_api_Value_if_ (egglog_exp_array_api_Int___lt__ _i (egglog_exp_array_api_TupleValue_length _self)) (unstable-fn "_lambda_13" _i _self) (unstable-fn "_lambda_14" _other _i _self)) :subsume :ruleset egglog.exp.array_api.array_api_ruleset)
(constructor egglog_exp_array_api_TupleValue___add__ (egglog.exp.array_api.TupleValue egglog.exp.array_api.TupleValue) egglog.exp.array_api.TupleValue :unextractable)
(rewrite (egglog_exp_array_api_TupleValue___add__ _self _other) (egglog_exp_array_api_TupleValue_fn (egglog_exp_array_api_Int___add__ (egglog_exp_array_api_TupleValue_length _self) (egglog_exp_array_api_TupleValue_length _other)) (unstable-fn "_lambda_15" _other _self)) :ruleset egglog.exp.array_api.array_api_ruleset)
(constructor egglog_exp_array_api_TupleValue_last (egglog.exp.array_api.TupleValue) egglog.exp.array_api.Value :unextractable)
(rewrite (egglog_exp_array_api_TupleValue_last _self) (egglog_exp_array_api_TupleValue___getitem__ _self (egglog_exp_array_api_Int___sub__ (egglog_exp_array_api_TupleValue_length _self) (egglog_exp_array_api_Int___init__ 1))) :ruleset egglog.exp.array_api.array_api_ruleset)
(constructor egglog_exp_array_api_TupleValue_drop_last (egglog.exp.array_api.TupleValue) egglog.exp.array_api.TupleValue :unextractable)
(rewrite (egglog_exp_array_api_TupleValue_drop_last _self) (egglog_exp_array_api_TupleValue_fn (egglog_exp_array_api_Int___sub__ (egglog_exp_array_api_TupleValue_length _self) (egglog_exp_array_api_Int___init__ 1)) (unstable-fn "egglog_exp_array_api_TupleValue___getitem__" _self)) :ruleset egglog.exp.array_api.array_api_ruleset)
(constructor _lambda_16 (egglog.exp.array_api.Boolean) egglog.exp.array_api.Boolean)
(rewrite (_lambda_16 _init) _init :subsume :ruleset egglog.exp.array_api.array_api_ruleset)
(sort egglog.builtins.UnstableFn[egglog.exp.array_api.Boolean,egglog.exp.array_api.Boolean,egglog.exp.array_api.Value] (UnstableFn (egglog.exp.array_api.Boolean egglog.exp.array_api.Value) egglog.exp.array_api.Boolean))
(constructor _lambda_17 (egglog.exp.array_api.Boolean egglog.exp.array_api.TupleValue egglog.builtins.UnstableFn[egglog.exp.array_api.Boolean,egglog.exp.array_api.Boolean,egglog.exp.array_api.Value]) egglog.exp.array_api.Boolean)
(constructor egglog_exp_array_api_TupleValue_foldl_boolean (egglog.exp.array_api.TupleValue egglog.builtins.UnstableFn[egglog.exp.array_api.Boolean,egglog.exp.array_api.Boolean,egglog.exp.array_api.Value] egglog.exp.array_api.Boolean) egglog.exp.array_api.Boolean :unextractable)
(rewrite (_lambda_17 _init _self _f) (unstable-app _f (egglog_exp_array_api_TupleValue_foldl_boolean (egglog_exp_array_api_TupleValue_drop_last _self) _f _init) (egglog_exp_array_api_TupleValue_last _self)) :subsume :ruleset egglog.exp.array_api.array_api_ruleset)
(sort egglog.builtins.UnstableFn[egglog.exp.array_api.Boolean] (UnstableFn () egglog.exp.array_api.Boolean))
(constructor egglog_exp_array_api_Boolean_if_ (egglog.exp.array_api.Boolean egglog.builtins.UnstableFn[egglog.exp.array_api.Boolean] egglog.builtins.UnstableFn[egglog.exp.array_api.Boolean]) egglog.exp.array_api.Boolean)
(rewrite (egglog_exp_array_api_TupleValue_foldl_boolean _self _f _init) (egglog_exp_array_api_Boolean_if_ (egglog_exp_array_api_Int___eq__ (egglog_exp_array_api_TupleValue_length _self) (egglog_exp_array_api_Int___init__ 0)) (unstable-fn "_lambda_16" _init) (unstable-fn "_lambda_17" _init _self _f)) :ruleset egglog.exp.array_api.array_api_ruleset)
(constructor _lambda_18 (egglog.exp.array_api.Value) egglog.exp.array_api.Value)
(rewrite (_lambda_18 _init) _init :subsume :ruleset egglog.exp.array_api.array_api_ruleset)
(sort egglog.builtins.UnstableFn[egglog.exp.array_api.Value,egglog.exp.array_api.Value,egglog.exp.array_api.Value] (UnstableFn (egglog.exp.array_api.Value egglog.exp.array_api.Value) egglog.exp.array_api.Value))
(constructor _lambda_19 (egglog.exp.array_api.TupleValue egglog.builtins.UnstableFn[egglog.exp.array_api.Value,egglog.exp.array_api.Value,egglog.exp.array_api.Value] egglog.exp.array_api.Value) egglog.exp.array_api.Value)
(constructor egglog_exp_array_api_TupleValue_foldl_value (egglog.exp.array_api.TupleValue egglog.builtins.UnstableFn[egglog.exp.array_api.Value,egglog.exp.array_api.Value,egglog.exp.array_api.Value] egglog.exp.array_api.Value) egglog.exp.array_api.Value)
(rewrite (_lambda_19 _self _f _init) (unstable-app _f (egglog_exp_array_api_TupleValue_foldl_value (egglog_exp_array_api_TupleValue_drop_last _self) _f _init) (egglog_exp_array_api_TupleValue_last _self)) :subsume :ruleset egglog.exp.array_api.array_api_ruleset)
(rewrite (egglog_exp_array_api_TupleValue_foldl_value _self _f _init) (egglog_exp_array_api_Value_if_ (egglog_exp_array_api_Int___eq__ (egglog_exp_array_api_TupleValue_length _self) (egglog_exp_array_api_Int___init__ 0)) (unstable-fn "_lambda_18" _init) (unstable-fn "_lambda_19" _self _f _init)) :ruleset egglog.exp.array_api.array_api_ruleset)
(sort egglog.builtins.UnstableFn[egglog.exp.array_api.Value,egglog.exp.array_api.Value] (UnstableFn (egglog.exp.array_api.Value ) egglog.exp.array_api.Value))
(constructor _lambda_20 (egglog.exp.array_api.TupleValue egglog.builtins.UnstableFn[egglog.exp.array_api.Value,egglog.exp.array_api.Value] egglog.exp.array_api.Int) egglog.exp.array_api.Value)
(rewrite (_lambda_20 _self _f _i) (unstable-app _f (egglog_exp_array_api_TupleValue___getitem__ _self _i)) :subsume :ruleset egglog.exp.array_api.array_api_ruleset)
(constructor egglog_exp_array_api_TupleValue_map_value (egglog.exp.array_api.TupleValue egglog.builtins.UnstableFn[egglog.exp.array_api.Value,egglog.exp.array_api.Value]) egglog.exp.array_api.TupleValue :unextractable)
(rewrite (egglog_exp_array_api_TupleValue_map_value _self _f) (egglog_exp_array_api_TupleValue_fn (egglog_exp_array_api_TupleValue_length _self) (unstable-fn "_lambda_20" _self _f)) :ruleset egglog.exp.array_api.array_api_ruleset)
(constructor _lambda_21 (egglog.exp.array_api.Value egglog.exp.array_api.Boolean egglog.exp.array_api.Value) egglog.exp.array_api.Boolean)
(constructor egglog_exp_array_api_Boolean___or__ (egglog.exp.array_api.Boolean egglog.exp.array_api.Boolean) egglog.exp.array_api.Boolean)
(constructor egglog_exp_array_api_Value___eq__ (egglog.exp.array_api.Value egglog.exp.array_api.Value) egglog.exp.array_api.Boolean)
(rewrite (_lambda_21 _value _acc _j) (egglog_exp_array_api_Boolean___or__ _acc (egglog_exp_array_api_Value___eq__ _value _j)) :subsume :ruleset egglog.exp.array_api.array_api_ruleset)
(constructor egglog_exp_array_api_TupleValue_contains (egglog.exp.array_api.TupleValue egglog.exp.array_api.Value) egglog.exp.array_api.Boolean :unextractable)
(constructor egglog_exp_array_api_Boolean___init__ (bool) egglog.exp.array_api.Boolean)
(rewrite (egglog_exp_array_api_TupleValue_contains _self _value) (egglog_exp_array_api_TupleValue_foldl_boolean _self (unstable-fn "_lambda_21" _value) (egglog_exp_array_api_Boolean___init__ false)) :ruleset egglog.exp.array_api.array_api_ruleset)
(constructor _lambda_22 (egglog.exp.array_api.TupleInt egglog.exp.array_api.Int) egglog.exp.array_api.Value)
(constructor egglog_exp_array_api_Value_from_int (egglog.exp.array_api.Int) egglog.exp.array_api.Value)
(rewrite (_lambda_22 _ti _i) (egglog_exp_array_api_Value_from_int (egglog_exp_array_api_TupleInt___getitem__ _ti _i)) :subsume :ruleset egglog.exp.array_api.array_api_ruleset)
(constructor egglog_exp_array_api_TupleValue_from_tuple_int (egglog.exp.array_api.TupleInt) egglog.exp.array_api.TupleValue :unextractable)
(rewrite (egglog_exp_array_api_TupleValue_from_tuple_int _ti) (egglog_exp_array_api_TupleValue_fn (egglog_exp_array_api_TupleInt_length _ti) (unstable-fn "_lambda_22" _ti)) :ruleset egglog.exp.array_api.array_api_ruleset)
(constructor _lambda_23 (egglog.exp.array_api.TupleInt) egglog.exp.array_api.TupleInt)
(rewrite (_lambda_23 _i) _i :subsume :ruleset egglog.exp.array_api.array_api_ruleset)
(sort egglog.exp.array_api.TupleTupleInt)
(constructor _lambda_24 (egglog.exp.array_api.Int egglog.exp.array_api.TupleTupleInt) egglog.exp.array_api.TupleInt)
(constructor egglog_exp_array_api_TupleTupleInt___getitem__ (egglog.exp.array_api.TupleTupleInt egglog.exp.array_api.Int) egglog.exp.array_api.TupleInt)
(rewrite (_lambda_24 _j _self) (egglog_exp_array_api_TupleTupleInt___getitem__ _self _j) :subsume :ruleset egglog.exp.array_api.array_api_ruleset)
(constructor _lambda_25 (egglog.exp.array_api.TupleTupleInt egglog.exp.array_api.TupleInt egglog.exp.array_api.Int) egglog.exp.array_api.TupleInt)
(sort egglog.builtins.UnstableFn[egglog.exp.array_api.TupleInt] (UnstableFn () egglog.exp.array_api.TupleInt))
(constructor egglog_exp_array_api_TupleInt_if_ (egglog.exp.array_api.Boolean egglog.builtins.UnstableFn[egglog.exp.array_api.TupleInt] egglog.builtins.UnstableFn[egglog.exp.array_api.TupleInt]) egglog.exp.array_api.TupleInt)
(constructor egglog_exp_array_api_TupleTupleInt_length (egglog.exp.array_api.TupleTupleInt) egglog.exp.array_api.Int)
(rewrite (_lambda_25 _self _i _j) (egglog_exp_array_api_TupleInt_if_ (egglog_exp_array_api_Int___eq__ _j (egglog_exp_array_api_TupleTupleInt_length _self)) (unstable-fn "_lambda_23" _i) (unstable-fn "_lambda_24" _j _self)) :subsume :ruleset egglog.exp.array_api.array_api_ruleset)
(constructor egglog_exp_array_api_TupleTupleInt_append (egglog.exp.array_api.TupleTupleInt egglog.exp.array_api.TupleInt) egglog.exp.array_api.TupleTupleInt :unextractable)
(sort egglog.builtins.UnstableFn[egglog.exp.array_api.TupleInt,egglog.exp.array_api.Int] (UnstableFn (egglog.exp.array_api.Int ) egglog.exp.array_api.TupleInt))
(constructor egglog_exp_array_api_TupleTupleInt_fn (egglog.exp.array_api.Int egglog.builtins.UnstableFn[egglog.exp.array_api.TupleInt,egglog.exp.array_api.Int]) egglog.exp.array_api.TupleTupleInt)
(rewrite (egglog_exp_array_api_TupleTupleInt_append _self _i) (egglog_exp_array_api_TupleTupleInt_fn (egglog_exp_array_api_Int___add__ (egglog_exp_array_api_TupleTupleInt_length _self) (egglog_exp_array_api_Int___init__ 1)) (unstable-fn "_lambda_25" _self _i)) :ruleset egglog.exp.array_api.array_api_ruleset)
(constructor _lambda_26 (egglog.exp.array_api.TupleTupleInt egglog.exp.array_api.Int) egglog.exp.array_api.TupleInt)
(rewrite (_lambda_26 _self _i) (egglog_exp_array_api_TupleTupleInt___getitem__ _self _i) :subsume :ruleset egglog.exp.array_api.array_api_ruleset)
(constructor _lambda_27 (egglog.exp.array_api.TupleTupleInt egglog.exp.array_api.Int egglog.exp.array_api.TupleTupleInt) egglog.exp.array_api.TupleInt)
(rewrite (_lambda_27 _other _i _self) (egglog_exp_array_api_TupleTupleInt___getitem__ _other (egglog_exp_array_api_Int___sub__ _i (egglog_exp_array_api_TupleTupleInt_length _self))) :subsume :ruleset egglog.exp.array_api.array_api_ruleset)
(constructor _lambda_28 (egglog.exp.array_api.TupleTupleInt egglog.exp.array_api.TupleTupleInt egglog.exp.array_api.Int) egglog.exp.array_api.TupleInt)
(rewrite (_lambda_28 _other _self _i) (egglog_exp_array_api_TupleInt_if_ (egglog_exp_array_api_Int___lt__ _i (egglog_exp_array_api_TupleTupleInt_length _self)) (unstable-fn "_lambda_26" _self _i) (unstable-fn "_lambda_27" _other _i _self)) :subsume :ruleset egglog.exp.array_api.array_api_ruleset)
(constructor egglog_exp_array_api_TupleTupleInt___add__ (egglog.exp.array_api.TupleTupleInt egglog.exp.array_api.TupleTupleInt) egglog.exp.array_api.TupleTupleInt :unextractable)
(rewrite (egglog_exp_array_api_TupleTupleInt___add__ _self _other) (egglog_exp_array_api_TupleTupleInt_fn (egglog_exp_array_api_Int___add__ (egglog_exp_array_api_TupleTupleInt_length _self) (egglog_exp_array_api_TupleTupleInt_length _other)) (unstable-fn "_lambda_28" _other _self)) :ruleset egglog.exp.array_api.array_api_ruleset)
(constructor _lambda_29 (egglog.exp.array_api.Int egglog.exp.array_api.TupleTupleInt egglog.exp.array_api.Int) egglog.exp.array_api.TupleInt)
(rewrite (_lambda_29 _n _self _i) (egglog_exp_array_api_TupleTupleInt___getitem__ _self (egglog_exp_array_api_Int___add__ _i _n)) :subsume :ruleset egglog.exp.array_api.array_api_ruleset)
(constructor egglog_exp_array_api_TupleTupleInt_drop (egglog.exp.array_api.TupleTupleInt egglog.exp.array_api.Int) egglog.exp.array_api.TupleTupleInt :unextractable)
(rewrite (egglog_exp_array_api_TupleTupleInt_drop _self _n) (egglog_exp_array_api_TupleTupleInt_fn (egglog_exp_array_api_Int___sub__ (egglog_exp_array_api_TupleTupleInt_length _self) _n) (unstable-fn "_lambda_29" _n _self)) :ruleset egglog.exp.array_api.array_api_ruleset)
(sort egglog.builtins.UnstableFn[egglog.exp.array_api.Int,egglog.exp.array_api.TupleInt] (UnstableFn (egglog.exp.array_api.TupleInt ) egglog.exp.array_api.Int))
(constructor _lambda_30 (egglog.exp.array_api.TupleTupleInt egglog.builtins.UnstableFn[egglog.exp.array_api.Int,egglog.exp.array_api.TupleInt] egglog.exp.array_api.Int) egglog.exp.array_api.Int)
(rewrite (_lambda_30 _self _f _i) (unstable-app _f (egglog_exp_array_api_TupleTupleInt___getitem__ _self _i)) :subsume :ruleset egglog.exp.array_api.array_api_ruleset)
(constructor egglog_exp_array_api_TupleTupleInt_map_int (egglog.exp.array_api.TupleTupleInt egglog.builtins.UnstableFn[egglog.exp.array_api.Int,egglog.exp.array_api.TupleInt]) egglog.exp.array_api.TupleInt :unextractable)
(sort egglog.builtins.UnstableFn[egglog.exp.array_api.Int,egglog.exp.array_api.Int] (UnstableFn (egglog.exp.array_api.Int ) egglog.exp.array_api.Int))
(constructor egglog_exp_array_api_TupleInt_fn (egglog.exp.array_api.Int egglog.builtins.UnstableFn[egglog.exp.array_api.Int,egglog.exp.array_api.Int]) egglog.exp.array_api.TupleInt)
(rewrite (egglog_exp_array_api_TupleTupleInt_map_int _self _f) (egglog_exp_array_api_TupleInt_fn (egglog_exp_array_api_TupleTupleInt_length _self) (unstable-fn "_lambda_30" _self _f)) :ruleset egglog.exp.array_api.array_api_ruleset)
(sort egglog.builtins.UnstableFn[egglog.exp.array_api.Value,egglog.exp.array_api.Value,egglog.exp.array_api.TupleInt] (UnstableFn (egglog.exp.array_api.Value egglog.exp.array_api.TupleInt) egglog.exp.array_api.Value))
(constructor _lambda_31 (egglog.exp.array_api.TupleTupleInt egglog.builtins.UnstableFn[egglog.exp.array_api.Value,egglog.exp.array_api.Value,egglog.exp.array_api.TupleInt] egglog.exp.array_api.Value) egglog.exp.array_api.Value)
(constructor egglog_exp_array_api_TupleTupleInt_foldl_value (egglog.exp.array_api.TupleTupleInt egglog.builtins.UnstableFn[egglog.exp.array_api.Value,egglog.exp.array_api.Value,egglog.exp.array_api.TupleInt] egglog.exp.array_api.Value) egglog.exp.array_api.Value :unextractable)
(constructor egglog_exp_array_api_TupleTupleInt_drop_last (egglog.exp.array_api.TupleTupleInt) egglog.exp.array_api.TupleTupleInt :unextractable)
(constructor egglog_exp_array_api_TupleTupleInt_last (egglog.exp.array_api.TupleTupleInt) egglog.exp.array_api.TupleInt :unextractable)
(rewrite (_lambda_31 _self _f _init) (unstable-app _f (egglog_exp_array_api_TupleTupleInt_foldl_value (egglog_exp_array_api_TupleTupleInt_drop_last _self) _f _init) (egglog_exp_array_api_TupleTupleInt_last _self)) :subsume :ruleset egglog.exp.array_api.array_api_ruleset)
(rewrite (egglog_exp_array_api_TupleTupleInt_foldl_value _self _f _init) (egglog_exp_array_api_Value_if_ (egglog_exp_array_api_Int___eq__ (egglog_exp_array_api_TupleTupleInt_length _self) (egglog_exp_array_api_Int___init__ 0)) (unstable-fn "_lambda_18" _init) (unstable-fn "_lambda_31" _self _f _init)) :ruleset egglog.exp.array_api.array_api_ruleset)
(rewrite (egglog_exp_array_api_TupleTupleInt_last _self) (egglog_exp_array_api_TupleTupleInt___getitem__ _self (egglog_exp_array_api_Int___sub__ (egglog_exp_array_api_TupleTupleInt_length _self) (egglog_exp_array_api_Int___init__ 1))) :ruleset egglog.exp.array_api.array_api_ruleset)
(rewrite (egglog_exp_array_api_TupleTupleInt_drop_last _self) (egglog_exp_array_api_TupleTupleInt_fn (egglog_exp_array_api_Int___sub__ (egglog_exp_array_api_TupleTupleInt_length _self) (egglog_exp_array_api_Int___init__ 1)) (unstable-fn "egglog_exp_array_api_TupleTupleInt___getitem__" _self)) :ruleset egglog.exp.array_api.array_api_ruleset)
(constructor _lambda_32 (egglog.exp.array_api.TupleInt) egglog.exp.array_api.Int)
(rewrite (_lambda_32 _x) (egglog_exp_array_api_TupleInt_length _x) :subsume :ruleset egglog.exp.array_api.array_api_ruleset)
(constructor _lambda_33 (egglog.exp.array_api.TupleTupleInt egglog.exp.array_api.Int egglog.exp.array_api.Int) egglog.exp.array_api.Int)
(constructor egglog_exp_array_api_Int___mod__ (egglog.exp.array_api.Int egglog.exp.array_api.Int) egglog.exp.array_api.Int)
(constructor egglog_exp_array_api_Int___floordiv__ (egglog.exp.array_api.Int egglog.exp.array_api.Int) egglog.exp.array_api.Int)
(constructor egglog_exp_array_api_TupleInt_product (egglog.exp.array_api.TupleInt) egglog.exp.array_api.Int :unextractable)
(rewrite (_lambda_33 _self _i _j) (egglog_exp_array_api_TupleInt___getitem__ (egglog_exp_array_api_TupleTupleInt___getitem__ _self _j) (egglog_exp_array_api_Int___mod__ (egglog_exp_array_api_Int___floordiv__ _i (egglog_exp_array_api_TupleInt_product (egglog_exp_array_api_TupleTupleInt_map_int (egglog_exp_array_api_TupleTupleInt_drop _self (egglog_exp_array_api_Int___add__ _j (egglog_exp_array_api_Int___init__ 1))) (unstable-fn "_lambda_32")))) (egglog_exp_array_api_TupleInt_length (egglog_exp_array_api_TupleTupleInt___getitem__ _self _j)))) :subsume :ruleset egglog.exp.array_api.array_api_ruleset)
(constructor _lambda_34 (egglog.exp.array_api.TupleTupleInt egglog.exp.array_api.Int) egglog.exp.array_api.TupleInt)
(rewrite (_lambda_34 _self _i) (egglog_exp_array_api_TupleInt_fn (egglog_exp_array_api_TupleTupleInt_length _self) (unstable-fn "_lambda_33" _self _i)) :subsume :ruleset egglog.exp.array_api.array_api_ruleset)
(constructor egglog_exp_array_api_TupleTupleInt_product (egglog.exp.array_api.TupleTupleInt) egglog.exp.array_api.TupleTupleInt :unextractable)
(rewrite (egglog_exp_array_api_TupleTupleInt_product _self) (egglog_exp_array_api_TupleTupleInt_fn (egglog_exp_array_api_TupleInt_product (egglog_exp_array_api_TupleTupleInt_map_int _self (unstable-fn "_lambda_32"))) (unstable-fn "_lambda_34" _self)) :ruleset egglog.exp.array_api.array_api_ruleset)
(constructor _lambda_35 (egglog.exp.array_api.TupleInt egglog.exp.array_api.TupleInt egglog.exp.array_api.Boolean egglog.exp.array_api.Int) egglog.exp.array_api.Boolean)
(constructor egglog_exp_array_api_Boolean___and__ (egglog.exp.array_api.Boolean egglog.exp.array_api.Boolean) egglog.exp.array_api.Boolean)
(rewrite (_lambda_35 _other _self _acc _i) (egglog_exp_array_api_Boolean___and__ _acc (egglog_exp_array_api_Int___eq__ (egglog_exp_array_api_TupleInt___getitem__ _self _i) (egglog_exp_array_api_TupleInt___getitem__ _other _i))) :subsume :ruleset egglog.exp.array_api.array_api_ruleset)
(constructor _lambda_36 (egglog.exp.array_api.TupleInt egglog.exp.array_api.TupleInt) egglog.exp.array_api.Boolean)
(sort egglog.builtins.UnstableFn[egglog.exp.array_api.Boolean,egglog.exp.array_api.Boolean,egglog.exp.array_api.Int] (UnstableFn (egglog.exp.array_api.Boolean egglog.exp.array_api.Int) egglog.exp.array_api.Boolean))
(constructor egglog_exp_array_api_TupleInt_foldl_boolean (egglog.exp.array_api.TupleInt egglog.builtins.UnstableFn[egglog.exp.array_api.Boolean,egglog.exp.array_api.Boolean,egglog.exp.array_api.Int] egglog.exp.array_api.Boolean) egglog.exp.array_api.Boolean :unextractable)
(constructor egglog_exp_array_api_TupleInt_range (egglog.exp.array_api.Int) egglog.exp.array_api.TupleInt :unextractable)
(rewrite (_lambda_36 _other _self) (egglog_exp_array_api_TupleInt_foldl_boolean (egglog_exp_array_api_TupleInt_range (egglog_exp_array_api_TupleInt_length _self)) (unstable-fn "_lambda_35" _other _self) (egglog_exp_array_api_Boolean___init__ true)) :subsume :ruleset egglog.exp.array_api.array_api_ruleset)
(constructor _lambda_37 () egglog.exp.array_api.Boolean)
(rewrite (_lambda_37 ) (egglog_exp_array_api_Boolean___init__ false) :subsume :ruleset egglog.exp.array_api.array_api_ruleset)
(constructor egglog_exp_array_api_TupleInt___eq__ (egglog.exp.array_api.TupleInt egglog.exp.array_api.TupleInt) egglog.exp.array_api.Boolean)
(rewrite (egglog_exp_array_api_TupleInt___eq__ _self _other) (egglog_exp_array_api_Boolean_if_ (egglog_exp_array_api_Int___eq__ (egglog_exp_array_api_TupleInt_length _self) (egglog_exp_array_api_TupleInt_length _other)) (unstable-fn "_lambda_36" _other _self) (unstable-fn "_lambda_37")) :ruleset egglog.exp.array_api.array_api_ruleset)
(constructor _lambda_38 (egglog.exp.array_api.Int) egglog.exp.array_api.Int)
(rewrite (_lambda_38 _i) _i :subsume :ruleset egglog.exp.array_api.array_api_ruleset)
(constructor _lambda_39 (egglog.exp.array_api.Int egglog.exp.array_api.TupleInt) egglog.exp.array_api.Int)
(rewrite (_lambda_39 _j _self) (egglog_exp_array_api_TupleInt___getitem__ _self _j) :subsume :ruleset egglog.exp.array_api.array_api_ruleset)
(constructor _lambda_40 (egglog.exp.array_api.Int egglog.exp.array_api.TupleInt egglog.exp.array_api.Int) egglog.exp.array_api.Int)
(sort egglog.builtins.UnstableFn[egglog.exp.array_api.Int] (UnstableFn () egglog.exp.array_api.Int))
(constructor egglog_exp_array_api_Int_if_ (egglog.exp.array_api.Boolean egglog.builtins.UnstableFn[egglog.exp.array_api.Int] egglog.builtins.UnstableFn[egglog.exp.array_api.Int]) egglog.exp.array_api.Int)
(rewrite (_lambda_40 _i _self _j) (egglog_exp_array_api_Int_if_ (egglog_exp_array_api_Int___eq__ _j (egglog_exp_array_api_TupleInt_length _self)) (unstable-fn "_lambda_38" _i) (unstable-fn "_lambda_39" _j _self)) :subsume :ruleset egglog.exp.array_api.array_api_ruleset)
(constructor egglog_exp_array_api_TupleInt_append (egglog.exp.array_api.TupleInt egglog.exp.array_api.Int) egglog.exp.array_api.TupleInt :unextractable)
(rewrite (egglog_exp_array_api_TupleInt_append _self _i) (egglog_exp_array_api_TupleInt_fn (egglog_exp_array_api_Int___add__ (egglog_exp_array_api_TupleInt_length _self) (egglog_exp_array_api_Int___init__ 1)) (unstable-fn "_lambda_40" _i _self)) :ruleset egglog.exp.array_api.array_api_ruleset)
(constructor _lambda_41 (egglog.exp.array_api.Int egglog.exp.array_api.TupleInt) egglog.exp.array_api.Int)
(rewrite (_lambda_41 _j _self) (egglog_exp_array_api_TupleInt___getitem__ _self (egglog_exp_array_api_Int___sub__ _j (egglog_exp_array_api_Int___init__ 1))) :subsume :ruleset egglog.exp.array_api.array_api_ruleset)
(constructor _lambda_42 (egglog.exp.array_api.Int egglog.exp.array_api.TupleInt egglog.exp.array_api.Int) egglog.exp.array_api.Int)
(rewrite (_lambda_42 _i _self _j) (egglog_exp_array_api_Int_if_ (egglog_exp_array_api_Int___eq__ _j (egglog_exp_array_api_Int___init__ 0)) (unstable-fn "_lambda_38" _i) (unstable-fn "_lambda_41" _j _self)) :subsume :ruleset egglog.exp.array_api.array_api_ruleset)
(constructor egglog_exp_array_api_TupleInt_append_start (egglog.exp.array_api.TupleInt egglog.exp.array_api.Int) egglog.exp.array_api.TupleInt :unextractable)
(rewrite (egglog_exp_array_api_TupleInt_append_start _self _i) (egglog_exp_array_api_TupleInt_fn (egglog_exp_array_api_Int___add__ (egglog_exp_array_api_TupleInt_length _self) (egglog_exp_array_api_Int___init__ 1)) (unstable-fn "_lambda_42" _i _self)) :ruleset egglog.exp.array_api.array_api_ruleset)
(constructor _lambda_43 (egglog.exp.array_api.Int egglog.exp.array_api.TupleInt) egglog.exp.array_api.Int)
(rewrite (_lambda_43 _i _self) (egglog_exp_array_api_TupleInt___getitem__ _self _i) :subsume :ruleset egglog.exp.array_api.array_api_ruleset)
(constructor _lambda_44 (egglog.exp.array_api.TupleInt egglog.exp.array_api.Int egglog.exp.array_api.TupleInt) egglog.exp.array_api.Int)
(rewrite (_lambda_44 _other _i _self) (egglog_exp_array_api_TupleInt___getitem__ _other (egglog_exp_array_api_Int___sub__ _i (egglog_exp_array_api_TupleInt_length _self))) :subsume :ruleset egglog.exp.array_api.array_api_ruleset)
(constructor _lambda_45 (egglog.exp.array_api.TupleInt egglog.exp.array_api.TupleInt egglog.exp.array_api.Int) egglog.exp.array_api.Int)
(rewrite (_lambda_45 _other _self _i) (egglog_exp_array_api_Int_if_ (egglog_exp_array_api_Int___lt__ _i (egglog_exp_array_api_TupleInt_length _self)) (unstable-fn "_lambda_43" _i _self) (unstable-fn "_lambda_44" _other _i _self)) :subsume :ruleset egglog.exp.array_api.array_api_ruleset)
(rewrite (egglog_exp_array_api_TupleInt___add__ _self _other) (egglog_exp_array_api_TupleInt_fn (egglog_exp_array_api_Int___add__ (egglog_exp_array_api_TupleInt_length _self) (egglog_exp_array_api_TupleInt_length _other)) (unstable-fn "_lambda_45" _other _self)) :ruleset egglog.exp.array_api.array_api_ruleset)
(constructor _lambda_46 (egglog.exp.array_api.Int egglog.exp.array_api.TupleInt egglog.exp.array_api.Int) egglog.exp.array_api.Int)
(rewrite (_lambda_46 _n _self _i) (egglog_exp_array_api_TupleInt___getitem__ _self (egglog_exp_array_api_Int___add__ _i _n)) :subsume :ruleset egglog.exp.array_api.array_api_ruleset)
(rewrite (egglog_exp_array_api_TupleInt_drop _self _n) (egglog_exp_array_api_TupleInt_fn (egglog_exp_array_api_Int___sub__ (egglog_exp_array_api_TupleInt_length _self) _n) (unstable-fn "_lambda_46" _n _self)) :ruleset egglog.exp.array_api.array_api_ruleset)
(rewrite (egglog_exp_array_api_TupleInt_take _self _n) (egglog_exp_array_api_TupleInt_fn _n (unstable-fn "egglog_exp_array_api_TupleInt___getitem__" _self)) :ruleset egglog.exp.array_api.array_api_ruleset)
(constructor egglog_exp_array_api_TupleInt_rest (egglog.exp.array_api.TupleInt) egglog.exp.array_api.TupleInt :unextractable)
(rewrite (egglog_exp_array_api_TupleInt_rest _self) (egglog_exp_array_api_TupleInt_drop _self (egglog_exp_array_api_Int___init__ 1)) :ruleset egglog.exp.array_api.array_api_ruleset)
(constructor egglog_exp_array_api_TupleInt_last (egglog.exp.array_api.TupleInt) egglog.exp.array_api.Int :unextractable)
(rewrite (egglog_exp_array_api_TupleInt_last _self) (egglog_exp_array_api_TupleInt___getitem__ _self (egglog_exp_array_api_Int___sub__ (egglog_exp_array_api_TupleInt_length _self) (egglog_exp_array_api_Int___init__ 1))) :ruleset egglog.exp.array_api.array_api_ruleset)
(constructor egglog_exp_array_api_TupleInt_drop_last (egglog.exp.array_api.TupleInt) egglog.exp.array_api.TupleInt :unextractable)
(rewrite (egglog_exp_array_api_TupleInt_drop_last _self) (egglog_exp_array_api_TupleInt_fn (egglog_exp_array_api_Int___sub__ (egglog_exp_array_api_TupleInt_length _self) (egglog_exp_array_api_Int___init__ 1)) (unstable-fn "egglog_exp_array_api_TupleInt___getitem__" _self)) :ruleset egglog.exp.array_api.array_api_ruleset)
(rewrite (egglog_exp_array_api_TupleInt_range _stop) (egglog_exp_array_api_TupleInt_fn _stop (unstable-fn "_lambda_38")) :ruleset egglog.exp.array_api.array_api_ruleset)
(constructor _lambda_47 (egglog.exp.array_api.Int) egglog.exp.array_api.Int)
(rewrite (_lambda_47 _init) _init :subsume :ruleset egglog.exp.array_api.array_api_ruleset)
(sort egglog.builtins.UnstableFn[egglog.exp.array_api.Int,egglog.exp.array_api.Int,egglog.exp.array_api.Int] (UnstableFn (egglog.exp.array_api.Int egglog.exp.array_api.Int) egglog.exp.array_api.Int))
(constructor _lambda_48 (egglog.exp.array_api.TupleInt egglog.exp.array_api.Int egglog.builtins.UnstableFn[egglog.exp.array_api.Int,egglog.exp.array_api.Int,egglog.exp.array_api.Int]) egglog.exp.array_api.Int)
(constructor egglog_exp_array_api_TupleInt_foldl (egglog.exp.array_api.TupleInt egglog.builtins.UnstableFn[egglog.exp.array_api.Int,egglog.exp.array_api.Int,egglog.exp.array_api.Int] egglog.exp.array_api.Int) egglog.exp.array_api.Int :unextractable)
(rewrite (_lambda_48 _self _init _f) (unstable-app _f (egglog_exp_array_api_TupleInt_foldl (egglog_exp_array_api_TupleInt_drop_last _self) _f _init) (egglog_exp_array_api_TupleInt_last _self)) :subsume :ruleset egglog.exp.array_api.array_api_ruleset)
(rewrite (egglog_exp_array_api_TupleInt_foldl _self _f _init) (egglog_exp_array_api_Int_if_ (egglog_exp_array_api_Int___eq__ (egglog_exp_array_api_TupleInt_length _self) (egglog_exp_array_api_Int___init__ 0)) (unstable-fn "_lambda_47" _init) (unstable-fn "_lambda_48" _self _init _f)) :ruleset egglog.exp.array_api.array_api_ruleset)
(constructor _lambda_49 (egglog.exp.array_api.Boolean egglog.exp.array_api.TupleInt egglog.builtins.UnstableFn[egglog.exp.array_api.Boolean,egglog.exp.array_api.Boolean,egglog.exp.array_api.Int]) egglog.exp.array_api.Boolean)
(rewrite (_lambda_49 _init _self _f) (unstable-app _f (egglog_exp_array_api_TupleInt_foldl_boolean (egglog_exp_array_api_TupleInt_drop_last _self) _f _init) (egglog_exp_array_api_TupleInt_last _self)) :subsume :ruleset egglog.exp.array_api.array_api_ruleset)
(rewrite (egglog_exp_array_api_TupleInt_foldl_boolean _self _f _init) (egglog_exp_array_api_Boolean_if_ (egglog_exp_array_api_Int___eq__ (egglog_exp_array_api_TupleInt_length _self) (egglog_exp_array_api_Int___init__ 0)) (unstable-fn "_lambda_16" _init) (unstable-fn "_lambda_49" _init _self _f)) :ruleset egglog.exp.array_api.array_api_ruleset)
(constructor _lambda_50 (egglog.exp.array_api.TupleInt) egglog.exp.array_api.TupleInt)
(rewrite (_lambda_50 _init) _init :subsume :ruleset egglog.exp.array_api.array_api_ruleset)
(sort egglog.builtins.UnstableFn[egglog.exp.array_api.TupleInt,egglog.exp.array_api.TupleInt,egglog.exp.array_api.Int] (UnstableFn (egglog.exp.array_api.TupleInt egglog.exp.array_api.Int) egglog.exp.array_api.TupleInt))
(constructor _lambda_51 (egglog.exp.array_api.TupleInt egglog.builtins.UnstableFn[egglog.exp.array_api.TupleInt,egglog.exp.array_api.TupleInt,egglog.exp.array_api.Int] egglog.exp.array_api.TupleInt) egglog.exp.array_api.TupleInt)
(constructor egglog_exp_array_api_TupleInt_foldl_tuple_int (egglog.exp.array_api.TupleInt egglog.builtins.UnstableFn[egglog.exp.array_api.TupleInt,egglog.exp.array_api.TupleInt,egglog.exp.array_api.Int] egglog.exp.array_api.TupleInt) egglog.exp.array_api.TupleInt :unextractable)
(rewrite (_lambda_51 _self _f _init) (unstable-app _f (egglog_exp_array_api_TupleInt_foldl_tuple_int (egglog_exp_array_api_TupleInt_drop_last _self) _f _init) (egglog_exp_array_api_TupleInt_last _self)) :subsume :ruleset egglog.exp.array_api.array_api_ruleset)
(rewrite (egglog_exp_array_api_TupleInt_foldl_tuple_int _self _f _init) (egglog_exp_array_api_TupleInt_if_ (egglog_exp_array_api_Int___eq__ (egglog_exp_array_api_TupleInt_length _self) (egglog_exp_array_api_Int___init__ 0)) (unstable-fn "_lambda_50" _init) (unstable-fn "_lambda_51" _self _f _init)) :ruleset egglog.exp.array_api.array_api_ruleset)
(sort egglog.builtins.UnstableFn[egglog.exp.array_api.Value,egglog.exp.array_api.Value,egglog.exp.array_api.Int] (UnstableFn (egglog.exp.array_api.Value egglog.exp.array_api.Int) egglog.exp.array_api.Value))
(constructor _lambda_52 (egglog.builtins.UnstableFn[egglog.exp.array_api.Value,egglog.exp.array_api.Value,egglog.exp.array_api.Int] egglog.exp.array_api.TupleInt egglog.exp.array_api.Value) egglog.exp.array_api.Value)
(constructor egglog_exp_array_api_TupleInt_foldl_value (egglog.exp.array_api.TupleInt egglog.builtins.UnstableFn[egglog.exp.array_api.Value,egglog.exp.array_api.Value,egglog.exp.array_api.Int] egglog.exp.array_api.Value) egglog.exp.array_api.Value :unextractable)
(rewrite (_lambda_52 _f _self _init) (unstable-app _f (egglog_exp_array_api_TupleInt_foldl_value (egglog_exp_array_api_TupleInt_drop_last _self) _f _init) (egglog_exp_array_api_TupleInt_last _self)) :subsume :ruleset egglog.exp.array_api.array_api_ruleset)
(rewrite (egglog_exp_array_api_TupleInt_foldl_value _self _f _init) (egglog_exp_array_api_Value_if_ (egglog_exp_array_api_Int___eq__ (egglog_exp_array_api_TupleInt_length _self) (egglog_exp_array_api_Int___init__ 0)) (unstable-fn "_lambda_18" _init) (unstable-fn "_lambda_52" _f _self _init)) :ruleset egglog.exp.array_api.array_api_ruleset)
(constructor _lambda_53 (egglog.exp.array_api.Int egglog.exp.array_api.Boolean egglog.exp.array_api.Int) egglog.exp.array_api.Boolean)
(rewrite (_lambda_53 _i _acc _j) (egglog_exp_array_api_Boolean___or__ _acc (egglog_exp_array_api_Int___eq__ _i _j)) :subsume :ruleset egglog.exp.array_api.array_api_ruleset)
(constructor egglog_exp_array_api_TupleInt_contains (egglog.exp.array_api.TupleInt egglog.exp.array_api.Int) egglog.exp.array_api.Boolean :unextractable)
(rewrite (egglog_exp_array_api_TupleInt_contains _self _i) (egglog_exp_array_api_TupleInt_foldl_boolean _self (unstable-fn "_lambda_53" _i) (egglog_exp_array_api_Boolean___init__ false)) :ruleset egglog.exp.array_api.array_api_ruleset)
(constructor _lambda_54 (egglog.exp.array_api.TupleInt egglog.exp.array_api.Int) egglog.exp.array_api.TupleInt)
(rewrite (_lambda_54 _acc _v) (egglog_exp_array_api_TupleInt_append _acc _v) :subsume :ruleset egglog.exp.array_api.array_api_ruleset)
(constructor _lambda_55 (egglog.exp.array_api.TupleInt) egglog.exp.array_api.TupleInt)
(rewrite (_lambda_55 _acc) _acc :subsume :ruleset egglog.exp.array_api.array_api_ruleset)
(sort egglog.builtins.UnstableFn[egglog.exp.array_api.Boolean,egglog.exp.array_api.Int] (UnstableFn (egglog.exp.array_api.Int ) egglog.exp.array_api.Boolean))
(constructor _lambda_56 (egglog.builtins.UnstableFn[egglog.exp.array_api.Boolean,egglog.exp.array_api.Int] egglog.exp.array_api.TupleInt egglog.exp.array_api.Int) egglog.exp.array_api.TupleInt)
(rewrite (_lambda_56 _f _acc _v) (egglog_exp_array_api_TupleInt_if_ (unstable-app _f _v) (unstable-fn "_lambda_54" _acc _v) (unstable-fn "_lambda_55" _acc)) :subsume :ruleset egglog.exp.array_api.array_api_ruleset)
(constructor egglog_exp_array_api_TupleInt_filter (egglog.exp.array_api.TupleInt egglog.builtins.UnstableFn[egglog.exp.array_api.Boolean,egglog.exp.array_api.Int]) egglog.exp.array_api.TupleInt :unextractable)
(rewrite (egglog_exp_array_api_TupleInt_filter _self _f) (egglog_exp_array_api_TupleInt_foldl_tuple_int _self (unstable-fn "_lambda_56" _f) (egglog_exp_array_api_TupleInt___init__ (vec-empty ))) :ruleset egglog.exp.array_api.array_api_ruleset)
(constructor _lambda_57 (egglog.exp.array_api.Int egglog.exp.array_api.Int) egglog.exp.array_api.Int)
(constructor egglog_exp_array_api_Int___mul__ (egglog.exp.array_api.Int egglog.exp.array_api.Int) egglog.exp.array_api.Int)
(rewrite (_lambda_57 _acc _i) (egglog_exp_array_api_Int___mul__ _acc _i) :subsume :ruleset egglog.exp.array_api.array_api_ruleset)
(rewrite (egglog_exp_array_api_TupleInt_product _self) (egglog_exp_array_api_TupleInt_foldl _self (unstable-fn "_lambda_57") (egglog_exp_array_api_Int___init__ 1)) :ruleset egglog.exp.array_api.array_api_ruleset)
(constructor _lambda_58 (egglog.exp.array_api.TupleInt egglog.exp.array_api.Int) egglog.exp.array_api.Int)
(rewrite (_lambda_58 _self _i) (egglog_exp_array_api_TupleInt___getitem__ _self _i) :subsume :ruleset egglog.exp.array_api.array_api_ruleset)
(constructor egglog_exp_array_api_TupleInt_select (egglog.exp.array_api.TupleInt egglog.exp.array_api.TupleInt) egglog.exp.array_api.TupleInt :unextractable)
(constructor egglog_exp_array_api_TupleInt_map (egglog.exp.array_api.TupleInt egglog.builtins.UnstableFn[egglog.exp.array_api.Int,egglog.exp.array_api.Int]) egglog.exp.array_api.TupleInt :unextractable)
(rewrite (egglog_exp_array_api_TupleInt_select _self _indices) (egglog_exp_array_api_TupleInt_map _indices (unstable-fn "_lambda_58" _self)) :ruleset egglog.exp.array_api.array_api_ruleset)
(constructor _lambda_59 (egglog.exp.array_api.TupleInt egglog.exp.array_api.Int) egglog.exp.array_api.Boolean)
(constructor egglog_exp_array_api_Boolean___invert__ (egglog.exp.array_api.Boolean) egglog.exp.array_api.Boolean)
(rewrite (_lambda_59 _indices _i) (egglog_exp_array_api_Boolean___invert__ (egglog_exp_array_api_TupleInt_contains _indices _i)) :subsume :ruleset egglog.exp.array_api.array_api_ruleset)
(constructor egglog_exp_array_api_TupleInt_deselect (egglog.exp.array_api.TupleInt egglog.exp.array_api.TupleInt) egglog.exp.array_api.TupleInt :unextractable)
(rewrite (egglog_exp_array_api_TupleInt_deselect _self _indices) (egglog_exp_array_api_TupleInt_map (egglog_exp_array_api_TupleInt_filter (egglog_exp_array_api_TupleInt_range (egglog_exp_array_api_TupleInt_length _self)) (unstable-fn "_lambda_59" _indices)) (unstable-fn "_lambda_58" _self)) :ruleset egglog.exp.array_api.array_api_ruleset)
(constructor _lambda_60 (egglog.exp.array_api.TupleInt egglog.exp.array_api.Int) egglog.exp.array_api.Int)
(rewrite (_lambda_60 _self _i) (egglog_exp_array_api_TupleInt___getitem__ _self (egglog_exp_array_api_Int___sub__ (egglog_exp_array_api_Int___sub__ (egglog_exp_array_api_TupleInt_length _self) _i) (egglog_exp_array_api_Int___init__ 1))) :subsume :ruleset egglog.exp.array_api.array_api_ruleset)
(constructor egglog_exp_array_api_TupleInt_reverse (egglog.exp.array_api.TupleInt) egglog.exp.array_api.TupleInt :unextractable)
(rewrite (egglog_exp_array_api_TupleInt_reverse _self) (egglog_exp_array_api_TupleInt_fn (egglog_exp_array_api_TupleInt_length _self) (unstable-fn "_lambda_60" _self)) :ruleset egglog.exp.array_api.array_api_ruleset)
(constructor _lambda_61 (egglog.builtins.UnstableFn[egglog.exp.array_api.Int,egglog.exp.array_api.Int] egglog.exp.array_api.TupleInt egglog.exp.array_api.Int) egglog.exp.array_api.Int)
(rewrite (_lambda_61 _f _self _i) (unstable-app _f (egglog_exp_array_api_TupleInt___getitem__ _self _i)) :subsume :ruleset egglog.exp.array_api.array_api_ruleset)
(rewrite (egglog_exp_array_api_TupleInt_map _self _f) (egglog_exp_array_api_TupleInt_fn (egglog_exp_array_api_TupleInt_length _self) (unstable-fn "_lambda_61" _f _self)) :ruleset egglog.exp.array_api.array_api_ruleset)
(constructor _lambda_62 (egglog.builtins.UnstableFn[egglog.exp.array_api.TupleInt,egglog.exp.array_api.Int] egglog.exp.array_api.TupleInt egglog.exp.array_api.Int) egglog.exp.array_api.TupleInt)
(rewrite (_lambda_62 _f _self _i) (unstable-app _f (egglog_exp_array_api_TupleInt___getitem__ _self _i)) :subsume :ruleset egglog.exp.array_api.array_api_ruleset)
(constructor egglog_exp_array_api_TupleInt_map_tuple_int (egglog.exp.array_api.TupleInt egglog.builtins.UnstableFn[egglog.exp.array_api.TupleInt,egglog.exp.array_api.Int]) egglog.exp.array_api.TupleTupleInt :unextractable)
(rewrite (egglog_exp_array_api_TupleInt_map_tuple_int _self _f) (egglog_exp_array_api_TupleTupleInt_fn (egglog_exp_array_api_TupleInt_length _self) (unstable-fn "_lambda_62" _f _self)) :ruleset egglog.exp.array_api.array_api_ruleset)
(constructor _lambda_63 (egglog.builtins.UnstableFn[egglog.exp.array_api.Value,egglog.exp.array_api.Int] egglog.exp.array_api.TupleInt egglog.exp.array_api.Int) egglog.exp.array_api.Value)
(rewrite (_lambda_63 _f _self _i) (unstable-app _f (egglog_exp_array_api_TupleInt___getitem__ _self _i)) :subsume :ruleset egglog.exp.array_api.array_api_ruleset)
(constructor egglog_exp_array_api_TupleInt_map_value (egglog.exp.array_api.TupleInt egglog.builtins.UnstableFn[egglog.exp.array_api.Value,egglog.exp.array_api.Int]) egglog.exp.array_api.TupleValue :unextractable)
(rewrite (egglog_exp_array_api_TupleInt_map_value _self _f) (egglog_exp_array_api_TupleValue_fn (egglog_exp_array_api_TupleInt_length _self) (unstable-fn "_lambda_63" _f _self)) :ruleset egglog.exp.array_api.array_api_ruleset)
(sort egglog.exp.array_api_loopnest.LoopNestAPI)
(constructor egglog_exp_array_api_loopnest_LoopNestAPI_indices (egglog.exp.array_api_loopnest.LoopNestAPI) egglog.exp.array_api.TupleTupleInt)
(constructor egglog_exp_array_api_loopnest_LoopNestAPI_get_dims (egglog.exp.array_api_loopnest.LoopNestAPI) egglog.exp.array_api.TupleInt)
(rewrite (egglog_exp_array_api_loopnest_LoopNestAPI_indices _self) (egglog_exp_array_api_TupleTupleInt_product (egglog_exp_array_api_TupleInt_map_tuple_int (egglog_exp_array_api_loopnest_LoopNestAPI_get_dims _self) (unstable-fn "egglog_exp_array_api_TupleInt_range"))) :ruleset egglog.exp.array_api.array_api_ruleset)
(sort egglog.exp.array_api_loopnest.OptionalLoopNestAPI)
(constructor egglog_exp_array_api_loopnest_LoopNestAPI_from_tuple (egglog.exp.array_api.TupleInt) egglog.exp.array_api_loopnest.OptionalLoopNestAPI)
(constructor egglog_exp_array_api_loopnest_OptionalLoopNestAPI_NONE () egglog.exp.array_api_loopnest.OptionalLoopNestAPI)
(rewrite (egglog_exp_array_api_loopnest_LoopNestAPI_from_tuple (egglog_exp_array_api_TupleInt___init__ (vec-empty ))) (egglog_exp_array_api_loopnest_OptionalLoopNestAPI_NONE ) :subsume :ruleset egglog.exp.array_api.array_api_ruleset)
(constructor egglog_exp_array_api_loopnest_OptionalLoopNestAPI___init__ (egglog.exp.array_api_loopnest.LoopNestAPI) egglog.exp.array_api_loopnest.OptionalLoopNestAPI)
(constructor egglog_exp_array_api_loopnest_LoopNestAPI___init__ (egglog.exp.array_api.Int egglog.exp.array_api_loopnest.OptionalLoopNestAPI) egglog.exp.array_api_loopnest.LoopNestAPI)
(rewrite (egglog_exp_array_api_loopnest_LoopNestAPI_from_tuple (egglog_exp_array_api_TupleInt___init__ _vs)) (egglog_exp_array_api_loopnest_OptionalLoopNestAPI___init__ (egglog_exp_array_api_loopnest_LoopNestAPI___init__ (vec-get _vs (- (vec-length _vs) 1)) (egglog_exp_array_api_loopnest_LoopNestAPI_from_tuple (egglog_exp_array_api_TupleInt___init__ (vec-pop _vs))))) :subsume :when ((> (vec-length _vs) 0)) :ruleset egglog.exp.array_api.array_api_ruleset)
(rewrite (egglog_exp_array_api_loopnest_LoopNestAPI_get_dims (egglog_exp_array_api_loopnest_LoopNestAPI___init__ _dim (egglog_exp_array_api_loopnest_OptionalLoopNestAPI_NONE ))) (egglog_exp_array_api_TupleInt___init__ (vec-of _dim)) :subsume :ruleset egglog.exp.array_api.array_api_ruleset)
(rewrite (egglog_exp_array_api_loopnest_LoopNestAPI_get_dims (egglog_exp_array_api_loopnest_LoopNestAPI___init__ _dim (egglog_exp_array_api_loopnest_OptionalLoopNestAPI___init__ _lna))) (egglog_exp_array_api_TupleInt_append (egglog_exp_array_api_loopnest_LoopNestAPI_get_dims _lna) _dim) :subsume :ruleset egglog.exp.array_api.array_api_ruleset)
(constructor egglog_exp_array_api_loopnest_OptionalLoopNestAPI_unwrap (egglog.exp.array_api_loopnest.OptionalLoopNestAPI) egglog.exp.array_api_loopnest.LoopNestAPI)
(rewrite (egglog_exp_array_api_loopnest_OptionalLoopNestAPI_unwrap (egglog_exp_array_api_loopnest_OptionalLoopNestAPI___init__ _lna)) _lna :ruleset egglog.exp.array_api.array_api_ruleset)
(constructor _lambda_64 (egglog.exp.array_api.TupleInt egglog.exp.array_api.Int) egglog.exp.array_api.Boolean)
(rewrite (_lambda_64 _axis _i) (egglog_exp_array_api_Boolean___invert__ (egglog_exp_array_api_TupleInt_contains _axis _i)) :subsume :ruleset egglog.exp.array_api.array_api_ruleset)
(constructor _lambda_65 (egglog.exp.array_api.TupleInt egglog.exp.array_api.Int) egglog.exp.array_api.Int)
(rewrite (_lambda_65 _dims _i) (egglog_exp_array_api_TupleInt___getitem__ _dims _i) :subsume :ruleset egglog.exp.array_api.array_api_ruleset)
(constructor _lambda_66 (egglog.exp.array_api.TupleInt egglog.exp.array_api.Int) egglog.exp.array_api.Boolean)
(rewrite (_lambda_66 _axis _i) (egglog_exp_array_api_TupleInt_contains _axis _i) :subsume :ruleset egglog.exp.array_api.array_api_ruleset)
(sort egglog.exp.array_api_loopnest.ShapeAPI)
(constructor egglog_exp_array_api_loopnest_ShapeAPI_deselect (egglog.exp.array_api_loopnest.ShapeAPI egglog.exp.array_api.TupleInt) egglog.exp.array_api_loopnest.ShapeAPI)
(constructor egglog_exp_array_api_loopnest_ShapeAPI___init__ (egglog.exp.array_api.TupleInt) egglog.exp.array_api_loopnest.ShapeAPI)
(rewrite (egglog_exp_array_api_loopnest_ShapeAPI_deselect (egglog_exp_array_api_loopnest_ShapeAPI___init__ _dims) _axis) (egglog_exp_array_api_loopnest_ShapeAPI___init__ (egglog_exp_array_api_TupleInt_map (egglog_exp_array_api_TupleInt_filter (egglog_exp_array_api_TupleInt_range (egglog_exp_array_api_TupleInt_length _dims)) (unstable-fn "_lambda_64" _axis)) (unstable-fn "_lambda_65" _dims))) :subsume :ruleset egglog.exp.array_api.array_api_ruleset)
(constructor egglog_exp_array_api_loopnest_ShapeAPI_select (egglog.exp.array_api_loopnest.ShapeAPI egglog.exp.array_api.TupleInt) egglog.exp.array_api_loopnest.ShapeAPI)
(rewrite (egglog_exp_array_api_loopnest_ShapeAPI_select (egglog_exp_array_api_loopnest_ShapeAPI___init__ _dims) _axis) (egglog_exp_array_api_loopnest_ShapeAPI___init__ (egglog_exp_array_api_TupleInt_map (egglog_exp_array_api_TupleInt_filter (egglog_exp_array_api_TupleInt_range (egglog_exp_array_api_TupleInt_length _dims)) (unstable-fn "_lambda_66" _axis)) (unstable-fn "_lambda_65" _dims))) :subsume :ruleset egglog.exp.array_api.array_api_ruleset)
(constructor egglog_exp_array_api_loopnest_ShapeAPI_to_tuple (egglog.exp.array_api_loopnest.ShapeAPI) egglog.exp.array_api.TupleInt)
(rewrite (egglog_exp_array_api_loopnest_ShapeAPI_to_tuple (egglog_exp_array_api_loopnest_ShapeAPI___init__ _dims)) _dims :subsume :ruleset egglog.exp.array_api.array_api_ruleset)
(constructor egglog_exp_array_api_NDArray_size (egglog.exp.array_api.NDArray) egglog.exp.array_api.Int)
(rewrite (egglog_exp_array_api_NDArray_size _x) (egglog_exp_array_api_TupleInt_foldl (egglog_exp_array_api_NDArray_shape _x) (unstable-fn "egglog_exp_array_api_Int___mul__") (egglog_exp_array_api_Int___init__ 1)) :ruleset egglog.exp.array_api.array_api_ruleset)
(constructor egglog_exp_array_api_unique_values (egglog.exp.array_api.NDArray) egglog.exp.array_api.NDArray)
(constructor egglog_exp_array_api_possible_values (egglog.exp.array_api.Value) egglog.exp.array_api.TupleValue)
(constructor %egglog_thunk_ALL_INDICES () egglog.exp.array_api.TupleInt)
(rewrite (egglog_exp_array_api_unique_values _a) (egglog_exp_array_api_NDArray_from_tuple_value (egglog_exp_array_api_possible_values (egglog_exp_array_api_NDArray_index _a (%egglog_thunk_ALL_INDICES )))) :ruleset egglog.exp.array_api.array_api_ruleset)
(constructor egglog_exp_array_api_Value_isfinite (egglog.exp.array_api.Value) egglog.exp.array_api.Boolean)
(rewrite (egglog_exp_array_api_Value_isfinite (egglog_exp_array_api_Value_from_int _i)) (egglog_exp_array_api_Boolean___init__ true) :ruleset egglog.exp.array_api.array_api_ruleset)
(constructor egglog_exp_array_api_Value_from_bool (egglog.exp.array_api.Boolean) egglog.exp.array_api.Value)
(rewrite (egglog_exp_array_api_Value_isfinite (egglog_exp_array_api_Value_from_bool _b)) (egglog_exp_array_api_Boolean___init__ true) :ruleset egglog.exp.array_api.array_api_ruleset)
(sort egglog.exp.array_api.Float)
(constructor egglog_exp_array_api_Value_from_float (egglog.exp.array_api.Float) egglog.exp.array_api.Value)
(constructor egglog_exp_array_api_Float___init__ (f64) egglog.exp.array_api.Float :cost 3)
(rewrite (egglog_exp_array_api_Value_isfinite (egglog_exp_array_api_Value_from_float (egglog_exp_array_api_Float___init__ _f))) (egglog_exp_array_api_Boolean___init__ true) :when ((!= _f NaN)) :ruleset egglog.exp.array_api.array_api_ruleset)
(constructor egglog_exp_array_api_isfinite (egglog.exp.array_api.NDArray) egglog.exp.array_api.NDArray)
(sort egglog.exp.array_api.OptionalIntOrTuple)
(constructor egglog_exp_array_api_sum (egglog.exp.array_api.NDArray egglog.exp.array_api.OptionalIntOrTuple) egglog.exp.array_api.NDArray)
(constructor egglog_exp_array_api_OptionalIntOrTuple_none () egglog.exp.array_api.OptionalIntOrTuple)
(rewrite (egglog_exp_array_api_isfinite (egglog_exp_array_api_sum _arr (egglog_exp_array_api_OptionalIntOrTuple_none ))) (egglog_exp_array_api_NDArray___init__ (egglog_exp_array_api_RecursiveValue___init__ (egglog_exp_array_api_Value_from_bool (egglog_exp_array_api_Value_isfinite (egglog_exp_array_api_NDArray_index _arr (%egglog_thunk_ALL_INDICES )))))) :ruleset egglog.exp.array_api.array_api_ruleset)
(constructor egglog_exp_array_api_assume_value_one_of (egglog.exp.array_api.NDArray egglog.exp.array_api.TupleValue) egglog.exp.array_api.NDArray)
(rewrite (egglog_exp_array_api_NDArray_shape (egglog_exp_array_api_assume_value_one_of _x _vs)) (egglog_exp_array_api_NDArray_shape _x) :ruleset egglog.exp.array_api.array_api_ruleset)
(rewrite (egglog_exp_array_api_NDArray_dtype (egglog_exp_array_api_assume_value_one_of _x _vs)) (egglog_exp_array_api_NDArray_dtype _x) :ruleset egglog.exp.array_api.array_api_ruleset)
(rule ((= _v (egglog_exp_array_api_NDArray_index (egglog_exp_array_api_assume_value_one_of _x _vs) _idx)))
((union _v (egglog_exp_array_api_NDArray_index _x _idx))
(union (egglog_exp_array_api_possible_values _v) _vs))
:ruleset egglog.exp.array_api.array_api_ruleset )
(rewrite (egglog_exp_array_api_NDArray_shape (egglog_exp_array_api_assume_isfinite _x)) (egglog_exp_array_api_NDArray_shape _x) :ruleset egglog.exp.array_api.array_api_ruleset)
(rewrite (egglog_exp_array_api_NDArray_dtype (egglog_exp_array_api_assume_isfinite _x)) (egglog_exp_array_api_NDArray_dtype _x) :ruleset egglog.exp.array_api.array_api_ruleset)
(rewrite (egglog_exp_array_api_NDArray_index (egglog_exp_array_api_assume_isfinite _x) _ti) (egglog_exp_array_api_NDArray_index _x _ti) :ruleset egglog.exp.array_api.array_api_ruleset)
(rewrite (egglog_exp_array_api_Value_isfinite (egglog_exp_array_api_NDArray_index (egglog_exp_array_api_assume_isfinite _x) _ti)) (egglog_exp_array_api_Boolean___init__ true) :ruleset egglog.exp.array_api.array_api_ruleset)
(rewrite (egglog_exp_array_api_NDArray_shape (egglog_exp_array_api_assume_shape _x _shape)) _shape :ruleset egglog.exp.array_api.array_api_ruleset)
(rewrite (egglog_exp_array_api_NDArray_dtype (egglog_exp_array_api_assume_shape _x _shape)) (egglog_exp_array_api_NDArray_dtype _x) :ruleset egglog.exp.array_api.array_api_ruleset)
(rewrite (egglog_exp_array_api_NDArray_index (egglog_exp_array_api_assume_shape _x _shape) _idx) (egglog_exp_array_api_NDArray_index _x _idx) :ruleset egglog.exp.array_api.array_api_ruleset)
(rewrite (egglog_exp_array_api_NDArray_dtype (egglog_exp_array_api_assume_dtype _x _dtype)) _dtype :ruleset egglog.exp.array_api.array_api_ruleset)
(rewrite (egglog_exp_array_api_NDArray_shape (egglog_exp_array_api_assume_dtype _x _dtype)) (egglog_exp_array_api_NDArray_shape _x) :ruleset egglog.exp.array_api.array_api_ruleset)
(rewrite (egglog_exp_array_api_NDArray_index (egglog_exp_array_api_assume_dtype _x _dtype) _idx) (egglog_exp_array_api_NDArray_index _x _idx) :ruleset egglog.exp.array_api.array_api_ruleset)
(sort egglog.exp.array_api.IndexKey)
(constructor egglog_exp_array_api_NDArray___getitem__ (egglog.exp.array_api.NDArray egglog.exp.array_api.IndexKey) egglog.exp.array_api.NDArray)
(constructor egglog_exp_array_api_IndexKey_int (egglog.exp.array_api.Int) egglog.exp.array_api.IndexKey)
(rewrite (egglog_exp_array_api_NDArray___getitem__ _x (egglog_exp_array_api_IndexKey_int _i)) (egglog_exp_array_api_NDArray___init__ (egglog_exp_array_api_RecursiveValue___init__ (egglog_exp_array_api_NDArray_index _x (egglog_exp_array_api_TupleInt___init__ (vec-of _i))))) :ruleset egglog.exp.array_api.array_api_ruleset)
(constructor egglog_exp_array_api_any (egglog.exp.array_api.NDArray) egglog.exp.array_api.NDArray)
(constructor egglog_exp_array_api_Value_to_truthy_value (egglog.exp.array_api.Value) egglog.exp.array_api.Value)
(rewrite (egglog_exp_array_api_any _x) (egglog_exp_array_api_NDArray___init__ (egglog_exp_array_api_RecursiveValue___init__ (egglog_exp_array_api_Value_from_bool (egglog_exp_array_api_TupleValue_contains (egglog_exp_array_api_possible_values (egglog_exp_array_api_Value_to_truthy_value (egglog_exp_array_api_NDArray_index _x (%egglog_thunk_ALL_INDICES )))) (egglog_exp_array_api_Value_from_bool (egglog_exp_array_api_Boolean___init__ true)))))) :ruleset egglog.exp.array_api.array_api_ruleset)
(constructor egglog_exp_array_api_NDArray___lt__ (egglog.exp.array_api.NDArray egglog.exp.array_api.NDArray) egglog.exp.array_api.NDArray)
(constructor egglog_exp_array_api_Value___lt__ (egglog.exp.array_api.Value egglog.exp.array_api.Value) egglog.exp.array_api.Value)
(constructor egglog_exp_array_api_broadcast_index (egglog.exp.array_api.TupleInt egglog.exp.array_api.TupleInt egglog.exp.array_api.TupleInt) egglog.exp.array_api.TupleInt)
(constructor egglog_exp_array_api_broadcast_shapes (egglog.exp.array_api.TupleInt egglog.exp.array_api.TupleInt) egglog.exp.array_api.TupleInt)
(rewrite (egglog_exp_array_api_NDArray_index (egglog_exp_array_api_NDArray___lt__ _x _y) _idx) (egglog_exp_array_api_Value___lt__ (egglog_exp_array_api_NDArray_index _x (egglog_exp_array_api_broadcast_index (egglog_exp_array_api_NDArray_shape _x) (egglog_exp_array_api_broadcast_shapes (egglog_exp_array_api_NDArray_shape _x) (egglog_exp_array_api_NDArray_shape _y)) _idx)) (egglog_exp_array_api_NDArray_index _y (egglog_exp_array_api_broadcast_index (egglog_exp_array_api_NDArray_shape _y) (egglog_exp_array_api_broadcast_shapes (egglog_exp_array_api_NDArray_shape _x) (egglog_exp_array_api_NDArray_shape _y)) _idx))) :ruleset egglog.exp.array_api.array_api_ruleset)
(constructor egglog_exp_array_api_NDArray___truediv__ (egglog.exp.array_api.NDArray egglog.exp.array_api.NDArray) egglog.exp.array_api.NDArray)
(constructor egglog_exp_array_api_Value___truediv__ (egglog.exp.array_api.Value egglog.exp.array_api.Value) egglog.exp.array_api.Value)
(rewrite (egglog_exp_array_api_NDArray_index (egglog_exp_array_api_NDArray___truediv__ _x _y) _idx) (egglog_exp_array_api_Value___truediv__ (egglog_exp_array_api_NDArray_index _x (egglog_exp_array_api_broadcast_index (egglog_exp_array_api_NDArray_shape _x) (egglog_exp_array_api_broadcast_shapes (egglog_exp_array_api_NDArray_shape _x) (egglog_exp_array_api_NDArray_shape _y)) _idx)) (egglog_exp_array_api_NDArray_index _y (egglog_exp_array_api_broadcast_index (egglog_exp_array_api_NDArray_shape _y) (egglog_exp_array_api_broadcast_shapes (egglog_exp_array_api_NDArray_shape _x) (egglog_exp_array_api_NDArray_shape _y)) _idx))) :ruleset egglog.exp.array_api.array_api_ruleset)
(rewrite (egglog_exp_array_api_NDArray_index (egglog_exp_array_api_NDArray___init__ (egglog_exp_array_api_RecursiveValue___init__ _v)) _idx) _v :ruleset egglog.exp.array_api.array_api_ruleset)
(constructor egglog_exp_array_api_astype (egglog.exp.array_api.NDArray egglog.exp.array_api.DType) egglog.exp.array_api.NDArray)
(constructor egglog_exp_array_api_Value_astype (egglog.exp.array_api.Value egglog.exp.array_api.DType) egglog.exp.array_api.Value)
(rewrite (egglog_exp_array_api_NDArray_index (egglog_exp_array_api_astype _x _dtype) _idx) (egglog_exp_array_api_Value_astype (egglog_exp_array_api_NDArray_index _x _idx) _dtype) :ruleset egglog.exp.array_api.array_api_ruleset)
(relation egglog_exp_array_api_greater_zero (egglog.exp.array_api.Value))
(constructor egglog_exp_array_api_unique_counts_counts (egglog.exp.array_api.NDArray) egglog.exp.array_api.NDArray)
(rule ((= _v (egglog_exp_array_api_NDArray_index (egglog_exp_array_api_unique_counts_counts _x) _idx)))
((egglog_exp_array_api_greater_zero _v))
:ruleset egglog.exp.array_api.array_api_ruleset )
(rule ((egglog_exp_array_api_greater_zero _v)
(= _v1 (egglog_exp_array_api_Value_astype _v _dtype)))
((egglog_exp_array_api_greater_zero _v1))
:ruleset egglog.exp.array_api.array_api_ruleset )
(rule ((= _v (egglog_exp_array_api_Value_from_float (egglog_exp_array_api_Float___init__ _f)))
(> _f 0.0))
((egglog_exp_array_api_greater_zero _v))
:ruleset egglog.exp.array_api.array_api_ruleset )
(rule ((= _v (egglog_exp_array_api_Value_from_int (egglog_exp_array_api_Int___init__ _i)))
(> _i 0))
((egglog_exp_array_api_greater_zero _v))
:ruleset egglog.exp.array_api.array_api_ruleset )
(rule ((egglog_exp_array_api_greater_zero _v)
(egglog_exp_array_api_greater_zero _v1)
(= _v2 (egglog_exp_array_api_Value___truediv__ _v _v1)))
((egglog_exp_array_api_greater_zero _v2))
:ruleset egglog.exp.array_api.array_api_ruleset )
(rule ((egglog_exp_array_api_greater_zero _v)
(= _v1 (egglog_exp_array_api_Value___lt__ _v (egglog_exp_array_api_Value_from_int (egglog_exp_array_api_Int___init__ 0)))))
((union _v1 (egglog_exp_array_api_Value_from_bool (egglog_exp_array_api_Boolean___init__ false))))
:ruleset egglog.exp.array_api.array_api_ruleset )
(sort egglog.builtins.Vec[egglog.exp.array_api.Value] (Vec egglog.exp.array_api.Value))
(constructor egglog_exp_array_api_TupleValue___init__ (egglog.builtins.Vec[egglog.exp.array_api.Value]) egglog.exp.array_api.TupleValue)
(rewrite (egglog_exp_array_api_possible_values (egglog_exp_array_api_Value_from_bool _b)) (egglog_exp_array_api_TupleValue___init__ (vec-of (egglog_exp_array_api_Value_from_bool _b))) :ruleset egglog.exp.array_api.array_api_ruleset)
(rule ((= _v1 (egglog_exp_array_api_Value_astype _v _dtype))
(egglog_exp_array_api_greater_zero _v))
((egglog_exp_array_api_greater_zero _v1))
:ruleset egglog.exp.array_api.array_api_ruleset )
(rewrite (egglog_exp_array_api_NDArray___getitem__ (egglog_exp_array_api_unique_values _x) (egglog_exp_array_api_IndexKey_int (egglog_exp_array_api_Int___init__ 0))) (egglog_exp_array_api_unique_values _x) :ruleset egglog.exp.array_api.array_api_ruleset)
(constructor ndarray-abs (egglog.exp.array_api.NDArray) egglog.exp.array_api.NDArray)
(constructor egglog_exp_array_api_Float_abs (egglog.exp.array_api.Float) egglog.exp.array_api.Float)
(rewrite (ndarray-abs (egglog_exp_array_api_NDArray___init__ (egglog_exp_array_api_RecursiveValue___init__ (egglog_exp_array_api_Value_from_float _f)))) (egglog_exp_array_api_NDArray___init__ (egglog_exp_array_api_RecursiveValue___init__ (egglog_exp_array_api_Value_from_float (egglog_exp_array_api_Float_abs _f)))) :ruleset egglog.exp.array_api.array_api_ruleset)
(rewrite (egglog_exp_array_api_sum (egglog_exp_array_api_unique_counts_counts _x) (egglog_exp_array_api_OptionalIntOrTuple_none )) (egglog_exp_array_api_NDArray___init__ (egglog_exp_array_api_RecursiveValue___init__ (egglog_exp_array_api_Value_from_int (egglog_exp_array_api_NDArray_size _x)))) :ruleset egglog.exp.array_api.array_api_ruleset)
(rewrite (egglog_exp_array_api_sum (egglog_exp_array_api_astype (egglog_exp_array_api_unique_counts_counts _x) _dtype) (egglog_exp_array_api_OptionalIntOrTuple_none )) (egglog_exp_array_api_astype (egglog_exp_array_api_NDArray___init__ (egglog_exp_array_api_RecursiveValue___init__ (egglog_exp_array_api_Value_from_int (egglog_exp_array_api_NDArray_size _x)))) _dtype) :ruleset egglog.exp.array_api.array_api_ruleset)
(rewrite (egglog_exp_array_api_NDArray_dtype (egglog_exp_array_api_astype _x _dtype)) _dtype :ruleset egglog.exp.array_api.array_api_ruleset)
(rewrite (egglog_exp_array_api_astype (egglog_exp_array_api_NDArray___init__ (egglog_exp_array_api_RecursiveValue___init__ (egglog_exp_array_api_Value_from_int (egglog_exp_array_api_Int___init__ _i)))) $__expr_1) (egglog_exp_array_api_NDArray___init__ (egglog_exp_array_api_RecursiveValue___init__ (egglog_exp_array_api_Value_from_float (egglog_exp_array_api_Float___init__ (to-f64 _i))))) :ruleset egglog.exp.array_api.array_api_ruleset)
(sort egglog.exp.array_api.OptionalInt)
(constructor egglog_exp_array_api_concat (egglog.exp.array_api.TupleNDArray egglog.exp.array_api.OptionalInt) egglog.exp.array_api.NDArray)
(sort egglog.builtins.Vec[egglog.exp.array_api.NDArray] (Vec egglog.exp.array_api.NDArray))
(constructor egglog_exp_array_api_TupleNDArray___init__ (egglog.builtins.Vec[egglog.exp.array_api.NDArray]) egglog.exp.array_api.TupleNDArray)
(constructor egglog_exp_array_api_OptionalInt_none () egglog.exp.array_api.OptionalInt)
(rewrite (egglog_exp_array_api_concat (egglog_exp_array_api_TupleNDArray___init__ _vs) (egglog_exp_array_api_OptionalInt_none )) (vec-get _vs 0) :when ((= (vec-length _vs) 1)) :ruleset egglog.exp.array_api.array_api_ruleset)
(rewrite (egglog_exp_array_api_unique_values (egglog_exp_array_api_unique_values _x)) (egglog_exp_array_api_unique_values _x) :ruleset egglog.exp.array_api.array_api_ruleset)
(rewrite (egglog_exp_array_api_sum (egglog_exp_array_api_NDArray___truediv__ _x (egglog_exp_array_api_NDArray___init__ (egglog_exp_array_api_RecursiveValue___init__ _v))) (egglog_exp_array_api_OptionalIntOrTuple_none )) (egglog_exp_array_api_NDArray___truediv__ (egglog_exp_array_api_sum _x (egglog_exp_array_api_OptionalIntOrTuple_none )) (egglog_exp_array_api_NDArray___init__ (egglog_exp_array_api_RecursiveValue___init__ _v))) :ruleset egglog.exp.array_api.array_api_ruleset)
(sort egglog.exp.array_api.OptionalDType)
(sort egglog.exp.array_api.OptionalBool)
(sort egglog.exp.array_api.OptionalDevice)
(constructor egglog_exp_array_api_asarray (egglog.exp.array_api.NDArray egglog.exp.array_api.OptionalDType egglog.exp.array_api.OptionalBool egglog.exp.array_api.OptionalDevice) egglog.exp.array_api.NDArray)
(constructor egglog_exp_array_api_OptionalDevice_none () egglog.exp.array_api.OptionalDevice)
(rewrite (egglog_exp_array_api_NDArray_ndim (egglog_exp_array_api_asarray _a _d _ob (egglog_exp_array_api_OptionalDevice_none ))) (egglog_exp_array_api_NDArray_ndim _a) :ruleset egglog.exp.array_api.array_api_ruleset)
(constructor egglog_exp_array_api_OptionalDType_none () egglog.exp.array_api.OptionalDType)
(constructor egglog_exp_array_api_OptionalBool_none () egglog.exp.array_api.OptionalBool)
(rewrite (egglog_exp_array_api_asarray _a (egglog_exp_array_api_OptionalDType_none ) (egglog_exp_array_api_OptionalBool_none ) (egglog_exp_array_api_OptionalDevice_none )) _a :ruleset egglog.exp.array_api.array_api_ruleset)
(constructor _lambda_67 (egglog.exp.array_api.Int) egglog.exp.array_api.Int)
(rewrite (_lambda_67 _idx) _idx :subsume :ruleset egglog.exp.array_api.array_api_ruleset)
(constructor _lambda_68 () egglog.exp.array_api.Int)
(constructor egglog_exp_array_api_Int_NEVER () egglog.exp.array_api.Int)
(rewrite (_lambda_68 ) (egglog_exp_array_api_Int_NEVER ) :subsume :ruleset egglog.exp.array_api.array_api_ruleset)
(constructor egglog_exp_array_api_check_index (egglog.exp.array_api.Int egglog.exp.array_api.Int) egglog.exp.array_api.Int)
(constructor egglog_exp_array_api_Int___ge__ (egglog.exp.array_api.Int egglog.exp.array_api.Int) egglog.exp.array_api.Boolean)
(rewrite (egglog_exp_array_api_check_index _length _idx) (egglog_exp_array_api_Int_if_ (egglog_exp_array_api_Boolean___and__ (egglog_exp_array_api_Int___ge__ _idx (egglog_exp_array_api_Int___init__ 0)) (egglog_exp_array_api_Int___lt__ _idx _length)) (unstable-fn "_lambda_67" _idx) (unstable-fn "_lambda_68")) :ruleset egglog.exp.array_api.array_api_ruleset)
(constructor _lambda_69 (egglog.builtins.UnstableFn[egglog.exp.array_api.NDArray,egglog.exp.array_api.Int] i64) egglog.exp.array_api.NDArray)
(rewrite (_lambda_69 _idx_fn _i) (unstable-app _idx_fn (egglog_exp_array_api_Int___init__ _i)) :subsume :ruleset egglog.exp.array_api.array_api_ruleset)
(rule ((= _ti (egglog_exp_array_api_TupleNDArray___init__ _vs))
(= _ti (egglog_exp_array_api_TupleNDArray___init__ _vs2))
(!= _vs _vs2))
((vec-union _vs _vs2))
:ruleset egglog.exp.array_api.array_api_ruleset )
(rewrite (egglog_exp_array_api_TupleNDArray_length (egglog_exp_array_api_TupleNDArray_fn _i2 _idx_fn)) _i2 :ruleset egglog.exp.array_api.array_api_ruleset)
(rewrite (egglog_exp_array_api_TupleNDArray___getitem__ (egglog_exp_array_api_TupleNDArray_fn _i2 _idx_fn) _i) (unstable-app _idx_fn (egglog_exp_array_api_check_index _i2 _i)) :subsume :ruleset egglog.exp.array_api.array_api_ruleset)
(rewrite (egglog_exp_array_api_TupleNDArray_length (egglog_exp_array_api_TupleNDArray___init__ _vs)) (egglog_exp_array_api_Int___init__ (vec-length _vs)) :ruleset egglog.exp.array_api.array_api_ruleset)
(rewrite (egglog_exp_array_api_TupleNDArray___getitem__ (egglog_exp_array_api_TupleNDArray___init__ _vs) (egglog_exp_array_api_Int___init__ _k)) (vec-get _vs _k) :when ((>= _k 0) (< _k (vec-length _vs))) :ruleset egglog.exp.array_api.array_api_ruleset)
(sort egglog.builtins.UnstableFn[egglog.exp.array_api.NDArray,egglog.builtins.i64] (UnstableFn (i64 ) egglog.exp.array_api.NDArray))
(sort egglog.builtins.Vec[egglog.builtins.i64] (Vec i64))
(rewrite (egglog_exp_array_api_TupleNDArray_fn (egglog_exp_array_api_Int___init__ _k) _idx_fn) (egglog_exp_array_api_TupleNDArray___init__ (unstable-vec-map (unstable-fn "_lambda_69" _idx_fn) (vec-range _k))) :subsume :when ((>= _k 0)) :ruleset egglog.exp.array_api.array_api_ruleset)
(rewrite (egglog_exp_array_api_NDArray_shape (egglog_exp_array_api_NDArray_fn _shape _dtype _idx_fn)) _shape :ruleset egglog.exp.array_api.array_api_ruleset)
(rewrite (egglog_exp_array_api_NDArray_dtype (egglog_exp_array_api_NDArray_fn _shape _dtype _idx_fn)) _dtype :ruleset egglog.exp.array_api.array_api_ruleset)
(rewrite (egglog_exp_array_api_NDArray_index (egglog_exp_array_api_NDArray_fn _shape _dtype _idx_fn) _idx) (unstable-app _idx_fn _idx) :subsume :ruleset egglog.exp.array_api.array_api_ruleset)
(constructor egglog_exp_array_api_RecursiveValue_shape (egglog.exp.array_api.RecursiveValue) egglog.exp.array_api.TupleInt)
(rewrite (egglog_exp_array_api_NDArray_shape (egglog_exp_array_api_NDArray___init__ _rv)) (egglog_exp_array_api_RecursiveValue_shape _rv) :ruleset egglog.exp.array_api.array_api_ruleset)
(constructor egglog_exp_array_api_RecursiveValue___getitem__ (egglog.exp.array_api.RecursiveValue egglog.builtins.Vec[egglog.exp.array_api.Int]) egglog.exp.array_api.Value)
(rewrite (egglog_exp_array_api_NDArray_index (egglog_exp_array_api_NDArray___init__ _rv) (egglog_exp_array_api_TupleInt___init__ _vi)) (egglog_exp_array_api_RecursiveValue___getitem__ _rv _vi) :ruleset egglog.exp.array_api.array_api_ruleset)
(rewrite (egglog_exp_array_api_NDArray___truediv__ (egglog_exp_array_api_NDArray___init__ (egglog_exp_array_api_RecursiveValue___init__ _v)) (egglog_exp_array_api_NDArray___init__ (egglog_exp_array_api_RecursiveValue___init__ _v1))) (egglog_exp_array_api_NDArray___init__ (egglog_exp_array_api_RecursiveValue___init__ (egglog_exp_array_api_Value___truediv__ _v _v1))) :ruleset egglog.exp.array_api.array_api_ruleset)
(constructor egglog_exp_array_api_NDArray___add__ (egglog.exp.array_api.NDArray egglog.exp.array_api.NDArray) egglog.exp.array_api.NDArray)
(constructor egglog_exp_array_api_Value___add__ (egglog.exp.array_api.Value egglog.exp.array_api.Value) egglog.exp.array_api.Value)
(rewrite (egglog_exp_array_api_NDArray___add__ (egglog_exp_array_api_NDArray___init__ (egglog_exp_array_api_RecursiveValue___init__ _v)) (egglog_exp_array_api_NDArray___init__ (egglog_exp_array_api_RecursiveValue___init__ _v1))) (egglog_exp_array_api_NDArray___init__ (egglog_exp_array_api_RecursiveValue___init__ (egglog_exp_array_api_Value___add__ _v _v1))) :ruleset egglog.exp.array_api.array_api_ruleset)
(constructor egglog_exp_array_api_NDArray___mul__ (egglog.exp.array_api.NDArray egglog.exp.array_api.NDArray) egglog.exp.array_api.NDArray)
(constructor egglog_exp_array_api_Value___mul__ (egglog.exp.array_api.Value egglog.exp.array_api.Value) egglog.exp.array_api.Value)
(rewrite (egglog_exp_array_api_NDArray___mul__ (egglog_exp_array_api_NDArray___init__ (egglog_exp_array_api_RecursiveValue___init__ _v)) (egglog_exp_array_api_NDArray___init__ (egglog_exp_array_api_RecursiveValue___init__ _v1))) (egglog_exp_array_api_NDArray___init__ (egglog_exp_array_api_RecursiveValue___init__ (egglog_exp_array_api_Value___mul__ _v _v1))) :ruleset egglog.exp.array_api.array_api_ruleset)
(constructor egglog_exp_array_api_NDArray___pow__ (egglog.exp.array_api.NDArray egglog.exp.array_api.NDArray) egglog.exp.array_api.NDArray)
(constructor egglog_exp_array_api_Value___pow__ (egglog.exp.array_api.Value egglog.exp.array_api.Value) egglog.exp.array_api.Value)
(rewrite (egglog_exp_array_api_NDArray___pow__ (egglog_exp_array_api_NDArray___init__ (egglog_exp_array_api_RecursiveValue___init__ _v)) (egglog_exp_array_api_NDArray___init__ (egglog_exp_array_api_RecursiveValue___init__ _v1))) (egglog_exp_array_api_NDArray___init__ (egglog_exp_array_api_RecursiveValue___init__ (egglog_exp_array_api_Value___pow__ _v _v1))) :ruleset egglog.exp.array_api.array_api_ruleset)
(constructor egglog_exp_array_api_NDArray___sub__ (egglog.exp.array_api.NDArray egglog.exp.array_api.NDArray) egglog.exp.array_api.NDArray)
(constructor egglog_exp_array_api_Value___sub__ (egglog.exp.array_api.Value egglog.exp.array_api.Value) egglog.exp.array_api.Value)
(rewrite (egglog_exp_array_api_NDArray___sub__ (egglog_exp_array_api_NDArray___init__ (egglog_exp_array_api_RecursiveValue___init__ _v)) (egglog_exp_array_api_NDArray___init__ (egglog_exp_array_api_RecursiveValue___init__ _v1))) (egglog_exp_array_api_NDArray___init__ (egglog_exp_array_api_RecursiveValue___init__ (egglog_exp_array_api_Value___sub__ _v _v1))) :ruleset egglog.exp.array_api.array_api_ruleset)
(rewrite (egglog_exp_array_api_NDArray___lt__ (egglog_exp_array_api_NDArray___init__ (egglog_exp_array_api_RecursiveValue___init__ _v)) (egglog_exp_array_api_NDArray___init__ (egglog_exp_array_api_RecursiveValue___init__ _v1))) (egglog_exp_array_api_NDArray___init__ (egglog_exp_array_api_RecursiveValue___init__ (egglog_exp_array_api_Value___lt__ _v _v1))) :ruleset egglog.exp.array_api.array_api_ruleset)
(constructor egglog_exp_array_api_NDArray___le__ (egglog.exp.array_api.NDArray egglog.exp.array_api.NDArray) egglog.exp.array_api.NDArray)
(constructor egglog_exp_array_api_Value___le__ (egglog.exp.array_api.Value egglog.exp.array_api.Value) egglog.exp.array_api.Boolean)
(rewrite (egglog_exp_array_api_NDArray___le__ (egglog_exp_array_api_NDArray___init__ (egglog_exp_array_api_RecursiveValue___init__ _v)) (egglog_exp_array_api_NDArray___init__ (egglog_exp_array_api_RecursiveValue___init__ _v1))) (egglog_exp_array_api_NDArray___init__ (egglog_exp_array_api_RecursiveValue___init__ (egglog_exp_array_api_Value_from_bool (egglog_exp_array_api_Value___le__ _v _v1)))) :ruleset egglog.exp.array_api.array_api_ruleset)
(constructor egglog_exp_array_api_NDArray___eq__ (egglog.exp.array_api.NDArray egglog.exp.array_api.NDArray) egglog.exp.array_api.NDArray)
(rewrite (egglog_exp_array_api_NDArray___eq__ (egglog_exp_array_api_NDArray___init__ (egglog_exp_array_api_RecursiveValue___init__ _v)) (egglog_exp_array_api_NDArray___init__ (egglog_exp_array_api_RecursiveValue___init__ _v1))) (egglog_exp_array_api_NDArray___init__ (egglog_exp_array_api_RecursiveValue___init__ (egglog_exp_array_api_Value_from_bool (egglog_exp_array_api_Value___eq__ _v _v1)))) :ruleset egglog.exp.array_api.array_api_ruleset)
(constructor egglog_exp_array_api_NDArray___gt__ (egglog.exp.array_api.NDArray egglog.exp.array_api.NDArray) egglog.exp.array_api.NDArray)
(constructor egglog_exp_array_api_Value___gt__ (egglog.exp.array_api.Value egglog.exp.array_api.Value) egglog.exp.array_api.Boolean)
(rewrite (egglog_exp_array_api_NDArray___gt__ (egglog_exp_array_api_NDArray___init__ (egglog_exp_array_api_RecursiveValue___init__ _v)) (egglog_exp_array_api_NDArray___init__ (egglog_exp_array_api_RecursiveValue___init__ _v1))) (egglog_exp_array_api_NDArray___init__ (egglog_exp_array_api_RecursiveValue___init__ (egglog_exp_array_api_Value_from_bool (egglog_exp_array_api_Value___gt__ _v _v1)))) :ruleset egglog.exp.array_api.array_api_ruleset)
(constructor egglog_exp_array_api_NDArray___ge__ (egglog.exp.array_api.NDArray egglog.exp.array_api.NDArray) egglog.exp.array_api.NDArray)
(constructor egglog_exp_array_api_Value___ge__ (egglog.exp.array_api.Value egglog.exp.array_api.Value) egglog.exp.array_api.Boolean)
(rewrite (egglog_exp_array_api_NDArray___ge__ (egglog_exp_array_api_NDArray___init__ (egglog_exp_array_api_RecursiveValue___init__ _v)) (egglog_exp_array_api_NDArray___init__ (egglog_exp_array_api_RecursiveValue___init__ _v1))) (egglog_exp_array_api_NDArray___init__ (egglog_exp_array_api_RecursiveValue___init__ (egglog_exp_array_api_Value_from_bool (egglog_exp_array_api_Value___ge__ _v _v1)))) :ruleset egglog.exp.array_api.array_api_ruleset)
(rewrite (egglog_exp_array_api_NDArray_T (egglog_exp_array_api_NDArray_T _x)) _x :ruleset egglog.exp.array_api.array_api_ruleset)
(rewrite (egglog_exp_array_api_NDArray_if_ (egglog_exp_array_api_Boolean___init__ true) _xt _x1t) (unstable-app _xt) :subsume :ruleset egglog.exp.array_api.array_api_ruleset)
(rewrite (egglog_exp_array_api_NDArray_if_ (egglog_exp_array_api_Boolean___init__ false) _xt _x1t) (unstable-app _x1t) :subsume :ruleset egglog.exp.array_api.array_api_ruleset)
(rule ((= _x (egglog_exp_array_api_NDArray_fn (egglog_exp_array_api_TupleInt___init__ _vi) _dtype _idx_fn)))
((egglog_exp_array_api_TupleInt_product (egglog_exp_array_api_TupleInt___init__ _vi)))
:ruleset egglog.exp.array_api.array_api_ruleset )
(constructor egglog_exp_array_api_RecursiveValue_from_index_and_shape (egglog.builtins.Vec[egglog.exp.array_api.Int] egglog.builtins.UnstableFn[egglog.exp.array_api.Value,egglog.exp.array_api.TupleInt]) egglog.exp.array_api.RecursiveValue)
(rule ((= _x (egglog_exp_array_api_NDArray_fn (egglog_exp_array_api_TupleInt___init__ _vi) _dtype _idx_fn))
(= (egglog_exp_array_api_TupleInt_product (egglog_exp_array_api_TupleInt___init__ _vi)) (egglog_exp_array_api_Int___init__ _i))
(<= _i 20))
((union _x (egglog_exp_array_api_NDArray___init__ (egglog_exp_array_api_RecursiveValue_from_index_and_shape _vi _idx_fn)))
(subsume (egglog_exp_array_api_NDArray_fn (egglog_exp_array_api_TupleInt___init__ _vi) _dtype _idx_fn)))
:ruleset egglog.exp.array_api.array_api_ruleset )
(constructor _lambda_70 (egglog.builtins.UnstableFn[egglog.exp.array_api.Value,egglog.exp.array_api.TupleInt] i64 egglog.exp.array_api.TupleInt) egglog.exp.array_api.Value)
(rewrite (_lambda_70 _idx_fn _i _rest_indices) (unstable-app _idx_fn (egglog_exp_array_api_TupleInt_append_start _rest_indices (egglog_exp_array_api_Int___init__ _i))) :subsume :ruleset egglog.exp.array_api.array_api_ruleset)
(constructor _lambda_71 (egglog.builtins.Vec[egglog.exp.array_api.Int] egglog.builtins.UnstableFn[egglog.exp.array_api.Value,egglog.exp.array_api.TupleInt] i64) egglog.exp.array_api.RecursiveValue)
(rewrite (_lambda_71 _vi1 _idx_fn _i) (egglog_exp_array_api_RecursiveValue_from_index_and_shape _vi1 (unstable-fn "_lambda_70" _idx_fn _i)) :subsume :ruleset egglog.exp.array_api.array_api_ruleset)
(rewrite (egglog_exp_array_api_RecursiveValue_shape (egglog_exp_array_api_RecursiveValue___init__ _v)) (egglog_exp_array_api_TupleInt___init__ (vec-empty )) :ruleset egglog.exp.array_api.array_api_ruleset)
(sort egglog.builtins.Vec[egglog.exp.array_api.RecursiveValue] (Vec egglog.exp.array_api.RecursiveValue))
(constructor egglog_exp_array_api_RecursiveValue_vec (egglog.builtins.Vec[egglog.exp.array_api.RecursiveValue]) egglog.exp.array_api.RecursiveValue)
(rewrite (egglog_exp_array_api_RecursiveValue_shape (egglog_exp_array_api_RecursiveValue_vec _vs)) (egglog_exp_array_api_TupleInt___add__ (egglog_exp_array_api_TupleInt___init__ (vec-of (egglog_exp_array_api_Int___init__ (vec-length _vs)))) (egglog_exp_array_api_RecursiveValue_shape (vec-get _vs 0))) :when ((> (vec-length _vs) 0)) :ruleset egglog.exp.array_api.array_api_ruleset)
(rewrite (egglog_exp_array_api_RecursiveValue_shape (egglog_exp_array_api_RecursiveValue_vec _vs)) (egglog_exp_array_api_TupleInt___init__ (vec-of (egglog_exp_array_api_Int___init__ 0))) :when ((= (vec-length _vs) 0)) :ruleset egglog.exp.array_api.array_api_ruleset)
(rewrite (egglog_exp_array_api_RecursiveValue___getitem__ (egglog_exp_array_api_RecursiveValue___init__ _v) _vi) _v :ruleset egglog.exp.array_api.array_api_ruleset)
(rule ((= _rv (egglog_exp_array_api_RecursiveValue_vec _vs))
(= _v (egglog_exp_array_api_RecursiveValue___getitem__ _rv _vi))
(> (vec-length _vi) 0)
(= (vec-get _vi 0) (egglog_exp_array_api_Int___init__ _k))
(= _rv1 (vec-get _vs _k))
(= _vi1 (vec-remove _vi 0)))
((union _v (egglog_exp_array_api_RecursiveValue___getitem__ _rv1 _vi1))
(subsume (egglog_exp_array_api_RecursiveValue___getitem__ _rv _vi)))
:ruleset egglog.exp.array_api.array_api_ruleset )
(sort egglog.builtins.UnstableFn[egglog.exp.array_api.RecursiveValue,egglog.builtins.i64] (UnstableFn (i64 ) egglog.exp.array_api.RecursiveValue))
(rule ((= _rv (egglog_exp_array_api_RecursiveValue_from_index_and_shape _vi _idx_fn))
(> (vec-length _vi) 0)
(= (vec-get _vi 0) (egglog_exp_array_api_Int___init__ _k))
(= _vi1 (vec-remove _vi 0)))
((union _rv (egglog_exp_array_api_RecursiveValue_vec (unstable-vec-map (unstable-fn "_lambda_71" _vi1 _idx_fn) (vec-range _k))))
(subsume (egglog_exp_array_api_RecursiveValue_from_index_and_shape _vi _idx_fn)))
:ruleset egglog.exp.array_api.array_api_ruleset )
(rule ((= _rv (egglog_exp_array_api_RecursiveValue_from_index_and_shape _vi _idx_fn))
(= (vec-length _vi) 0))
((union _rv (egglog_exp_array_api_RecursiveValue___init__ (unstable-app _idx_fn (egglog_exp_array_api_TupleInt___init__ (vec-empty )))))
(subsume (egglog_exp_array_api_RecursiveValue_from_index_and_shape _vi _idx_fn)))
:ruleset egglog.exp.array_api.array_api_ruleset )
(constructor _lambda_72 (egglog.builtins.UnstableFn[egglog.exp.array_api.Value,egglog.exp.array_api.Int] i64) egglog.exp.array_api.Value)
(rewrite (_lambda_72 _idx_fn _i) (unstable-app _idx_fn (egglog_exp_array_api_Int___init__ _i)) :subsume :ruleset egglog.exp.array_api.array_api_ruleset)
(rule ((= _ti (egglog_exp_array_api_TupleValue___init__ _vs))
(= _ti (egglog_exp_array_api_TupleValue___init__ _vs2))
(!= _vs _vs2))
((vec-union _vs _vs2))
:ruleset egglog.exp.array_api.array_api_ruleset )
(rewrite (egglog_exp_array_api_TupleValue_length (egglog_exp_array_api_TupleValue_fn _i2 _idx_fn)) _i2 :ruleset egglog.exp.array_api.array_api_ruleset)
(rewrite (egglog_exp_array_api_TupleValue___getitem__ (egglog_exp_array_api_TupleValue_fn _i2 _idx_fn) _i) (unstable-app _idx_fn (egglog_exp_array_api_check_index _i2 _i)) :subsume :ruleset egglog.exp.array_api.array_api_ruleset)
(rewrite (egglog_exp_array_api_TupleValue_length (egglog_exp_array_api_TupleValue___init__ _vs)) (egglog_exp_array_api_Int___init__ (vec-length _vs)) :ruleset egglog.exp.array_api.array_api_ruleset)
(rewrite (egglog_exp_array_api_TupleValue___getitem__ (egglog_exp_array_api_TupleValue___init__ _vs) (egglog_exp_array_api_Int___init__ _k)) (vec-get _vs _k) :when ((>= _k 0) (< _k (vec-length _vs))) :ruleset egglog.exp.array_api.array_api_ruleset)
(sort egglog.builtins.UnstableFn[egglog.exp.array_api.Value,egglog.builtins.i64] (UnstableFn (i64 ) egglog.exp.array_api.Value))
(rewrite (egglog_exp_array_api_TupleValue_fn (egglog_exp_array_api_Int___init__ _k) _idx_fn) (egglog_exp_array_api_TupleValue___init__ (unstable-vec-map (unstable-fn "_lambda_72" _idx_fn) (vec-range _k))) :subsume :ruleset egglog.exp.array_api.array_api_ruleset)
(sort egglog.builtins.UnstableFn[egglog.exp.array_api.TupleValue] (UnstableFn () egglog.exp.array_api.TupleValue))
(constructor egglog_exp_array_api_TupleValue_if_ (egglog.exp.array_api.Boolean egglog.builtins.UnstableFn[egglog.exp.array_api.TupleValue] egglog.builtins.UnstableFn[egglog.exp.array_api.TupleValue]) egglog.exp.array_api.TupleValue)
(rewrite (egglog_exp_array_api_TupleValue_if_ (egglog_exp_array_api_Boolean___init__ true) _lt _lf) (unstable-app _lt) :subsume :ruleset egglog.exp.array_api.array_api_ruleset)
(rewrite (egglog_exp_array_api_TupleValue_if_ (egglog_exp_array_api_Boolean___init__ false) _lt _lf) (unstable-app _lf) :subsume :ruleset egglog.exp.array_api.array_api_ruleset)
(constructor egglog_exp_array_api_DType_int64 () egglog.exp.array_api.DType)
(rewrite (egglog_exp_array_api_Value_dtype (egglog_exp_array_api_Value_from_int _i)) (egglog_exp_array_api_DType_int64 ) :ruleset egglog.exp.array_api.array_api_ruleset)
(rewrite (egglog_exp_array_api_Value_dtype (egglog_exp_array_api_Value_from_float _f)) $__expr_1 :ruleset egglog.exp.array_api.array_api_ruleset)
(constructor egglog_exp_array_api_DType_bool () egglog.exp.array_api.DType)
(rewrite (egglog_exp_array_api_Value_dtype (egglog_exp_array_api_Value_from_bool _b)) (egglog_exp_array_api_DType_bool ) :ruleset egglog.exp.array_api.array_api_ruleset)
(constructor egglog_exp_array_api_Value_to_int (egglog.exp.array_api.Value) egglog.exp.array_api.Int)
(rewrite (egglog_exp_array_api_Value_to_int (egglog_exp_array_api_Value_from_int _i)) _i :ruleset egglog.exp.array_api.array_api_ruleset)
(constructor egglog_exp_array_api_Value_to_bool (egglog.exp.array_api.Value) egglog.exp.array_api.Boolean)
(rewrite (egglog_exp_array_api_Value_to_bool (egglog_exp_array_api_Value_from_bool _b)) _b :ruleset egglog.exp.array_api.array_api_ruleset)
(rewrite (egglog_exp_array_api_Value_to_truthy_value (egglog_exp_array_api_Value_from_bool _b)) (egglog_exp_array_api_Value_from_bool _b) :ruleset egglog.exp.array_api.array_api_ruleset)
(constructor egglog_exp_array_api_Value_conj (egglog.exp.array_api.Value) egglog.exp.array_api.Value)
(rewrite (egglog_exp_array_api_Value_conj (egglog_exp_array_api_Value_from_float _f)) (egglog_exp_array_api_Value_from_float _f) :ruleset egglog.exp.array_api.array_api_ruleset)
(constructor egglog_exp_array_api_Value_real (egglog.exp.array_api.Value) egglog.exp.array_api.Value)
(rewrite (egglog_exp_array_api_Value_real (egglog_exp_array_api_Value_from_float _f)) (egglog_exp_array_api_Value_from_float _f) :ruleset egglog.exp.array_api.array_api_ruleset)
(rewrite (egglog_exp_array_api_Value_real (egglog_exp_array_api_Value_from_int _i)) (egglog_exp_array_api_Value_from_int _i) :ruleset egglog.exp.array_api.array_api_ruleset)
(rewrite (egglog_exp_array_api_Value_conj (egglog_exp_array_api_Value_from_int _i)) (egglog_exp_array_api_Value_from_int _i) :ruleset egglog.exp.array_api.array_api_ruleset)
(constructor egglog_exp_array_api_Value_sqrt (egglog.exp.array_api.Value) egglog.exp.array_api.Value)
(constructor egglog_exp_array_api_Float___pow__ (egglog.exp.array_api.Float egglog.exp.array_api.Float) egglog.exp.array_api.Float)
(rewrite (egglog_exp_array_api_Value_sqrt (egglog_exp_array_api_Value_from_float _f)) (egglog_exp_array_api_Value_from_float (egglog_exp_array_api_Float___pow__ _f (egglog_exp_array_api_Float___init__ 0.5))) :ruleset egglog.exp.array_api.array_api_ruleset)
(constructor egglog_exp_array_api_Float_rational (BigRat) egglog.exp.array_api.Float :cost 2)
(rewrite (egglog_exp_array_api_Value___add__ (egglog_exp_array_api_Value_from_float (egglog_exp_array_api_Float_rational (bigrat (bigint 0) (bigint 1)))) _v) _v :ruleset egglog.exp.array_api.array_api_ruleset)
(rewrite (egglog_exp_array_api_Value_if_ (egglog_exp_array_api_Boolean___init__ true) _vt _v1t) (unstable-app _vt) :subsume :ruleset egglog.exp.array_api.array_api_ruleset)
(rewrite (egglog_exp_array_api_Value_if_ (egglog_exp_array_api_Boolean___init__ false) _vt _v1t) (unstable-app _v1t) :subsume :ruleset egglog.exp.array_api.array_api_ruleset)
(rewrite (egglog_exp_array_api_Value___eq__ (egglog_exp_array_api_Value_from_int _i) (egglog_exp_array_api_Value_from_int _i1)) (egglog_exp_array_api_Int___eq__ _i _i1) :ruleset egglog.exp.array_api.array_api_ruleset)
(constructor egglog_exp_array_api_Float___eq__ (egglog.exp.array_api.Float egglog.exp.array_api.Float) egglog.exp.array_api.Boolean)
(rewrite (egglog_exp_array_api_Value___eq__ (egglog_exp_array_api_Value_from_float _f) (egglog_exp_array_api_Value_from_float _f1)) (egglog_exp_array_api_Float___eq__ _f _f1) :ruleset egglog.exp.array_api.array_api_ruleset)
(constructor egglog_exp_array_api_Boolean___eq__ (egglog.exp.array_api.Boolean egglog.exp.array_api.Boolean) egglog.exp.array_api.Boolean)
(rewrite (egglog_exp_array_api_Value___eq__ (egglog_exp_array_api_Value_from_bool _b) (egglog_exp_array_api_Value_from_bool _b1)) (egglog_exp_array_api_Boolean___eq__ _b _b1) :ruleset egglog.exp.array_api.array_api_ruleset)
(rewrite (egglog_exp_array_api_Value___ge__ (egglog_exp_array_api_Value_from_int _i) (egglog_exp_array_api_Value_from_int _i1)) (egglog_exp_array_api_Int___ge__ _i _i1) :ruleset egglog.exp.array_api.array_api_ruleset)
(constructor egglog_exp_array_api_Float___ge__ (egglog.exp.array_api.Float egglog.exp.array_api.Float) egglog.exp.array_api.Boolean)
(rewrite (egglog_exp_array_api_Value___ge__ (egglog_exp_array_api_Value_from_float _f) (egglog_exp_array_api_Value_from_float _f1)) (egglog_exp_array_api_Float___ge__ _f _f1) :ruleset egglog.exp.array_api.array_api_ruleset)
(constructor egglog_exp_array_api_Int___le__ (egglog.exp.array_api.Int egglog.exp.array_api.Int) egglog.exp.array_api.Boolean)
(rewrite (egglog_exp_array_api_Value___le__ (egglog_exp_array_api_Value_from_int _i) (egglog_exp_array_api_Value_from_int _i1)) (egglog_exp_array_api_Int___le__ _i _i1) :ruleset egglog.exp.array_api.array_api_ruleset)
(constructor egglog_exp_array_api_Float___le__ (egglog.exp.array_api.Float egglog.exp.array_api.Float) egglog.exp.array_api.Boolean)
(rewrite (egglog_exp_array_api_Value___le__ (egglog_exp_array_api_Value_from_float _f) (egglog_exp_array_api_Value_from_float _f1)) (egglog_exp_array_api_Float___le__ _f _f1) :ruleset egglog.exp.array_api.array_api_ruleset)
(constructor egglog_exp_array_api_Int___gt__ (egglog.exp.array_api.Int egglog.exp.array_api.Int) egglog.exp.array_api.Boolean)
(rewrite (egglog_exp_array_api_Value___gt__ (egglog_exp_array_api_Value_from_int _i) (egglog_exp_array_api_Value_from_int _i1)) (egglog_exp_array_api_Int___gt__ _i _i1) :ruleset egglog.exp.array_api.array_api_ruleset)
(constructor egglog_exp_array_api_Float___gt__ (egglog.exp.array_api.Float egglog.exp.array_api.Float) egglog.exp.array_api.Boolean)
(rewrite (egglog_exp_array_api_Value___gt__ (egglog_exp_array_api_Value_from_float _f) (egglog_exp_array_api_Value_from_float _f1)) (egglog_exp_array_api_Float___gt__ _f _f1) :ruleset egglog.exp.array_api.array_api_ruleset)
(rewrite (egglog_exp_array_api_Value___lt__ (egglog_exp_array_api_Value_from_int _i) (egglog_exp_array_api_Value_from_int _i1)) (egglog_exp_array_api_Value_from_bool (egglog_exp_array_api_Int___lt__ _i _i1)) :ruleset egglog.exp.array_api.array_api_ruleset)
(constructor egglog_exp_array_api_Float___lt__ (egglog.exp.array_api.Float egglog.exp.array_api.Float) egglog.exp.array_api.Boolean)
(rewrite (egglog_exp_array_api_Value___lt__ (egglog_exp_array_api_Value_from_float _f) (egglog_exp_array_api_Value_from_float _f1)) (egglog_exp_array_api_Value_from_bool (egglog_exp_array_api_Float___lt__ _f _f1)) :ruleset egglog.exp.array_api.array_api_ruleset)
(constructor egglog_exp_array_api_Float___truediv__ (egglog.exp.array_api.Float egglog.exp.array_api.Float) egglog.exp.array_api.Float)
(rewrite (egglog_exp_array_api_Value___truediv__ (egglog_exp_array_api_Value_from_float _f) (egglog_exp_array_api_Value_from_float _f1)) (egglog_exp_array_api_Value_from_float (egglog_exp_array_api_Float___truediv__ _f _f1)) :ruleset egglog.exp.array_api.array_api_ruleset)
(constructor egglog_exp_array_api_Float___mul__ (egglog.exp.array_api.Float egglog.exp.array_api.Float) egglog.exp.array_api.Float)
(rewrite (egglog_exp_array_api_Value___mul__ (egglog_exp_array_api_Value_from_float _f) (egglog_exp_array_api_Value_from_float _f1)) (egglog_exp_array_api_Value_from_float (egglog_exp_array_api_Float___mul__ _f _f1)) :ruleset egglog.exp.array_api.array_api_ruleset)
(rewrite (egglog_exp_array_api_Value___mul__ (egglog_exp_array_api_Value_from_int _i) (egglog_exp_array_api_Value_from_int _i1)) (egglog_exp_array_api_Value_from_int (egglog_exp_array_api_Int___mul__ _i _i1)) :ruleset egglog.exp.array_api.array_api_ruleset)
(constructor egglog_exp_array_api_Float___add__ (egglog.exp.array_api.Float egglog.exp.array_api.Float) egglog.exp.array_api.Float)
(rewrite (egglog_exp_array_api_Value___add__ (egglog_exp_array_api_Value_from_float _f) (egglog_exp_array_api_Value_from_float _f1)) (egglog_exp_array_api_Value_from_float (egglog_exp_array_api_Float___add__ _f _f1)) :ruleset egglog.exp.array_api.array_api_ruleset)
(rewrite (egglog_exp_array_api_Value___add__ (egglog_exp_array_api_Value_from_int _i) (egglog_exp_array_api_Value_from_int _i1)) (egglog_exp_array_api_Value_from_int (egglog_exp_array_api_Int___add__ _i _i1)) :ruleset egglog.exp.array_api.array_api_ruleset)
(constructor egglog_exp_array_api_Float___sub__ (egglog.exp.array_api.Float egglog.exp.array_api.Float) egglog.exp.array_api.Float)
(rewrite (egglog_exp_array_api_Value___sub__ (egglog_exp_array_api_Value_from_float _f) (egglog_exp_array_api_Value_from_float _f1)) (egglog_exp_array_api_Value_from_float (egglog_exp_array_api_Float___sub__ _f _f1)) :ruleset egglog.exp.array_api.array_api_ruleset)
(rewrite (egglog_exp_array_api_Value___sub__ (egglog_exp_array_api_Value_from_int _i) (egglog_exp_array_api_Value_from_int _i1)) (egglog_exp_array_api_Value_from_int (egglog_exp_array_api_Int___sub__ _i _i1)) :ruleset egglog.exp.array_api.array_api_ruleset)
(rewrite (egglog_exp_array_api_Value___pow__ (egglog_exp_array_api_Value_from_float _f) (egglog_exp_array_api_Value_from_float _f1)) (egglog_exp_array_api_Value_from_float (egglog_exp_array_api_Float___pow__ _f _f1)) :ruleset egglog.exp.array_api.array_api_ruleset)
(constructor egglog_exp_array_api_Int___pow__ (egglog.exp.array_api.Int egglog.exp.array_api.Int) egglog.exp.array_api.Int)
(rewrite (egglog_exp_array_api_Value___pow__ (egglog_exp_array_api_Value_from_int _i) (egglog_exp_array_api_Value_from_int _i1)) (egglog_exp_array_api_Value_from_int (egglog_exp_array_api_Int___pow__ _i _i1)) :ruleset egglog.exp.array_api.array_api_ruleset)
(constructor egglog_exp_array_api_Float_from_int (egglog.exp.array_api.Int) egglog.exp.array_api.Float)
(rewrite (egglog_exp_array_api_Value___pow__ (egglog_exp_array_api_Value_from_int _i) (egglog_exp_array_api_Value_from_float _f1)) (egglog_exp_array_api_Value_from_float (egglog_exp_array_api_Float___pow__ (egglog_exp_array_api_Float_from_int _i) _f1)) :ruleset egglog.exp.array_api.array_api_ruleset)
(constructor egglog_exp_array_api_Value___abs__ (egglog.exp.array_api.Value) egglog.exp.array_api.Value)
(constructor egglog_exp_array_api_Int___abs__ (egglog.exp.array_api.Int) egglog.exp.array_api.Int)
(rewrite (egglog_exp_array_api_Value___abs__ (egglog_exp_array_api_Value_from_int _i)) (egglog_exp_array_api_Value_from_int (egglog_exp_array_api_Int___abs__ _i)) :ruleset egglog.exp.array_api.array_api_ruleset)
(constructor egglog_exp_array_api_Float___abs__ (egglog.exp.array_api.Float) egglog.exp.array_api.Float)
(rewrite (egglog_exp_array_api_Value___abs__ (egglog_exp_array_api_Value_from_float _f)) (egglog_exp_array_api_Value_from_float (egglog_exp_array_api_Float___abs__ _f)) :ruleset egglog.exp.array_api.array_api_ruleset)
(rewrite (egglog_exp_array_api_Value___pow__ (egglog_exp_array_api_Value___abs__ _v) (egglog_exp_array_api_Value_from_float (egglog_exp_array_api_Float_rational (bigrat (bigint 2) (bigint 1))))) (egglog_exp_array_api_Value___pow__ _v (egglog_exp_array_api_Value_from_float (egglog_exp_array_api_Float_from_int (egglog_exp_array_api_Int___init__ 2)))) :ruleset egglog.exp.array_api.array_api_ruleset)
(rewrite (egglog_exp_array_api_Value___pow__ (egglog_exp_array_api_Value___truediv__ _v1 _v) _v2) (egglog_exp_array_api_Value___truediv__ (egglog_exp_array_api_Value___pow__ _v1 _v2) (egglog_exp_array_api_Value___pow__ _v _v2)) :ruleset egglog.exp.array_api.array_api_ruleset)
(rewrite (egglog_exp_array_api_Value___pow__ (egglog_exp_array_api_Value___pow__ _v _v1) _v2) (egglog_exp_array_api_Value___pow__ _v (egglog_exp_array_api_Value___mul__ _v1 _v2)) :ruleset egglog.exp.array_api.array_api_ruleset)
(rewrite (egglog_exp_array_api_Value___mul__ (egglog_exp_array_api_Value_from_float _f) (egglog_exp_array_api_Value_from_int _i)) (egglog_exp_array_api_Value_from_float (egglog_exp_array_api_Float___mul__ _f (egglog_exp_array_api_Float_from_int _i))) :ruleset egglog.exp.array_api.array_api_ruleset)
(rewrite (egglog_exp_array_api_Value___pow__ _v (egglog_exp_array_api_Value_from_float (egglog_exp_array_api_Float_rational (bigrat (bigint 1) (bigint 1))))) _v :ruleset egglog.exp.array_api.array_api_ruleset)
(rewrite (egglog_exp_array_api_Value_from_float (egglog_exp_array_api_Float_from_int _i)) (egglog_exp_array_api_Value_from_int _i) :ruleset egglog.exp.array_api.array_api_ruleset)
(rewrite (egglog_exp_array_api_Value___mul__ (egglog_exp_array_api_Value_from_int _i) (egglog_exp_array_api_Value_from_float _f)) (egglog_exp_array_api_Value___mul__ (egglog_exp_array_api_Value_from_float (egglog_exp_array_api_Float_from_int _i)) (egglog_exp_array_api_Value_from_float _f)) :ruleset egglog.exp.array_api.array_api_ruleset)
(rewrite (egglog_exp_array_api_Value___add__ _v (egglog_exp_array_api_Value_from_int (egglog_exp_array_api_Int___init__ 0))) _v :ruleset egglog.exp.array_api.array_api_ruleset)
(rewrite (egglog_exp_array_api_Value___add__ (egglog_exp_array_api_Value_from_int (egglog_exp_array_api_Int___init__ 0)) _v) _v :ruleset egglog.exp.array_api.array_api_ruleset)
(rewrite (egglog_exp_array_api_Value___mul__ _v (egglog_exp_array_api_Value_from_int (egglog_exp_array_api_Int___init__ 1))) _v :ruleset egglog.exp.array_api.array_api_ruleset)
(rewrite (egglog_exp_array_api_Value___mul__ (egglog_exp_array_api_Value_from_int (egglog_exp_array_api_Int___init__ 1)) _v) _v :ruleset egglog.exp.array_api.array_api_ruleset)
(rewrite (egglog_exp_array_api_Value___mul__ _v (egglog_exp_array_api_Value_from_int (egglog_exp_array_api_Int___init__ 0))) (egglog_exp_array_api_Value_from_int (egglog_exp_array_api_Int___init__ 0)) :ruleset egglog.exp.array_api.array_api_ruleset)
(rewrite (egglog_exp_array_api_Value___mul__ (egglog_exp_array_api_Value_from_int (egglog_exp_array_api_Int___init__ 0)) _v) (egglog_exp_array_api_Value_from_int (egglog_exp_array_api_Int___init__ 0)) :ruleset egglog.exp.array_api.array_api_ruleset)
(rewrite (egglog_exp_array_api_Value___sub__ _v (egglog_exp_array_api_Value_from_int (egglog_exp_array_api_Int___init__ 0))) _v :ruleset egglog.exp.array_api.array_api_ruleset)
(rewrite (egglog_exp_array_api_Value___pow__ _v (egglog_exp_array_api_Value_from_int (egglog_exp_array_api_Int___init__ 1))) _v :ruleset egglog.exp.array_api.array_api_ruleset)
(rewrite (egglog_exp_array_api_Value_diff _v _v) (egglog_exp_array_api_Value_from_int (egglog_exp_array_api_Int___init__ 1)) :ruleset egglog.exp.array_api.array_api_ruleset)
(rewrite (egglog_exp_array_api_Value_diff (egglog_exp_array_api_Value___add__ _v1 _v2) _v3) (egglog_exp_array_api_Value___add__ (egglog_exp_array_api_Value_diff _v1 _v3) (egglog_exp_array_api_Value_diff _v2 _v3)) :ruleset egglog.exp.array_api.array_api_ruleset)
(rewrite (egglog_exp_array_api_Value_diff (egglog_exp_array_api_Value___sub__ _v1 _v2) _v3) (egglog_exp_array_api_Value___sub__ (egglog_exp_array_api_Value_diff _v1 _v3) (egglog_exp_array_api_Value_diff _v2 _v3)) :ruleset egglog.exp.array_api.array_api_ruleset)
(rewrite (egglog_exp_array_api_Value_diff (egglog_exp_array_api_Value___mul__ _v1 _v2) _v3) (egglog_exp_array_api_Value___add__ (egglog_exp_array_api_Value___mul__ (egglog_exp_array_api_Value_diff _v1 _v3) _v2) (egglog_exp_array_api_Value___mul__ _v1 (egglog_exp_array_api_Value_diff _v2 _v3))) :ruleset egglog.exp.array_api.array_api_ruleset)
(rewrite (egglog_exp_array_api_Value_diff (egglog_exp_array_api_Value___truediv__ _v1 _v2) _v3) (egglog_exp_array_api_Value___truediv__ (egglog_exp_array_api_Value___sub__ (egglog_exp_array_api_Value___mul__ (egglog_exp_array_api_Value_diff _v1 _v3) _v2) (egglog_exp_array_api_Value___mul__ _v1 (egglog_exp_array_api_Value_diff _v2 _v3))) (egglog_exp_array_api_Value___mul__ _v2 _v2)) :ruleset egglog.exp.array_api.array_api_ruleset)
(rewrite (egglog_exp_array_api_Value_diff (egglog_exp_array_api_Value___pow__ _v1 (egglog_exp_array_api_Value_from_int (egglog_exp_array_api_Int___init__ _i_))) _v3) (egglog_exp_array_api_Value_diff (egglog_exp_array_api_Value___mul__ _v1 (egglog_exp_array_api_Value___pow__ _v1 (egglog_exp_array_api_Value_from_int (egglog_exp_array_api_Int___init__ (- _i_ 1))))) _v3) :when ((> _i_ 1)) :ruleset egglog.exp.array_api.array_api_ruleset)
(constructor egglog_exp_array_api_Value_var (String) egglog.exp.array_api.Value)
(rewrite (egglog_exp_array_api_Value_diff (egglog_exp_array_api_Value_var _s) (egglog_exp_array_api_Value_var _s1)) (egglog_exp_array_api_Value_from_int (egglog_exp_array_api_Int___init__ 0)) :when ((!= _s _s1)) :ruleset egglog.exp.array_api.array_api_ruleset)
(rewrite (egglog_exp_array_api_Value_diff (egglog_exp_array_api_Value_from_int (egglog_exp_array_api_Int___init__ _i_)) (egglog_exp_array_api_Value_var _s)) (egglog_exp_array_api_Value_from_int (egglog_exp_array_api_Int___init__ 0)) :ruleset egglog.exp.array_api.array_api_ruleset)
(sort egglog.exp.array_api.IsDtypeKind)
(constructor egglog_exp_array_api_isdtype (egglog.exp.array_api.DType egglog.exp.array_api.IsDtypeKind) egglog.exp.array_api.Boolean)
(constructor egglog_exp_array_api_DType_float32 () egglog.exp.array_api.DType)
(constructor egglog_exp_array_api_IsDtypeKind_string (String) egglog.exp.array_api.IsDtypeKind)
(rewrite (egglog_exp_array_api_isdtype (egglog_exp_array_api_DType_float32 ) (egglog_exp_array_api_IsDtypeKind_string "integral")) (egglog_exp_array_api_Boolean___init__ false) :ruleset egglog.exp.array_api.array_api_ruleset)
(rewrite (egglog_exp_array_api_isdtype $__expr_1 (egglog_exp_array_api_IsDtypeKind_string "integral")) (egglog_exp_array_api_Boolean___init__ false) :ruleset egglog.exp.array_api.array_api_ruleset)
(constructor egglog_exp_array_api_DType_object () egglog.exp.array_api.DType)
(rewrite (egglog_exp_array_api_isdtype (egglog_exp_array_api_DType_object ) (egglog_exp_array_api_IsDtypeKind_string "integral")) (egglog_exp_array_api_Boolean___init__ false) :ruleset egglog.exp.array_api.array_api_ruleset)
(rewrite (egglog_exp_array_api_isdtype (egglog_exp_array_api_DType_int64 ) (egglog_exp_array_api_IsDtypeKind_string "integral")) (egglog_exp_array_api_Boolean___init__ true) :ruleset egglog.exp.array_api.array_api_ruleset)
(constructor egglog_exp_array_api_DType_int32 () egglog.exp.array_api.DType)
(rewrite (egglog_exp_array_api_isdtype (egglog_exp_array_api_DType_int32 ) (egglog_exp_array_api_IsDtypeKind_string "integral")) (egglog_exp_array_api_Boolean___init__ true) :ruleset egglog.exp.array_api.array_api_ruleset)
(rewrite (egglog_exp_array_api_isdtype (egglog_exp_array_api_DType_float32 ) (egglog_exp_array_api_IsDtypeKind_string "real floating")) (egglog_exp_array_api_Boolean___init__ true) :ruleset egglog.exp.array_api.array_api_ruleset)
(rewrite (egglog_exp_array_api_isdtype $__expr_1 (egglog_exp_array_api_IsDtypeKind_string "real floating")) (egglog_exp_array_api_Boolean___init__ true) :ruleset egglog.exp.array_api.array_api_ruleset)
(rewrite (egglog_exp_array_api_isdtype (egglog_exp_array_api_DType_object ) (egglog_exp_array_api_IsDtypeKind_string "real floating")) (egglog_exp_array_api_Boolean___init__ false) :ruleset egglog.exp.array_api.array_api_ruleset)
(rewrite (egglog_exp_array_api_isdtype (egglog_exp_array_api_DType_int64 ) (egglog_exp_array_api_IsDtypeKind_string "real floating")) (egglog_exp_array_api_Boolean___init__ false) :ruleset egglog.exp.array_api.array_api_ruleset)
(rewrite (egglog_exp_array_api_isdtype (egglog_exp_array_api_DType_int32 ) (egglog_exp_array_api_IsDtypeKind_string "real floating")) (egglog_exp_array_api_Boolean___init__ false) :ruleset egglog.exp.array_api.array_api_ruleset)
(rewrite (egglog_exp_array_api_isdtype (egglog_exp_array_api_DType_float32 ) (egglog_exp_array_api_IsDtypeKind_string "complex floating")) (egglog_exp_array_api_Boolean___init__ false) :ruleset egglog.exp.array_api.array_api_ruleset)
(rewrite (egglog_exp_array_api_isdtype $__expr_1 (egglog_exp_array_api_IsDtypeKind_string "complex floating")) (egglog_exp_array_api_Boolean___init__ false) :ruleset egglog.exp.array_api.array_api_ruleset)
(rewrite (egglog_exp_array_api_isdtype (egglog_exp_array_api_DType_object ) (egglog_exp_array_api_IsDtypeKind_string "complex floating")) (egglog_exp_array_api_Boolean___init__ false) :ruleset egglog.exp.array_api.array_api_ruleset)
(rewrite (egglog_exp_array_api_isdtype (egglog_exp_array_api_DType_int64 ) (egglog_exp_array_api_IsDtypeKind_string "complex floating")) (egglog_exp_array_api_Boolean___init__ false) :ruleset egglog.exp.array_api.array_api_ruleset)
(rewrite (egglog_exp_array_api_isdtype (egglog_exp_array_api_DType_int32 ) (egglog_exp_array_api_IsDtypeKind_string "complex floating")) (egglog_exp_array_api_Boolean___init__ false) :ruleset egglog.exp.array_api.array_api_ruleset)
(constructor egglog_exp_array_api_IsDtypeKind_NULL () egglog.exp.array_api.IsDtypeKind)
(rewrite (egglog_exp_array_api_isdtype _d (egglog_exp_array_api_IsDtypeKind_NULL )) (egglog_exp_array_api_Boolean___init__ false) :ruleset egglog.exp.array_api.array_api_ruleset)
(constructor egglog_exp_array_api_IsDtypeKind_dtype (egglog.exp.array_api.DType) egglog.exp.array_api.IsDtypeKind)
(rewrite (egglog_exp_array_api_isdtype _d (egglog_exp_array_api_IsDtypeKind_dtype _d)) (egglog_exp_array_api_Boolean___init__ true) :ruleset egglog.exp.array_api.array_api_ruleset)
(constructor egglog_exp_array_api_IsDtypeKind___or__ (egglog.exp.array_api.IsDtypeKind egglog.exp.array_api.IsDtypeKind) egglog.exp.array_api.IsDtypeKind :cost 10)
(rewrite (egglog_exp_array_api_isdtype _d (egglog_exp_array_api_IsDtypeKind___or__ _k1 _k2)) (egglog_exp_array_api_Boolean___or__ (egglog_exp_array_api_isdtype _d _k1) (egglog_exp_array_api_isdtype _d _k2)) :ruleset egglog.exp.array_api.array_api_ruleset)
(rewrite (egglog_exp_array_api_IsDtypeKind___or__ _k1 (egglog_exp_array_api_IsDtypeKind_NULL )) _k1 :ruleset egglog.exp.array_api.array_api_ruleset)
(rewrite (egglog_exp_array_api_DType___eq__ $__expr_1 $__expr_1) (egglog_exp_array_api_Boolean___init__ true) :ruleset egglog.exp.array_api.array_api_ruleset)
(rewrite (egglog_exp_array_api_DType___eq__ $__expr_1 (egglog_exp_array_api_DType_float32 )) (egglog_exp_array_api_Boolean___init__ false) :ruleset egglog.exp.array_api.array_api_ruleset)
(rewrite (egglog_exp_array_api_DType___eq__ $__expr_1 (egglog_exp_array_api_DType_int32 )) (egglog_exp_array_api_Boolean___init__ false) :ruleset egglog.exp.array_api.array_api_ruleset)
(rewrite (egglog_exp_array_api_DType___eq__ $__expr_1 (egglog_exp_array_api_DType_int64 )) (egglog_exp_array_api_Boolean___init__ false) :ruleset egglog.exp.array_api.array_api_ruleset)
(rewrite (egglog_exp_array_api_DType___eq__ $__expr_1 (egglog_exp_array_api_DType_object )) (egglog_exp_array_api_Boolean___init__ false) :ruleset egglog.exp.array_api.array_api_ruleset)
(rewrite (egglog_exp_array_api_DType___eq__ (egglog_exp_array_api_DType_float32 ) $__expr_1) (egglog_exp_array_api_Boolean___init__ false) :ruleset egglog.exp.array_api.array_api_ruleset)
(rewrite (egglog_exp_array_api_DType___eq__ (egglog_exp_array_api_DType_float32 ) (egglog_exp_array_api_DType_float32 )) (egglog_exp_array_api_Boolean___init__ true) :ruleset egglog.exp.array_api.array_api_ruleset)
(rewrite (egglog_exp_array_api_DType___eq__ (egglog_exp_array_api_DType_float32 ) (egglog_exp_array_api_DType_int32 )) (egglog_exp_array_api_Boolean___init__ false) :ruleset egglog.exp.array_api.array_api_ruleset)
(rewrite (egglog_exp_array_api_DType___eq__ (egglog_exp_array_api_DType_float32 ) (egglog_exp_array_api_DType_int64 )) (egglog_exp_array_api_Boolean___init__ false) :ruleset egglog.exp.array_api.array_api_ruleset)
(rewrite (egglog_exp_array_api_DType___eq__ (egglog_exp_array_api_DType_float32 ) (egglog_exp_array_api_DType_object )) (egglog_exp_array_api_Boolean___init__ false) :ruleset egglog.exp.array_api.array_api_ruleset)
(rewrite (egglog_exp_array_api_DType___eq__ (egglog_exp_array_api_DType_int32 ) $__expr_1) (egglog_exp_array_api_Boolean___init__ false) :ruleset egglog.exp.array_api.array_api_ruleset)
(rewrite (egglog_exp_array_api_DType___eq__ (egglog_exp_array_api_DType_int32 ) (egglog_exp_array_api_DType_float32 )) (egglog_exp_array_api_Boolean___init__ false) :ruleset egglog.exp.array_api.array_api_ruleset)
(rewrite (egglog_exp_array_api_DType___eq__ (egglog_exp_array_api_DType_int32 ) (egglog_exp_array_api_DType_int32 )) (egglog_exp_array_api_Boolean___init__ true) :ruleset egglog.exp.array_api.array_api_ruleset)
(rewrite (egglog_exp_array_api_DType___eq__ (egglog_exp_array_api_DType_int32 ) (egglog_exp_array_api_DType_int64 )) (egglog_exp_array_api_Boolean___init__ false) :ruleset egglog.exp.array_api.array_api_ruleset)
(rewrite (egglog_exp_array_api_DType___eq__ (egglog_exp_array_api_DType_int32 ) (egglog_exp_array_api_DType_object )) (egglog_exp_array_api_Boolean___init__ false) :ruleset egglog.exp.array_api.array_api_ruleset)
(rewrite (egglog_exp_array_api_DType___eq__ (egglog_exp_array_api_DType_int64 ) $__expr_1) (egglog_exp_array_api_Boolean___init__ false) :ruleset egglog.exp.array_api.array_api_ruleset)
(rewrite (egglog_exp_array_api_DType___eq__ (egglog_exp_array_api_DType_int64 ) (egglog_exp_array_api_DType_float32 )) (egglog_exp_array_api_Boolean___init__ false) :ruleset egglog.exp.array_api.array_api_ruleset)
(rewrite (egglog_exp_array_api_DType___eq__ (egglog_exp_array_api_DType_int64 ) (egglog_exp_array_api_DType_int32 )) (egglog_exp_array_api_Boolean___init__ false) :ruleset egglog.exp.array_api.array_api_ruleset)
(rewrite (egglog_exp_array_api_DType___eq__ (egglog_exp_array_api_DType_int64 ) (egglog_exp_array_api_DType_int64 )) (egglog_exp_array_api_Boolean___init__ true) :ruleset egglog.exp.array_api.array_api_ruleset)
(rewrite (egglog_exp_array_api_DType___eq__ (egglog_exp_array_api_DType_int64 ) (egglog_exp_array_api_DType_object )) (egglog_exp_array_api_Boolean___init__ false) :ruleset egglog.exp.array_api.array_api_ruleset)
(rewrite (egglog_exp_array_api_DType___eq__ (egglog_exp_array_api_DType_object ) $__expr_1) (egglog_exp_array_api_Boolean___init__ false) :ruleset egglog.exp.array_api.array_api_ruleset)
(rewrite (egglog_exp_array_api_DType___eq__ (egglog_exp_array_api_DType_object ) (egglog_exp_array_api_DType_float32 )) (egglog_exp_array_api_Boolean___init__ false) :ruleset egglog.exp.array_api.array_api_ruleset)
(rewrite (egglog_exp_array_api_DType___eq__ (egglog_exp_array_api_DType_object ) (egglog_exp_array_api_DType_int32 )) (egglog_exp_array_api_Boolean___init__ false) :ruleset egglog.exp.array_api.array_api_ruleset)
(rewrite (egglog_exp_array_api_DType___eq__ (egglog_exp_array_api_DType_object ) (egglog_exp_array_api_DType_int64 )) (egglog_exp_array_api_Boolean___init__ false) :ruleset egglog.exp.array_api.array_api_ruleset)
(rewrite (egglog_exp_array_api_DType___eq__ (egglog_exp_array_api_DType_object ) (egglog_exp_array_api_DType_object )) (egglog_exp_array_api_Boolean___init__ true) :ruleset egglog.exp.array_api.array_api_ruleset)
(constructor _lambda_73 (egglog.builtins.UnstableFn[egglog.exp.array_api.TupleInt,egglog.exp.array_api.Int] i64) egglog.exp.array_api.TupleInt)
(rewrite (_lambda_73 _idx_fn _i) (unstable-app _idx_fn (egglog_exp_array_api_Int___init__ _i)) :subsume :ruleset egglog.exp.array_api.array_api_ruleset)
(sort egglog.builtins.Vec[egglog.exp.array_api.TupleInt] (Vec egglog.exp.array_api.TupleInt))
(constructor egglog_exp_array_api_TupleTupleInt___init__ (egglog.builtins.Vec[egglog.exp.array_api.TupleInt]) egglog.exp.array_api.TupleTupleInt)
(rule ((= _ti (egglog_exp_array_api_TupleTupleInt___init__ _vs))
(= _ti (egglog_exp_array_api_TupleTupleInt___init__ _vs2))
(!= _vs _vs2))
((vec-union _vs _vs2))
:ruleset egglog.exp.array_api.array_api_ruleset )
(rewrite (egglog_exp_array_api_TupleTupleInt_length (egglog_exp_array_api_TupleTupleInt_fn _i2 _idx_fn)) _i2 :ruleset egglog.exp.array_api.array_api_ruleset)
(rewrite (egglog_exp_array_api_TupleTupleInt___getitem__ (egglog_exp_array_api_TupleTupleInt_fn _i2 _idx_fn) _i) (unstable-app _idx_fn (egglog_exp_array_api_check_index _i2 _i)) :subsume :ruleset egglog.exp.array_api.array_api_ruleset)
(rewrite (egglog_exp_array_api_TupleTupleInt_length (egglog_exp_array_api_TupleTupleInt___init__ _vs)) (egglog_exp_array_api_Int___init__ (vec-length _vs)) :ruleset egglog.exp.array_api.array_api_ruleset)
(rewrite (egglog_exp_array_api_TupleTupleInt___getitem__ (egglog_exp_array_api_TupleTupleInt___init__ _vs) (egglog_exp_array_api_Int___init__ _k)) (vec-get _vs _k) :ruleset egglog.exp.array_api.array_api_ruleset)
(sort egglog.builtins.UnstableFn[egglog.exp.array_api.TupleInt,egglog.builtins.i64] (UnstableFn (i64 ) egglog.exp.array_api.TupleInt))
(rewrite (egglog_exp_array_api_TupleTupleInt_fn (egglog_exp_array_api_Int___init__ _k) _idx_fn) (egglog_exp_array_api_TupleTupleInt___init__ (unstable-vec-map (unstable-fn "_lambda_73" _idx_fn) (vec-range _k))) :subsume :ruleset egglog.exp.array_api.array_api_ruleset)
(sort egglog.builtins.UnstableFn[egglog.exp.array_api.TupleTupleInt] (UnstableFn () egglog.exp.array_api.TupleTupleInt))
(constructor egglog_exp_array_api_TupleTupleInt_if_ (egglog.exp.array_api.Boolean egglog.builtins.UnstableFn[egglog.exp.array_api.TupleTupleInt] egglog.builtins.UnstableFn[egglog.exp.array_api.TupleTupleInt]) egglog.exp.array_api.TupleTupleInt)
(rewrite (egglog_exp_array_api_TupleTupleInt_if_ (egglog_exp_array_api_Boolean___init__ true) _lt _lf) (unstable-app _lt) :subsume :ruleset egglog.exp.array_api.array_api_ruleset)
(rewrite (egglog_exp_array_api_TupleTupleInt_if_ (egglog_exp_array_api_Boolean___init__ false) _lt _lf) (unstable-app _lf) :subsume :ruleset egglog.exp.array_api.array_api_ruleset)
(constructor _lambda_74 (egglog.builtins.UnstableFn[egglog.exp.array_api.Int,egglog.exp.array_api.Int] i64) egglog.exp.array_api.Int)
(rewrite (_lambda_74 _idx_fn _i) (unstable-app _idx_fn (egglog_exp_array_api_Int___init__ _i)) :subsume :ruleset egglog.exp.array_api.array_api_ruleset)
(rule ((= _ti (egglog_exp_array_api_TupleInt___init__ _vs))
(= _ti (egglog_exp_array_api_TupleInt___init__ _vs2))
(!= _vs _vs2))
((vec-union _vs _vs2))
:ruleset egglog.exp.array_api.array_api_ruleset )
(rewrite (egglog_exp_array_api_TupleInt_length (egglog_exp_array_api_TupleInt_fn _i2 _idx_fn)) _i2 :ruleset egglog.exp.array_api.array_api_ruleset)
(rewrite (egglog_exp_array_api_TupleInt___getitem__ (egglog_exp_array_api_TupleInt_fn _i2 _idx_fn) _i) (unstable-app _idx_fn (egglog_exp_array_api_check_index _i2 _i)) :subsume :ruleset egglog.exp.array_api.array_api_ruleset)
(rewrite (egglog_exp_array_api_TupleInt_length (egglog_exp_array_api_TupleInt___init__ _vs)) (egglog_exp_array_api_Int___init__ (vec-length _vs)) :ruleset egglog.exp.array_api.array_api_ruleset)
(rewrite (egglog_exp_array_api_TupleInt___getitem__ (egglog_exp_array_api_TupleInt___init__ _vs) (egglog_exp_array_api_Int___init__ _k)) (vec-get _vs _k) :ruleset egglog.exp.array_api.array_api_ruleset)
(rewrite (egglog_exp_array_api_TupleInt_if_ (egglog_exp_array_api_Boolean___init__ true) _lt _lf) (unstable-app _lt) :subsume :ruleset egglog.exp.array_api.array_api_ruleset)
(rewrite (egglog_exp_array_api_TupleInt_if_ (egglog_exp_array_api_Boolean___init__ false) _lt _lf) (unstable-app _lf) :subsume :ruleset egglog.exp.array_api.array_api_ruleset)
(sort egglog.builtins.UnstableFn[egglog.exp.array_api.Int,egglog.builtins.i64] (UnstableFn (i64 ) egglog.exp.array_api.Int))
(rewrite (egglog_exp_array_api_TupleInt_fn (egglog_exp_array_api_Int___init__ _k) _idx_fn) (egglog_exp_array_api_TupleInt___init__ (unstable-vec-map (unstable-fn "_lambda_74" _idx_fn) (vec-range _k))) :subsume :ruleset egglog.exp.array_api.array_api_ruleset)
(rewrite (egglog_exp_array_api_Float_from_int (egglog_exp_array_api_Int___init__ _i)) (egglog_exp_array_api_Float___init__ (to-f64 _i)) :ruleset egglog.exp.array_api.array_api_ruleset)
(rewrite (egglog_exp_array_api_Float_abs (egglog_exp_array_api_Float___init__ _f)) (egglog_exp_array_api_Float___init__ _f) :when ((>= _f 0.0)) :ruleset egglog.exp.array_api.array_api_ruleset)
(rewrite (egglog_exp_array_api_Float_abs (egglog_exp_array_api_Float___init__ _f)) (egglog_exp_array_api_Float___init__ (neg _f)) :when ((< _f 0.0)) :ruleset egglog.exp.array_api.array_api_ruleset)
(rewrite (egglog_exp_array_api_Float___init__ _f) (egglog_exp_array_api_Float_rational (bigrat (bigint (to-i64 _f)) (bigint 1))) :when ((= (to-f64 (to-i64 _f)) _f)) :ruleset egglog.exp.array_api.array_api_ruleset)
(rewrite (egglog_exp_array_api_Float_from_int (egglog_exp_array_api_Int___init__ _i)) (egglog_exp_array_api_Float_rational (bigrat (bigint _i) (bigint 1))) :ruleset egglog.exp.array_api.array_api_ruleset)
(rewrite (egglog_exp_array_api_Float_rational _r) (egglog_exp_array_api_Float___init__ (to-f64 _r)) :ruleset egglog.exp.array_api.array_api_ruleset)
(rewrite (egglog_exp_array_api_Float___add__ (egglog_exp_array_api_Float___init__ _f) (egglog_exp_array_api_Float___init__ _f2)) (egglog_exp_array_api_Float___init__ (+ _f _f2)) :ruleset egglog.exp.array_api.array_api_ruleset)
(rewrite (egglog_exp_array_api_Float___sub__ (egglog_exp_array_api_Float___init__ _f) (egglog_exp_array_api_Float___init__ _f2)) (egglog_exp_array_api_Float___init__ (- _f _f2)) :ruleset egglog.exp.array_api.array_api_ruleset)
(rewrite (egglog_exp_array_api_Float___mul__ (egglog_exp_array_api_Float___init__ _f) (egglog_exp_array_api_Float___init__ _f2)) (egglog_exp_array_api_Float___init__ (* _f _f2)) :ruleset egglog.exp.array_api.array_api_ruleset)
(rewrite (egglog_exp_array_api_Float___truediv__ (egglog_exp_array_api_Float_rational _r) (egglog_exp_array_api_Float_rational _r1)) (egglog_exp_array_api_Float_rational (/ _r _r1)) :ruleset egglog.exp.array_api.array_api_ruleset)
(rewrite (egglog_exp_array_api_Float___add__ (egglog_exp_array_api_Float_rational _r) (egglog_exp_array_api_Float_rational _r1)) (egglog_exp_array_api_Float_rational (+ _r _r1)) :ruleset egglog.exp.array_api.array_api_ruleset)
(rewrite (egglog_exp_array_api_Float___sub__ (egglog_exp_array_api_Float_rational _r) (egglog_exp_array_api_Float_rational _r1)) (egglog_exp_array_api_Float_rational (- _r _r1)) :ruleset egglog.exp.array_api.array_api_ruleset)
(rewrite (egglog_exp_array_api_Float___mul__ (egglog_exp_array_api_Float_rational _r) (egglog_exp_array_api_Float_rational _r1)) (egglog_exp_array_api_Float_rational (* _r _r1)) :ruleset egglog.exp.array_api.array_api_ruleset)
(rewrite (egglog_exp_array_api_Float___pow__ (egglog_exp_array_api_Float___init__ _f) (egglog_exp_array_api_Float___init__ _f2)) (egglog_exp_array_api_Float___init__ (^ _f _f2)) :ruleset egglog.exp.array_api.array_api_ruleset)
(rewrite (egglog_exp_array_api_Float___eq__ (egglog_exp_array_api_Float___init__ _f) (egglog_exp_array_api_Float___init__ _f)) (egglog_exp_array_api_Boolean___init__ true) :ruleset egglog.exp.array_api.array_api_ruleset)
(rewrite (egglog_exp_array_api_Float___eq__ (egglog_exp_array_api_Float___init__ _f) (egglog_exp_array_api_Float___init__ _f2)) (egglog_exp_array_api_Boolean___init__ false) :when ((!= _f _f2)) :ruleset egglog.exp.array_api.array_api_ruleset)
(constructor egglog_exp_array_api_Float___ne__ (egglog.exp.array_api.Float egglog.exp.array_api.Float) egglog.exp.array_api.Boolean)
(rewrite (egglog_exp_array_api_Float___ne__ (egglog_exp_array_api_Float___init__ _f) (egglog_exp_array_api_Float___init__ _f2)) (egglog_exp_array_api_Boolean___init__ true) :when ((!= _f _f2)) :ruleset egglog.exp.array_api.array_api_ruleset)
(rewrite (egglog_exp_array_api_Float___ne__ (egglog_exp_array_api_Float___init__ _f) (egglog_exp_array_api_Float___init__ _f)) (egglog_exp_array_api_Boolean___init__ false) :ruleset egglog.exp.array_api.array_api_ruleset)
(rewrite (egglog_exp_array_api_Float___ge__ (egglog_exp_array_api_Float___init__ _f) (egglog_exp_array_api_Float___init__ _f2)) (egglog_exp_array_api_Boolean___init__ true) :when ((>= _f _f2)) :ruleset egglog.exp.array_api.array_api_ruleset)
(rewrite (egglog_exp_array_api_Float___ge__ (egglog_exp_array_api_Float___init__ _f) (egglog_exp_array_api_Float___init__ _f2)) (egglog_exp_array_api_Boolean___init__ false) :when ((< _f _f2)) :ruleset egglog.exp.array_api.array_api_ruleset)
(rewrite (egglog_exp_array_api_Float___le__ (egglog_exp_array_api_Float___init__ _f) (egglog_exp_array_api_Float___init__ _f2)) (egglog_exp_array_api_Boolean___init__ true) :when ((<= _f _f2)) :ruleset egglog.exp.array_api.array_api_ruleset)
(rewrite (egglog_exp_array_api_Float___le__ (egglog_exp_array_api_Float___init__ _f) (egglog_exp_array_api_Float___init__ _f2)) (egglog_exp_array_api_Boolean___init__ false) :when ((> _f _f2)) :ruleset egglog.exp.array_api.array_api_ruleset)
(rewrite (egglog_exp_array_api_Float___gt__ (egglog_exp_array_api_Float___init__ _f) (egglog_exp_array_api_Float___init__ _f2)) (egglog_exp_array_api_Boolean___init__ true) :when ((> _f _f2)) :ruleset egglog.exp.array_api.array_api_ruleset)
(rewrite (egglog_exp_array_api_Float___gt__ (egglog_exp_array_api_Float___init__ _f) (egglog_exp_array_api_Float___init__ _f2)) (egglog_exp_array_api_Boolean___init__ false) :when ((<= _f _f2)) :ruleset egglog.exp.array_api.array_api_ruleset)
(rewrite (egglog_exp_array_api_Float___lt__ (egglog_exp_array_api_Float___init__ _f) (egglog_exp_array_api_Float___init__ _f2)) (egglog_exp_array_api_Boolean___init__ true) :when ((< _f _f2)) :ruleset egglog.exp.array_api.array_api_ruleset)
(rewrite (egglog_exp_array_api_Float___eq__ (egglog_exp_array_api_Float_rational _r) (egglog_exp_array_api_Float_rational _r)) (egglog_exp_array_api_Boolean___init__ true) :ruleset egglog.exp.array_api.array_api_ruleset)
(rewrite (egglog_exp_array_api_Float___eq__ (egglog_exp_array_api_Float_rational _r) (egglog_exp_array_api_Float_rational _r1)) (egglog_exp_array_api_Boolean___init__ false) :when ((!= _r _r1)) :ruleset egglog.exp.array_api.array_api_ruleset)
(constructor egglog_exp_array_api_Float___round__ (egglog.exp.array_api.Float egglog.exp.array_api.OptionalInt) egglog.exp.array_api.Float)
(rewrite (egglog_exp_array_api_Float___round__ (egglog_exp_array_api_Float_rational _r) (egglog_exp_array_api_OptionalInt_none )) (egglog_exp_array_api_Float_rational (round _r)) :ruleset egglog.exp.array_api.array_api_ruleset)
(rewrite (egglog_exp_array_api_Float___abs__ (egglog_exp_array_api_Float___init__ _f)) (egglog_exp_array_api_Float___init__ (abs _f)) :ruleset egglog.exp.array_api.array_api_ruleset)
(rule ((= (egglog_exp_array_api_Float___init__ _f) (egglog_exp_array_api_Float___init__ _f2))
(!= _f _f2))
((panic "Different floats cannot be equal"))
:ruleset egglog.exp.array_api.array_api_ruleset )
(rewrite (egglog_exp_array_api_Int___eq__ (egglog_exp_array_api_Int___init__ _i) (egglog_exp_array_api_Int___init__ _i)) (egglog_exp_array_api_Boolean___init__ true) :ruleset egglog.exp.array_api.array_api_ruleset)
(rule ((= _r (egglog_exp_array_api_Int___eq__ (egglog_exp_array_api_Int___init__ _i) (egglog_exp_array_api_Int___init__ _j)))
(!= _i _j))
((union _r (egglog_exp_array_api_Boolean___init__ false)))
:ruleset egglog.exp.array_api.array_api_ruleset )
(rewrite (egglog_exp_array_api_Int___ge__ (egglog_exp_array_api_Int___init__ _i) (egglog_exp_array_api_Int___init__ _i)) (egglog_exp_array_api_Boolean___init__ true) :ruleset egglog.exp.array_api.array_api_ruleset)
(rule ((= _r (egglog_exp_array_api_Int___ge__ (egglog_exp_array_api_Int___init__ _i) (egglog_exp_array_api_Int___init__ _j)))
(> _i _j))
((union _r (egglog_exp_array_api_Boolean___init__ true)))
:ruleset egglog.exp.array_api.array_api_ruleset )
(rule ((= _r (egglog_exp_array_api_Int___ge__ (egglog_exp_array_api_Int___init__ _i) (egglog_exp_array_api_Int___init__ _j)))
(< _i _j))
((union _r (egglog_exp_array_api_Boolean___init__ false)))
:ruleset egglog.exp.array_api.array_api_ruleset )
(rewrite (egglog_exp_array_api_Int___lt__ (egglog_exp_array_api_Int___init__ _i) (egglog_exp_array_api_Int___init__ _i)) (egglog_exp_array_api_Boolean___init__ false) :ruleset egglog.exp.array_api.array_api_ruleset)
(rule ((= _r (egglog_exp_array_api_Int___lt__ (egglog_exp_array_api_Int___init__ _i) (egglog_exp_array_api_Int___init__ _j)))
(< _i _j))
((union _r (egglog_exp_array_api_Boolean___init__ true)))
:ruleset egglog.exp.array_api.array_api_ruleset )
(rule ((= _r (egglog_exp_array_api_Int___lt__ (egglog_exp_array_api_Int___init__ _i) (egglog_exp_array_api_Int___init__ _j)))
(> _i _j))
((union _r (egglog_exp_array_api_Boolean___init__ false)))
:ruleset egglog.exp.array_api.array_api_ruleset )
(rewrite (egglog_exp_array_api_Int___gt__ (egglog_exp_array_api_Int___init__ _i) (egglog_exp_array_api_Int___init__ _i)) (egglog_exp_array_api_Boolean___init__ false) :ruleset egglog.exp.array_api.array_api_ruleset)
(rule ((= _r (egglog_exp_array_api_Int___gt__ (egglog_exp_array_api_Int___init__ _i) (egglog_exp_array_api_Int___init__ _j)))
(> _i _j))
((union _r (egglog_exp_array_api_Boolean___init__ true)))
:ruleset egglog.exp.array_api.array_api_ruleset )
(rule ((= _r (egglog_exp_array_api_Int___gt__ (egglog_exp_array_api_Int___init__ _i) (egglog_exp_array_api_Int___init__ _j)))
(< _i _j))
((union _r (egglog_exp_array_api_Boolean___init__ false)))
:ruleset egglog.exp.array_api.array_api_ruleset )
(rule ((= (egglog_exp_array_api_Int___init__ _i) (egglog_exp_array_api_Int___init__ _j))
(!= _i _j))
((panic "Real ints cannot be equal to different ints"))
:ruleset egglog.exp.array_api.array_api_ruleset )
(rewrite (egglog_exp_array_api_Int___add__ (egglog_exp_array_api_Int___init__ _i) (egglog_exp_array_api_Int___init__ _j)) (egglog_exp_array_api_Int___init__ (+ _i _j)) :ruleset egglog.exp.array_api.array_api_ruleset)
(rewrite (egglog_exp_array_api_Int___sub__ (egglog_exp_array_api_Int___init__ _i) (egglog_exp_array_api_Int___init__ _j)) (egglog_exp_array_api_Int___init__ (- _i _j)) :ruleset egglog.exp.array_api.array_api_ruleset)
(rewrite (egglog_exp_array_api_Int___mul__ (egglog_exp_array_api_Int___init__ _i) (egglog_exp_array_api_Int___init__ _j)) (egglog_exp_array_api_Int___init__ (* _i _j)) :ruleset egglog.exp.array_api.array_api_ruleset)
(rewrite (egglog_exp_array_api_Int___floordiv__ (egglog_exp_array_api_Int___init__ _i) (egglog_exp_array_api_Int___init__ _j)) (egglog_exp_array_api_Int___init__ (/ _i _j)) :ruleset egglog.exp.array_api.array_api_ruleset)
(rewrite (egglog_exp_array_api_Int___mod__ (egglog_exp_array_api_Int___init__ _i) (egglog_exp_array_api_Int___init__ _j)) (egglog_exp_array_api_Int___init__ (% _i _j)) :ruleset egglog.exp.array_api.array_api_ruleset)
(constructor egglog_exp_array_api_Int___and__ (egglog.exp.array_api.Int egglog.exp.array_api.Int) egglog.exp.array_api.Int)
(rewrite (egglog_exp_array_api_Int___and__ (egglog_exp_array_api_Int___init__ _i) (egglog_exp_array_api_Int___init__ _j)) (egglog_exp_array_api_Int___init__ (& _i _j)) :ruleset egglog.exp.array_api.array_api_ruleset)
(constructor egglog_exp_array_api_Int___or__ (egglog.exp.array_api.Int egglog.exp.array_api.Int) egglog.exp.array_api.Int)
(rewrite (egglog_exp_array_api_Int___or__ (egglog_exp_array_api_Int___init__ _i) (egglog_exp_array_api_Int___init__ _j)) (egglog_exp_array_api_Int___init__ (| _i _j)) :ruleset egglog.exp.array_api.array_api_ruleset)
(constructor egglog_exp_array_api_Int___xor__ (egglog.exp.array_api.Int egglog.exp.array_api.Int) egglog.exp.array_api.Int)
(rewrite (egglog_exp_array_api_Int___xor__ (egglog_exp_array_api_Int___init__ _i) (egglog_exp_array_api_Int___init__ _j)) (egglog_exp_array_api_Int___init__ (^ _i _j)) :ruleset egglog.exp.array_api.array_api_ruleset)
(constructor egglog_exp_array_api_Int___lshift__ (egglog.exp.array_api.Int egglog.exp.array_api.Int) egglog.exp.array_api.Int)
(rewrite (egglog_exp_array_api_Int___lshift__ (egglog_exp_array_api_Int___init__ _i) (egglog_exp_array_api_Int___init__ _j)) (egglog_exp_array_api_Int___init__ (<< _i _j)) :ruleset egglog.exp.array_api.array_api_ruleset)
(constructor egglog_exp_array_api_Int___rshift__ (egglog.exp.array_api.Int egglog.exp.array_api.Int) egglog.exp.array_api.Int)
(rewrite (egglog_exp_array_api_Int___rshift__ (egglog_exp_array_api_Int___init__ _i) (egglog_exp_array_api_Int___init__ _j)) (egglog_exp_array_api_Int___init__ (>> _i _j)) :ruleset egglog.exp.array_api.array_api_ruleset)
(constructor egglog_exp_array_api_Int___invert__ (egglog.exp.array_api.Int) egglog.exp.array_api.Int)
(rewrite (egglog_exp_array_api_Int___invert__ (egglog_exp_array_api_Int___init__ _i)) (egglog_exp_array_api_Int___init__ (not-i64 _i)) :ruleset egglog.exp.array_api.array_api_ruleset)
(rewrite (egglog_exp_array_api_Int___abs__ (egglog_exp_array_api_Int___init__ _i)) (egglog_exp_array_api_Int___init__ (abs _i)) :ruleset egglog.exp.array_api.array_api_ruleset)
(rewrite (egglog_exp_array_api_Int_if_ (egglog_exp_array_api_Boolean___init__ true) _ot _bt) (unstable-app _ot) :subsume :ruleset egglog.exp.array_api.array_api_ruleset)
(rewrite (egglog_exp_array_api_Int_if_ (egglog_exp_array_api_Boolean___init__ false) _ot _bt) (unstable-app _bt) :subsume :ruleset egglog.exp.array_api.array_api_ruleset)
(constructor egglog_exp_array_api_Int___round__ (egglog.exp.array_api.Int egglog.exp.array_api.OptionalInt) egglog.exp.array_api.Int)
(rewrite (egglog_exp_array_api_Int___round__ _o (egglog_exp_array_api_OptionalInt_none )) _o :ruleset egglog.exp.array_api.array_api_ruleset)
(rule ((= (egglog_exp_array_api_Int_NEVER ) (egglog_exp_array_api_Int___init__ _i)))
((panic "Int.NEVER cannot be equal to any real int"))
:ruleset egglog.exp.array_api.array_api_ruleset )
(rule ((= (egglog_exp_array_api_Int___init__ _i) (egglog_exp_array_api_Int___init__ _j))
(!= _i _j))
((panic "Different ints cannot be equal"))
:ruleset egglog.exp.array_api.array_api_ruleset )
(rewrite (egglog_exp_array_api_Boolean___or__ (egglog_exp_array_api_Boolean___init__ true) _x) (egglog_exp_array_api_Boolean___init__ true) :ruleset egglog.exp.array_api.array_api_ruleset)
(rewrite (egglog_exp_array_api_Boolean___or__ (egglog_exp_array_api_Boolean___init__ false) _x) _x :ruleset egglog.exp.array_api.array_api_ruleset)
(rewrite (egglog_exp_array_api_Boolean___and__ (egglog_exp_array_api_Boolean___init__ true) _x) _x :ruleset egglog.exp.array_api.array_api_ruleset)
(rewrite (egglog_exp_array_api_Boolean___and__ (egglog_exp_array_api_Boolean___init__ false) _x) (egglog_exp_array_api_Boolean___init__ false) :ruleset egglog.exp.array_api.array_api_ruleset)
(rewrite (egglog_exp_array_api_Boolean___invert__ (egglog_exp_array_api_Boolean___init__ true)) (egglog_exp_array_api_Boolean___init__ false) :ruleset egglog.exp.array_api.array_api_ruleset)
(rewrite (egglog_exp_array_api_Boolean___invert__ (egglog_exp_array_api_Boolean___init__ false)) (egglog_exp_array_api_Boolean___init__ true) :ruleset egglog.exp.array_api.array_api_ruleset)
(rule ((= (egglog_exp_array_api_Boolean___init__ false) (egglog_exp_array_api_Boolean___init__ true)))
((panic "False cannot equal True"))
:ruleset egglog.exp.array_api.array_api_ruleset )
(rewrite (egglog_exp_array_api_Boolean___eq__ _x _x) (egglog_exp_array_api_Boolean___init__ true) :ruleset egglog.exp.array_api.array_api_ruleset)
(rewrite (egglog_exp_array_api_Boolean___eq__ (egglog_exp_array_api_Boolean___init__ false) (egglog_exp_array_api_Boolean___init__ true)) (egglog_exp_array_api_Boolean___init__ false) :ruleset egglog.exp.array_api.array_api_ruleset)
(rewrite (egglog_exp_array_api_Boolean___eq__ (egglog_exp_array_api_Boolean___init__ true) (egglog_exp_array_api_Boolean___init__ false)) (egglog_exp_array_api_Boolean___init__ false) :ruleset egglog.exp.array_api.array_api_ruleset)
(rewrite (egglog_exp_array_api_Boolean_if_ (egglog_exp_array_api_Boolean___init__ true) _bt _bf) (unstable-app _bt) :subsume :ruleset egglog.exp.array_api.array_api_ruleset)
(rewrite (egglog_exp_array_api_Boolean_if_ (egglog_exp_array_api_Boolean___init__ false) _bt _bf) (unstable-app _bf) :subsume :ruleset egglog.exp.array_api.array_api_ruleset)
(rule ((= (egglog_exp_array_api_Boolean___init__ _b) (egglog_exp_array_api_Boolean___init__ _b1))
(!= _b _b1))
((panic "Different booleans cannot be equal"))
:ruleset egglog.exp.array_api.array_api_ruleset )
(run-schedule (saturate (seq (run egglog.exp.array_api.array_api_ruleset) (run))))
(extract $__expr_0 0)
(let $__expr_2 (egglog_exp_array_api_Int___eq__ (egglog_exp_array_api_NDArray_ndim (egglog_exp_array_api_asarray (egglog_exp_array_api_assume_isfinite (egglog_exp_array_api_assume_shape (egglog_exp_array_api_assume_dtype (egglog_exp_array_api_NDArray_var "X") $__expr_1) (egglog_exp_array_api_TupleInt___init__ (vec-of (egglog_exp_array_api_Int___init__ 150) (egglog_exp_array_api_Int___init__ 4))))) (egglog_exp_array_api_OptionalDType_none ) (egglog_exp_array_api_OptionalBool_none ) (egglog_exp_array_api_OptionalDevice_none ))) (egglog_exp_array_api_Int___init__ 0)))
(run-schedule (saturate (seq (run egglog.exp.array_api.array_api_ruleset) (run))))
(extract $__expr_2 0)
(let $__expr_3 (egglog_exp_array_api_Int___eq__ (egglog_exp_array_api_NDArray_ndim (egglog_exp_array_api_asarray (egglog_exp_array_api_assume_isfinite (egglog_exp_array_api_assume_shape (egglog_exp_array_api_assume_dtype (egglog_exp_array_api_NDArray_var "X") $__expr_1) (egglog_exp_array_api_TupleInt___init__ (vec-of (egglog_exp_array_api_Int___init__ 150) (egglog_exp_array_api_Int___init__ 4))))) (egglog_exp_array_api_OptionalDType_none ) (egglog_exp_array_api_OptionalBool_none ) (egglog_exp_array_api_OptionalDevice_none ))) (egglog_exp_array_api_Int___init__ 1)))
(run-schedule (saturate (seq (run egglog.exp.array_api.array_api_ruleset) (run))))
(extract $__expr_3 0)
(let $__expr_4 (egglog_exp_array_api_Int___ge__ (egglog_exp_array_api_NDArray_ndim (egglog_exp_array_api_asarray (egglog_exp_array_api_assume_isfinite (egglog_exp_array_api_assume_shape (egglog_exp_array_api_assume_dtype (egglog_exp_array_api_NDArray_var "X") $__expr_1) (egglog_exp_array_api_TupleInt___init__ (vec-of (egglog_exp_array_api_Int___init__ 150) (egglog_exp_array_api_Int___init__ 4))))) (egglog_exp_array_api_OptionalDType_none ) (egglog_exp_array_api_OptionalBool_none ) (egglog_exp_array_api_OptionalDevice_none ))) (egglog_exp_array_api_Int___init__ 3)))
(run-schedule (saturate (seq (run egglog.exp.array_api.array_api_ruleset) (run))))
(extract $__expr_4 0)
(let $__expr_6 (egglog_exp_array_api_OptionalDevice_none ))
(let $__expr_5 (egglog_exp_array_api_isdtype (egglog_exp_array_api_NDArray_dtype (egglog_exp_array_api_asarray (egglog_exp_array_api_asarray (egglog_exp_array_api_assume_isfinite (egglog_exp_array_api_assume_shape (egglog_exp_array_api_assume_dtype (egglog_exp_array_api_NDArray_var "X") $__expr_1) (egglog_exp_array_api_TupleInt___init__ (vec-of (egglog_exp_array_api_Int___init__ 150) (egglog_exp_array_api_Int___init__ 4))))) (egglog_exp_array_api_OptionalDType_none ) (egglog_exp_array_api_OptionalBool_none ) (egglog_exp_array_api_OptionalDevice_none )) (egglog_exp_array_api_OptionalDType_none ) (egglog_exp_array_api_OptionalBool_none ) $__expr_6)) (egglog_exp_array_api_IsDtypeKind___or__ (egglog_exp_array_api_IsDtypeKind_string "real floating") (egglog_exp_array_api_IsDtypeKind___or__ (egglog_exp_array_api_IsDtypeKind_string "complex floating") (egglog_exp_array_api_IsDtypeKind_NULL )))))
(run-schedule (saturate (seq (run egglog.exp.array_api.array_api_ruleset) (run))))
(extract $__expr_5 0)
(let $__expr_8 (egglog_exp_array_api_OptionalDType_none ))
(let $__expr_7 (egglog_exp_array_api_Value_to_bool (egglog_exp_array_api_NDArray_index (egglog_exp_array_api_isfinite (egglog_exp_array_api_sum (egglog_exp_array_api_asarray (egglog_exp_array_api_asarray (egglog_exp_array_api_assume_isfinite (egglog_exp_array_api_assume_shape (egglog_exp_array_api_assume_dtype (egglog_exp_array_api_NDArray_var "X") $__expr_1) (egglog_exp_array_api_TupleInt___init__ (vec-of (egglog_exp_array_api_Int___init__ 150) (egglog_exp_array_api_Int___init__ 4))))) (egglog_exp_array_api_OptionalDType_none ) (egglog_exp_array_api_OptionalBool_none ) (egglog_exp_array_api_OptionalDevice_none )) (egglog_exp_array_api_OptionalDType_none ) (egglog_exp_array_api_OptionalBool_none ) $__expr_6) (egglog_exp_array_api_OptionalIntOrTuple_none ))) (egglog_exp_array_api_TupleInt___init__ (vec-empty )))))
(run-schedule (saturate (seq (run egglog.exp.array_api.array_api_ruleset) (run))))
(extract $__expr_7 0)
(let $__expr_9 (egglog_exp_array_api_TupleInt_length (egglog_exp_array_api_NDArray_shape (egglog_exp_array_api_asarray (egglog_exp_array_api_assume_isfinite (egglog_exp_array_api_assume_shape (egglog_exp_array_api_assume_dtype (egglog_exp_array_api_NDArray_var "X") $__expr_1) (egglog_exp_array_api_TupleInt___init__ (vec-of (egglog_exp_array_api_Int___init__ 150) (egglog_exp_array_api_Int___init__ 4))))) (egglog_exp_array_api_OptionalDType_none ) (egglog_exp_array_api_OptionalBool_none ) (egglog_exp_array_api_OptionalDevice_none )))))
(run-schedule (saturate (seq (run egglog.exp.array_api.array_api_ruleset) (run))))
(extract $__expr_9 0)
(let $__expr_10 (egglog_exp_array_api_Int___lt__ (egglog_exp_array_api_TupleInt___getitem__ (egglog_exp_array_api_NDArray_shape (egglog_exp_array_api_asarray (egglog_exp_array_api_assume_isfinite (egglog_exp_array_api_assume_shape (egglog_exp_array_api_assume_dtype (egglog_exp_array_api_NDArray_var "X") $__expr_1) (egglog_exp_array_api_TupleInt___init__ (vec-of (egglog_exp_array_api_Int___init__ 150) (egglog_exp_array_api_Int___init__ 4))))) (egglog_exp_array_api_OptionalDType_none ) (egglog_exp_array_api_OptionalBool_none ) (egglog_exp_array_api_OptionalDevice_none ))) (egglog_exp_array_api_Int___init__ 0)) (egglog_exp_array_api_Int___init__ 2)))
(run-schedule (saturate (seq (run egglog.exp.array_api.array_api_ruleset) (run))))
(extract $__expr_10 0)
(let $__expr_11 (egglog_exp_array_api_Int___eq__ (egglog_exp_array_api_NDArray_ndim (egglog_exp_array_api_asarray (egglog_exp_array_api_assume_isfinite (egglog_exp_array_api_assume_shape (egglog_exp_array_api_assume_dtype (egglog_exp_array_api_NDArray_var "X") $__expr_1) (egglog_exp_array_api_TupleInt___init__ (vec-of (egglog_exp_array_api_Int___init__ 150) (egglog_exp_array_api_Int___init__ 4))))) (egglog_exp_array_api_OptionalDType_none ) (egglog_exp_array_api_OptionalBool_none ) (egglog_exp_array_api_OptionalDevice_none ))) (egglog_exp_array_api_Int___init__ 2)))
(run-schedule (saturate (seq (run egglog.exp.array_api.array_api_ruleset) (run))))
(extract $__expr_11 0)
(let $__expr_13 (egglog_exp_array_api_Int___init__ 1))
(let $__expr_12 (egglog_exp_array_api_Int___lt__ (egglog_exp_array_api_TupleInt___getitem__ (egglog_exp_array_api_NDArray_shape (egglog_exp_array_api_asarray (egglog_exp_array_api_assume_isfinite (egglog_exp_array_api_assume_shape (egglog_exp_array_api_assume_dtype (egglog_exp_array_api_NDArray_var "X") $__expr_1) (egglog_exp_array_api_TupleInt___init__ (vec-of (egglog_exp_array_api_Int___init__ 150) (egglog_exp_array_api_Int___init__ 4))))) (egglog_exp_array_api_OptionalDType_none ) (egglog_exp_array_api_OptionalBool_none ) (egglog_exp_array_api_OptionalDevice_none ))) $__expr_13) $__expr_13))
(run-schedule (saturate (seq (run egglog.exp.array_api.array_api_ruleset) (run))))
(extract $__expr_12 0)
(let $__expr_14 (egglog_exp_array_api_Int___ge__ (egglog_exp_array_api_NDArray_ndim (egglog_exp_array_api_asarray (egglog_exp_array_api_assume_value_one_of (egglog_exp_array_api_assume_shape (egglog_exp_array_api_assume_dtype (egglog_exp_array_api_NDArray_var "y") (egglog_exp_array_api_DType_int64 )) (egglog_exp_array_api_TupleInt___init__ (vec-of (egglog_exp_array_api_Int___init__ 150)))) (egglog_exp_array_api_TupleValue___init__ (vec-of (egglog_exp_array_api_Value_from_int (egglog_exp_array_api_Int___init__ 0)) (egglog_exp_array_api_Value_from_int (egglog_exp_array_api_Int___init__ 1)) (egglog_exp_array_api_Value_from_int (egglog_exp_array_api_Int___init__ 2))))) $__expr_8 (egglog_exp_array_api_OptionalBool_none ) $__expr_6)) (egglog_exp_array_api_Int___init__ 3)))
(run-schedule (saturate (seq (run egglog.exp.array_api.array_api_ruleset) (run))))
(extract $__expr_14 0)
(let $__expr_16 (egglog_exp_array_api_Int___init__ 2))
(let $__expr_15 (egglog_exp_array_api_Int___eq__ (egglog_exp_array_api_NDArray_ndim (egglog_exp_array_api_asarray (egglog_exp_array_api_assume_value_one_of (egglog_exp_array_api_assume_shape (egglog_exp_array_api_assume_dtype (egglog_exp_array_api_NDArray_var "y") (egglog_exp_array_api_DType_int64 )) (egglog_exp_array_api_TupleInt___init__ (vec-of (egglog_exp_array_api_Int___init__ 150)))) (egglog_exp_array_api_TupleValue___init__ (vec-of (egglog_exp_array_api_Value_from_int (egglog_exp_array_api_Int___init__ 0)) (egglog_exp_array_api_Value_from_int (egglog_exp_array_api_Int___init__ 1)) (egglog_exp_array_api_Value_from_int (egglog_exp_array_api_Int___init__ 2))))) $__expr_8 (egglog_exp_array_api_OptionalBool_none ) $__expr_6)) $__expr_16))
(run-schedule (saturate (seq (run egglog.exp.array_api.array_api_ruleset) (run))))
(extract $__expr_15 0)
(let $__expr_17 (egglog_exp_array_api_TupleInt_length (egglog_exp_array_api_NDArray_shape (egglog_exp_array_api_asarray (egglog_exp_array_api_assume_value_one_of (egglog_exp_array_api_assume_shape (egglog_exp_array_api_assume_dtype (egglog_exp_array_api_NDArray_var "y") (egglog_exp_array_api_DType_int64 )) (egglog_exp_array_api_TupleInt___init__ (vec-of (egglog_exp_array_api_Int___init__ 150)))) (egglog_exp_array_api_TupleValue___init__ (vec-of (egglog_exp_array_api_Value_from_int (egglog_exp_array_api_Int___init__ 0)) (egglog_exp_array_api_Value_from_int (egglog_exp_array_api_Int___init__ 1)) (egglog_exp_array_api_Value_from_int (egglog_exp_array_api_Int___init__ 2))))) $__expr_8 (egglog_exp_array_api_OptionalBool_none ) $__expr_6))))
(run-schedule (saturate (seq (run egglog.exp.array_api.array_api_ruleset) (run))))
(extract $__expr_17 0)
(let $__expr_19 (egglog_exp_array_api_OptionalBool_none ))
(constructor egglog_exp_array_api_reshape (egglog.exp.array_api.NDArray egglog.exp.array_api.TupleInt egglog.exp.array_api.OptionalBool) egglog.exp.array_api.NDArray)
(let $__expr_18 (egglog_exp_array_api_isdtype (egglog_exp_array_api_NDArray_dtype (egglog_exp_array_api_asarray (egglog_exp_array_api_asarray (egglog_exp_array_api_reshape (egglog_exp_array_api_asarray (egglog_exp_array_api_assume_value_one_of (egglog_exp_array_api_assume_shape (egglog_exp_array_api_assume_dtype (egglog_exp_array_api_NDArray_var "y") (egglog_exp_array_api_DType_int64 )) (egglog_exp_array_api_TupleInt___init__ (vec-of (egglog_exp_array_api_Int___init__ 150)))) (egglog_exp_array_api_TupleValue___init__ (vec-of (egglog_exp_array_api_Value_from_int (egglog_exp_array_api_Int___init__ 0)) (egglog_exp_array_api_Value_from_int (egglog_exp_array_api_Int___init__ 1)) (egglog_exp_array_api_Value_from_int (egglog_exp_array_api_Int___init__ 2))))) $__expr_8 (egglog_exp_array_api_OptionalBool_none ) $__expr_6) (egglog_exp_array_api_TupleInt___init__ (vec-of (egglog_exp_array_api_Int___init__ -1))) $__expr_19) $__expr_8 $__expr_19 $__expr_6) $__expr_8 $__expr_19 $__expr_6)) (egglog_exp_array_api_IsDtypeKind___or__ (egglog_exp_array_api_IsDtypeKind_string "real floating") (egglog_exp_array_api_IsDtypeKind___or__ (egglog_exp_array_api_IsDtypeKind_string "complex floating") (egglog_exp_array_api_IsDtypeKind_NULL )))))
(constructor _lambda_75 (egglog.exp.array_api.Int) egglog.exp.array_api.Boolean)
(rewrite (_lambda_75 _d) (egglog_exp_array_api_Boolean___invert__ (egglog_exp_array_api_Int___eq__ _d (egglog_exp_array_api_Int___init__ -1))) :subsume :ruleset egglog.exp.array_api.array_api_ruleset)
(constructor _lambda_76 (egglog.exp.array_api.TupleInt egglog.exp.array_api.TupleInt) egglog.exp.array_api.Int)
(rewrite (_lambda_76 _original_shape _shape) (egglog_exp_array_api_Int___floordiv__ (egglog_exp_array_api_TupleInt_product _original_shape) (egglog_exp_array_api_TupleInt_product (egglog_exp_array_api_TupleInt_filter _shape (unstable-fn "_lambda_75")))) :subsume :ruleset egglog.exp.array_api.array_api_ruleset)
(constructor _lambda_77 (egglog.exp.array_api.Int) egglog.exp.array_api.Int)
(rewrite (_lambda_77 _d) _d :subsume :ruleset egglog.exp.array_api.array_api_ruleset)
(constructor _lambda_78 (egglog.exp.array_api.TupleInt egglog.exp.array_api.TupleInt egglog.exp.array_api.Int) egglog.exp.array_api.Int)
(rewrite (_lambda_78 _original_shape _shape _d) (egglog_exp_array_api_Int_if_ (egglog_exp_array_api_Int___eq__ _d (egglog_exp_array_api_Int___init__ -1)) (unstable-fn "_lambda_76" _original_shape _shape) (unstable-fn "_lambda_77" _d)) :subsume :ruleset egglog.exp.array_api.array_api_ruleset)
(constructor egglog_exp_array_api_normalize_reshape_shape (egglog.exp.array_api.TupleInt egglog.exp.array_api.TupleInt) egglog.exp.array_api.TupleInt :unextractable)
(rewrite (egglog_exp_array_api_normalize_reshape_shape _original_shape _shape) (egglog_exp_array_api_TupleInt_map _shape (unstable-fn "_lambda_78" _original_shape _shape)) :ruleset egglog.exp.array_api.array_api_ruleset)
(constructor _lambda_79 (egglog.exp.array_api.NDArray) egglog.exp.array_api.NDArray)
(rewrite (_lambda_79 _x) _x :subsume :ruleset egglog.exp.array_api.array_api_ruleset)
(constructor _lambda_80 (egglog.exp.array_api.TupleInt egglog.exp.array_api.TupleInt egglog.exp.array_api.Int egglog.exp.array_api.Int) egglog.exp.array_api.Int)
(rewrite (_lambda_80 _shape _index _res _i) (egglog_exp_array_api_Int___add__ (egglog_exp_array_api_Int___mul__ _res (egglog_exp_array_api_TupleInt___getitem__ _shape _i)) (egglog_exp_array_api_TupleInt___getitem__ _index _i)) :subsume :ruleset egglog.exp.array_api.array_api_ruleset)
(constructor egglog_exp_array_api_ravel_index (egglog.exp.array_api.TupleInt egglog.exp.array_api.TupleInt) egglog.exp.array_api.Int)
(rewrite (egglog_exp_array_api_ravel_index _index _shape) (egglog_exp_array_api_TupleInt_foldl (egglog_exp_array_api_TupleInt_range (egglog_exp_array_api_TupleInt_length _shape)) (unstable-fn "_lambda_80" _shape _index) (egglog_exp_array_api_Int___init__ 0)) :ruleset egglog.exp.array_api.array_api_ruleset)
(constructor _lambda_81 (egglog.exp.array_api.TupleInt egglog.exp.array_api.Int) egglog.exp.array_api.TupleInt)
(rewrite (_lambda_81 _acc _dim) (egglog_exp_array_api_TupleInt_append (egglog_exp_array_api_TupleInt_append (egglog_exp_array_api_TupleInt_drop_last _acc) (egglog_exp_array_api_Int___mod__ (egglog_exp_array_api_TupleInt_last _acc) _dim)) (egglog_exp_array_api_Int___floordiv__ (egglog_exp_array_api_TupleInt_last _acc) _dim)) :subsume :ruleset egglog.exp.array_api.array_api_ruleset)
(constructor egglog_exp_array_api_unravel_index (egglog.exp.array_api.Int egglog.exp.array_api.TupleInt) egglog.exp.array_api.TupleInt)
(rewrite (egglog_exp_array_api_unravel_index _flat_index _shape) (egglog_exp_array_api_TupleInt_reverse (egglog_exp_array_api_TupleInt_drop_last (egglog_exp_array_api_TupleInt_foldl_tuple_int (egglog_exp_array_api_TupleInt_reverse _shape) (unstable-fn "_lambda_81") (egglog_exp_array_api_TupleInt___init__ (vec-of _flat_index))))) :ruleset egglog.exp.array_api.array_api_ruleset)
(constructor _lambda_82 (egglog.exp.array_api.NDArray egglog.exp.array_api.TupleInt egglog.exp.array_api.TupleInt) egglog.exp.array_api.Value)
(rewrite (_lambda_82 _x _shape _idx) (egglog_exp_array_api_NDArray_index _x (egglog_exp_array_api_unravel_index (egglog_exp_array_api_ravel_index _idx (egglog_exp_array_api_normalize_reshape_shape (egglog_exp_array_api_NDArray_shape _x) _shape)) (egglog_exp_array_api_NDArray_shape _x))) :subsume :ruleset egglog.exp.array_api.array_api_ruleset)
(constructor _lambda_83 (egglog.exp.array_api.NDArray egglog.exp.array_api.TupleInt) egglog.exp.array_api.NDArray)
(rewrite (_lambda_83 _x _shape) (egglog_exp_array_api_NDArray_fn (egglog_exp_array_api_normalize_reshape_shape (egglog_exp_array_api_NDArray_shape _x) _shape) (egglog_exp_array_api_NDArray_dtype _x) (unstable-fn "_lambda_82" _x _shape)) :subsume :ruleset egglog.exp.array_api.array_api_ruleset)
(rewrite (egglog_exp_array_api_reshape _x _shape _copy) (egglog_exp_array_api_NDArray_if_ (egglog_exp_array_api_TupleInt___eq__ (egglog_exp_array_api_normalize_reshape_shape (egglog_exp_array_api_NDArray_shape _x) _shape) (egglog_exp_array_api_NDArray_shape _x)) (unstable-fn "_lambda_79" _x) (unstable-fn "_lambda_83" _x _shape)) :ruleset egglog.exp.array_api.array_api_ruleset)
(run-schedule (saturate (seq (run egglog.exp.array_api.array_api_ruleset) (run))))
(extract $__expr_18 0)
(run-schedule (saturate (seq (run egglog.exp.array_api.array_api_ruleset) (run))))
(extract $__expr_9 0)
(let $__expr_20 (egglog_exp_array_api_TupleInt_length (egglog_exp_array_api_NDArray_shape (egglog_exp_array_api_asarray (egglog_exp_array_api_reshape (egglog_exp_array_api_asarray (egglog_exp_array_api_assume_value_one_of (egglog_exp_array_api_assume_shape (egglog_exp_array_api_assume_dtype (egglog_exp_array_api_NDArray_var "y") (egglog_exp_array_api_DType_int64 )) (egglog_exp_array_api_TupleInt___init__ (vec-of (egglog_exp_array_api_Int___init__ 150)))) (egglog_exp_array_api_TupleValue___init__ (vec-of (egglog_exp_array_api_Value_from_int (egglog_exp_array_api_Int___init__ 0)) (egglog_exp_array_api_Value_from_int (egglog_exp_array_api_Int___init__ 1)) (egglog_exp_array_api_Value_from_int (egglog_exp_array_api_Int___init__ 2))))) $__expr_8 (egglog_exp_array_api_OptionalBool_none ) $__expr_6) (egglog_exp_array_api_TupleInt___init__ (vec-of (egglog_exp_array_api_Int___init__ -1))) $__expr_19) $__expr_8 $__expr_19 $__expr_6))))
(run-schedule (saturate (seq (run egglog.exp.array_api.array_api_ruleset) (run))))
(extract $__expr_20 0)
(let $__expr_21 (egglog_exp_array_api_TupleInt___getitem__ (egglog_exp_array_api_NDArray_shape (egglog_exp_array_api_asarray (egglog_exp_array_api_assume_isfinite (egglog_exp_array_api_assume_shape (egglog_exp_array_api_assume_dtype (egglog_exp_array_api_NDArray_var "X") $__expr_1) (egglog_exp_array_api_TupleInt___init__ (vec-of (egglog_exp_array_api_Int___init__ 150) (egglog_exp_array_api_Int___init__ 4))))) (egglog_exp_array_api_OptionalDType_none ) (egglog_exp_array_api_OptionalBool_none ) (egglog_exp_array_api_OptionalDevice_none ))) (egglog_exp_array_api_Int___init__ 0)))
(run-schedule (saturate (seq (run egglog.exp.array_api.array_api_ruleset) (run))))
(extract $__expr_21 0)
(let $__expr_23 (egglog_exp_array_api_Int___init__ 0))
(let $__expr_22 (egglog_exp_array_api_TupleInt___getitem__ (egglog_exp_array_api_NDArray_shape (egglog_exp_array_api_asarray (egglog_exp_array_api_reshape (egglog_exp_array_api_asarray (egglog_exp_array_api_assume_value_one_of (egglog_exp_array_api_assume_shape (egglog_exp_array_api_assume_dtype (egglog_exp_array_api_NDArray_var "y") (egglog_exp_array_api_DType_int64 )) (egglog_exp_array_api_TupleInt___init__ (vec-of (egglog_exp_array_api_Int___init__ 150)))) (egglog_exp_array_api_TupleValue___init__ (vec-of (egglog_exp_array_api_Value_from_int (egglog_exp_array_api_Int___init__ 0)) (egglog_exp_array_api_Value_from_int (egglog_exp_array_api_Int___init__ 1)) (egglog_exp_array_api_Value_from_int (egglog_exp_array_api_Int___init__ 2))))) $__expr_8 (egglog_exp_array_api_OptionalBool_none ) $__expr_6) (egglog_exp_array_api_TupleInt___init__ (vec-of (egglog_exp_array_api_Int___init__ -1))) $__expr_19) $__expr_8 $__expr_19 $__expr_6)) $__expr_23))
(run-schedule (saturate (seq (run egglog.exp.array_api.array_api_ruleset) (run))))
(extract $__expr_22 0)
(let $__expr_25 (egglog_exp_array_api_Int___init__ 150))
(let $__expr_24 (egglog_exp_array_api_Int___eq__ $__expr_21 $__expr_22))
(run-schedule (saturate (seq (run egglog.exp.array_api.array_api_ruleset) (run))))
(extract $__expr_24 0)
(run-schedule (saturate (seq (run egglog.exp.array_api.array_api_ruleset) (run))))
(extract $__expr_9 0)
(let $__expr_26 (egglog_exp_array_api_Int___eq__ (egglog_exp_array_api_NDArray_ndim (egglog_exp_array_api_asarray (egglog_exp_array_api_asarray (egglog_exp_array_api_reshape (egglog_exp_array_api_asarray (egglog_exp_array_api_assume_value_one_of (egglog_exp_array_api_assume_shape (egglog_exp_array_api_assume_dtype (egglog_exp_array_api_NDArray_var "y") (egglog_exp_array_api_DType_int64 )) (egglog_exp_array_api_TupleInt___init__ (vec-of (egglog_exp_array_api_Int___init__ 150)))) (egglog_exp_array_api_TupleValue___init__ (vec-of (egglog_exp_array_api_Value_from_int (egglog_exp_array_api_Int___init__ 0)) (egglog_exp_array_api_Value_from_int (egglog_exp_array_api_Int___init__ 1)) (egglog_exp_array_api_Value_from_int (egglog_exp_array_api_Int___init__ 2))))) $__expr_8 (egglog_exp_array_api_OptionalBool_none ) $__expr_6) (egglog_exp_array_api_TupleInt___init__ (vec-of (egglog_exp_array_api_Int___init__ -1))) $__expr_19) $__expr_8 $__expr_19 $__expr_6) $__expr_8 $__expr_19 $__expr_6)) $__expr_16))
(run-schedule (saturate (seq (run egglog.exp.array_api.array_api_ruleset) (run))))
(extract $__expr_26 0)
(let $__expr_27 (egglog_exp_array_api_Int___eq__ (egglog_exp_array_api_NDArray_ndim (egglog_exp_array_api_asarray (egglog_exp_array_api_asarray (egglog_exp_array_api_reshape (egglog_exp_array_api_asarray (egglog_exp_array_api_assume_value_one_of (egglog_exp_array_api_assume_shape (egglog_exp_array_api_assume_dtype (egglog_exp_array_api_NDArray_var "y") (egglog_exp_array_api_DType_int64 )) (egglog_exp_array_api_TupleInt___init__ (vec-of (egglog_exp_array_api_Int___init__ 150)))) (egglog_exp_array_api_TupleValue___init__ (vec-of (egglog_exp_array_api_Value_from_int (egglog_exp_array_api_Int___init__ 0)) (egglog_exp_array_api_Value_from_int (egglog_exp_array_api_Int___init__ 1)) (egglog_exp_array_api_Value_from_int (egglog_exp_array_api_Int___init__ 2))))) $__expr_8 (egglog_exp_array_api_OptionalBool_none ) $__expr_6) (egglog_exp_array_api_TupleInt___init__ (vec-of (egglog_exp_array_api_Int___init__ -1))) $__expr_19) $__expr_8 $__expr_19 $__expr_6) $__expr_8 $__expr_19 $__expr_6)) $__expr_13))
(run-schedule (saturate (seq (run egglog.exp.array_api.array_api_ruleset) (run))))
(extract $__expr_27 0)
(let $__expr_28 (egglog_exp_array_api_NDArray_shape (egglog_exp_array_api_asarray (egglog_exp_array_api_asarray (egglog_exp_array_api_reshape (egglog_exp_array_api_asarray (egglog_exp_array_api_assume_value_one_of (egglog_exp_array_api_assume_shape (egglog_exp_array_api_assume_dtype (egglog_exp_array_api_NDArray_var "y") (egglog_exp_array_api_DType_int64 )) (egglog_exp_array_api_TupleInt___init__ (vec-of (egglog_exp_array_api_Int___init__ 150)))) (egglog_exp_array_api_TupleValue___init__ (vec-of (egglog_exp_array_api_Value_from_int (egglog_exp_array_api_Int___init__ 0)) (egglog_exp_array_api_Value_from_int (egglog_exp_array_api_Int___init__ 1)) (egglog_exp_array_api_Value_from_int (egglog_exp_array_api_Int___init__ 2))))) $__expr_8 (egglog_exp_array_api_OptionalBool_none ) $__expr_6) (egglog_exp_array_api_TupleInt___init__ (vec-of (egglog_exp_array_api_Int___init__ -1))) $__expr_19) $__expr_8 $__expr_19 $__expr_6) $__expr_8 $__expr_19 $__expr_6)))
(run-schedule (saturate (seq (run egglog.exp.array_api.array_api_ruleset) (run))))
(extract $__expr_28 0)
(run-schedule (saturate (seq (run egglog.exp.array_api.array_api_ruleset) (run))))
(extract $__expr_25 0)
(let $__expr_29 (egglog_exp_array_api_DType___eq__ (egglog_exp_array_api_NDArray_dtype (egglog_exp_array_api_asarray (egglog_exp_array_api_asarray (egglog_exp_array_api_reshape (egglog_exp_array_api_asarray (egglog_exp_array_api_assume_value_one_of (egglog_exp_array_api_assume_shape (egglog_exp_array_api_assume_dtype (egglog_exp_array_api_NDArray_var "y") (egglog_exp_array_api_DType_int64 )) (egglog_exp_array_api_TupleInt___init__ (vec-of (egglog_exp_array_api_Int___init__ 150)))) (egglog_exp_array_api_TupleValue___init__ (vec-of (egglog_exp_array_api_Value_from_int (egglog_exp_array_api_Int___init__ 0)) (egglog_exp_array_api_Value_from_int (egglog_exp_array_api_Int___init__ 1)) (egglog_exp_array_api_Value_from_int (egglog_exp_array_api_Int___init__ 2))))) $__expr_8 (egglog_exp_array_api_OptionalBool_none ) $__expr_6) (egglog_exp_array_api_TupleInt___init__ (vec-of (egglog_exp_array_api_Int___init__ -1))) $__expr_19) $__expr_8 $__expr_19 $__expr_6) $__expr_8 $__expr_19 $__expr_6)) (egglog_exp_array_api_DType_object )))
(run-schedule (saturate (seq (run egglog.exp.array_api.array_api_ruleset) (run))))
(extract $__expr_29 0)
(run-schedule (saturate (seq (run egglog.exp.array_api.array_api_ruleset) (run))))
(extract $__expr_26 0)
(let $__expr_30 (egglog_exp_array_api_isdtype (egglog_exp_array_api_NDArray_dtype (egglog_exp_array_api_asarray (egglog_exp_array_api_asarray (egglog_exp_array_api_reshape (egglog_exp_array_api_asarray (egglog_exp_array_api_assume_value_one_of (egglog_exp_array_api_assume_shape (egglog_exp_array_api_assume_dtype (egglog_exp_array_api_NDArray_var "y") (egglog_exp_array_api_DType_int64 )) (egglog_exp_array_api_TupleInt___init__ (vec-of (egglog_exp_array_api_Int___init__ 150)))) (egglog_exp_array_api_TupleValue___init__ (vec-of (egglog_exp_array_api_Value_from_int (egglog_exp_array_api_Int___init__ 0)) (egglog_exp_array_api_Value_from_int (egglog_exp_array_api_Int___init__ 1)) (egglog_exp_array_api_Value_from_int (egglog_exp_array_api_Int___init__ 2))))) $__expr_8 (egglog_exp_array_api_OptionalBool_none ) $__expr_6) (egglog_exp_array_api_TupleInt___init__ (vec-of (egglog_exp_array_api_Int___init__ -1))) $__expr_19) $__expr_8 $__expr_19 $__expr_6) $__expr_8 $__expr_19 $__expr_6)) (egglog_exp_array_api_IsDtypeKind_string "real floating")))
(run-schedule (saturate (seq (run egglog.exp.array_api.array_api_ruleset) (run))))
(extract $__expr_30 0)
(let $__expr_31 (egglog_exp_array_api_Int___gt__ (egglog_exp_array_api_TupleInt___getitem__ $__expr_28 $__expr_23) (egglog_exp_array_api_Int___init__ 20)))
(run-schedule (saturate (seq (run egglog.exp.array_api.array_api_ruleset) (run))))
(extract $__expr_31 0)
(let $__expr_33 (egglog_exp_array_api_asarray (egglog_exp_array_api_asarray (egglog_exp_array_api_reshape (egglog_exp_array_api_asarray (egglog_exp_array_api_assume_value_one_of (egglog_exp_array_api_assume_shape (egglog_exp_array_api_assume_dtype (egglog_exp_array_api_NDArray_var "y") (egglog_exp_array_api_DType_int64 )) (egglog_exp_array_api_TupleInt___init__ (vec-of (egglog_exp_array_api_Int___init__ 150)))) (egglog_exp_array_api_TupleValue___init__ (vec-of (egglog_exp_array_api_Value_from_int (egglog_exp_array_api_Int___init__ 0)) (egglog_exp_array_api_Value_from_int (egglog_exp_array_api_Int___init__ 1)) (egglog_exp_array_api_Value_from_int (egglog_exp_array_api_Int___init__ 2))))) $__expr_8 (egglog_exp_array_api_OptionalBool_none ) $__expr_6) (egglog_exp_array_api_TupleInt___init__ (vec-of (egglog_exp_array_api_Int___init__ -1))) $__expr_19) $__expr_8 $__expr_19 $__expr_6) $__expr_8 $__expr_19 $__expr_6))
(let $__expr_32 (egglog_exp_array_api_Int___gt__ (egglog_exp_array_api_TupleInt___getitem__ $__expr_28 $__expr_23) (egglog_exp_array_api_TupleInt___getitem__ (egglog_exp_array_api_NDArray_shape (egglog_exp_array_api_unique_values $__expr_33)) $__expr_23)))
(run-schedule (saturate (seq (run egglog.exp.array_api.array_api_ruleset) (run))))
(extract $__expr_32 0)
(let $__expr_34 (egglog_exp_array_api_Float___gt__ (egglog_exp_array_api_Float_from_int (egglog_exp_array_api_TupleInt___getitem__ (egglog_exp_array_api_NDArray_shape (egglog_exp_array_api_unique_values $__expr_33)) $__expr_23)) (egglog_exp_array_api_Float___round__ (egglog_exp_array_api_Float___mul__ (egglog_exp_array_api_Float___init__ 0.5) (egglog_exp_array_api_Float_from_int (egglog_exp_array_api_TupleInt___getitem__ $__expr_28 $__expr_23))) (egglog_exp_array_api_OptionalInt_none ))))
(run-schedule (saturate (seq (run egglog.exp.array_api.array_api_ruleset) (run))))
(extract $__expr_34 0)
(let $__expr_35 (egglog_exp_array_api_Int___gt__ (egglog_exp_array_api_TupleInt___getitem__ (egglog_exp_array_api_NDArray_shape (egglog_exp_array_api_unique_values $__expr_33)) $__expr_23) $__expr_16))
(run-schedule (saturate (seq (run egglog.exp.array_api.array_api_ruleset) (run))))
(extract $__expr_35 0)
(let $__expr_36 (egglog_exp_array_api_NDArray_shape (egglog_exp_array_api_asarray (egglog_exp_array_api_assume_isfinite (egglog_exp_array_api_assume_shape (egglog_exp_array_api_assume_dtype (egglog_exp_array_api_NDArray_var "X") $__expr_1) (egglog_exp_array_api_TupleInt___init__ (vec-of (egglog_exp_array_api_Int___init__ 150) (egglog_exp_array_api_Int___init__ 4))))) (egglog_exp_array_api_OptionalDType_none ) (egglog_exp_array_api_OptionalBool_none ) (egglog_exp_array_api_OptionalDevice_none ))))
(run-schedule (saturate (seq (run egglog.exp.array_api.array_api_ruleset) (run))))
(extract $__expr_36 0)
(let $__expr_37 (egglog_exp_array_api_Int___eq__ $__expr_25 (egglog_exp_array_api_TupleInt___getitem__ (egglog_exp_array_api_NDArray_shape (egglog_exp_array_api_unique_values (egglog_exp_array_api_concat (egglog_exp_array_api_TupleNDArray___init__ (vec-of (egglog_exp_array_api_unique_values $__expr_33))) (egglog_exp_array_api_OptionalInt_none )))) $__expr_23)))
(run-schedule (saturate (seq (run egglog.exp.array_api.array_api_ruleset) (run))))
(extract $__expr_37 0)
(constructor egglog_exp_array_api_unique_counts (egglog.exp.array_api.NDArray) egglog.exp.array_api.TupleNDArray :unextractable)
(let $__expr_38 (egglog_exp_array_api_unique_counts (egglog_exp_array_api_asarray (egglog_exp_array_api_reshape (egglog_exp_array_api_asarray (egglog_exp_array_api_assume_value_one_of (egglog_exp_array_api_assume_shape (egglog_exp_array_api_assume_dtype (egglog_exp_array_api_NDArray_var "y") (egglog_exp_array_api_DType_int64 )) (egglog_exp_array_api_TupleInt___init__ (vec-of (egglog_exp_array_api_Int___init__ 150)))) (egglog_exp_array_api_TupleValue___init__ (vec-of (egglog_exp_array_api_Value_from_int (egglog_exp_array_api_Int___init__ 0)) (egglog_exp_array_api_Value_from_int (egglog_exp_array_api_Int___init__ 1)) (egglog_exp_array_api_Value_from_int (egglog_exp_array_api_Int___init__ 2))))) $__expr_8 (egglog_exp_array_api_OptionalBool_none ) $__expr_6) (egglog_exp_array_api_TupleInt___init__ (vec-of (egglog_exp_array_api_Int___init__ -1))) $__expr_19) $__expr_8 $__expr_19 $__expr_6)))
(constructor egglog_exp_array_api_unique_counts_elements (egglog.exp.array_api.NDArray) egglog.exp.array_api.NDArray)
(rewrite (egglog_exp_array_api_unique_counts _x) (egglog_exp_array_api_TupleNDArray___init__ (vec-of (egglog_exp_array_api_unique_counts_elements _x) (egglog_exp_array_api_unique_counts_counts _x))) :ruleset egglog.exp.array_api.array_api_ruleset)
(run-schedule (saturate (seq (run egglog.exp.array_api.array_api_ruleset) (run))))
(extract $__expr_38 0)
(run-schedule (saturate (seq (run egglog.exp.array_api.array_api_ruleset) (run))))
(extract $__expr_22 0)
(let $__expr_40 (egglog_exp_array_api_Value_from_int (egglog_exp_array_api_Int___init__ 0)))
(let $__expr_39 (egglog_exp_array_api_Value_to_bool (egglog_exp_array_api_NDArray_index (egglog_exp_array_api_any (egglog_exp_array_api_NDArray___lt__ (egglog_exp_array_api_NDArray___truediv__ (egglog_exp_array_api_astype (egglog_exp_array_api_unique_counts_counts (egglog_exp_array_api_assume_value_one_of (egglog_exp_array_api_assume_shape (egglog_exp_array_api_assume_dtype (egglog_exp_array_api_NDArray_var "y") (egglog_exp_array_api_DType_int64 )) (egglog_exp_array_api_TupleInt___init__ (vec-of (egglog_exp_array_api_Int___init__ 150)))) (egglog_exp_array_api_TupleValue___init__ (vec-of (egglog_exp_array_api_Value_from_int (egglog_exp_array_api_Int___init__ 0)) (egglog_exp_array_api_Value_from_int (egglog_exp_array_api_Int___init__ 1)) (egglog_exp_array_api_Value_from_int (egglog_exp_array_api_Int___init__ 2)))))) (egglog_exp_array_api_NDArray_dtype (egglog_exp_array_api_asarray (egglog_exp_array_api_assume_isfinite (egglog_exp_array_api_assume_shape (egglog_exp_array_api_assume_dtype (egglog_exp_array_api_NDArray_var "X") $__expr_1) (egglog_exp_array_api_TupleInt___init__ (vec-of (egglog_exp_array_api_Int___init__ 150) (egglog_exp_array_api_Int___init__ 4))))) (egglog_exp_array_api_OptionalDType_none ) (egglog_exp_array_api_OptionalBool_none ) (egglog_exp_array_api_OptionalDevice_none )))) (egglog_exp_array_api_NDArray___init__ (egglog_exp_array_api_RecursiveValue___init__ (egglog_exp_array_api_Value_from_float (egglog_exp_array_api_Float___init__ 150.0))))) (egglog_exp_array_api_NDArray___init__ (egglog_exp_array_api_RecursiveValue___init__ $__expr_40)))) (egglog_exp_array_api_TupleInt___init__ (vec-empty )))))
(run-schedule (saturate (seq (run egglog.exp.array_api.array_api_ruleset) (run))))
(extract $__expr_39 0)
(let $__expr_41 (egglog_exp_array_api_Value_to_bool (egglog_exp_array_api_NDArray_index (egglog_exp_array_api_NDArray___gt__ (ndarray-abs (egglog_exp_array_api_NDArray___sub__ (egglog_exp_array_api_sum (egglog_exp_array_api_NDArray___truediv__ (egglog_exp_array_api_astype (egglog_exp_array_api_unique_counts_counts (egglog_exp_array_api_assume_value_one_of (egglog_exp_array_api_assume_shape (egglog_exp_array_api_assume_dtype (egglog_exp_array_api_NDArray_var "y") (egglog_exp_array_api_DType_int64 )) (egglog_exp_array_api_TupleInt___init__ (vec-of (egglog_exp_array_api_Int___init__ 150)))) (egglog_exp_array_api_TupleValue___init__ (vec-of (egglog_exp_array_api_Value_from_int (egglog_exp_array_api_Int___init__ 0)) (egglog_exp_array_api_Value_from_int (egglog_exp_array_api_Int___init__ 1)) (egglog_exp_array_api_Value_from_int (egglog_exp_array_api_Int___init__ 2)))))) (egglog_exp_array_api_NDArray_dtype (egglog_exp_array_api_asarray (egglog_exp_array_api_assume_isfinite (egglog_exp_array_api_assume_shape (egglog_exp_array_api_assume_dtype (egglog_exp_array_api_NDArray_var "X") $__expr_1) (egglog_exp_array_api_TupleInt___init__ (vec-of (egglog_exp_array_api_Int___init__ 150) (egglog_exp_array_api_Int___init__ 4))))) (egglog_exp_array_api_OptionalDType_none ) (egglog_exp_array_api_OptionalBool_none ) (egglog_exp_array_api_OptionalDevice_none )))) (egglog_exp_array_api_NDArray___init__ (egglog_exp_array_api_RecursiveValue___init__ (egglog_exp_array_api_Value_from_float (egglog_exp_array_api_Float___init__ 150.0))))) (egglog_exp_array_api_OptionalIntOrTuple_none )) (egglog_exp_array_api_NDArray___init__ (egglog_exp_array_api_RecursiveValue___init__ (egglog_exp_array_api_Value_from_float (egglog_exp_array_api_Float___init__ 1.0)))))) (egglog_exp_array_api_NDArray___init__ (egglog_exp_array_api_RecursiveValue___init__ (egglog_exp_array_api_Value_from_float (egglog_exp_array_api_Float___init__ 0.00001))))) (egglog_exp_array_api_TupleInt___init__ (vec-empty )))))
(run-schedule (saturate (seq (run egglog.exp.array_api.array_api_ruleset) (run))))
(extract $__expr_41 0)
(let $__expr_42 (egglog_exp_array_api_Int___lt__ (egglog_exp_array_api_TupleInt___getitem__ (egglog_exp_array_api_NDArray_shape (egglog_exp_array_api_asarray (egglog_exp_array_api_assume_isfinite (egglog_exp_array_api_assume_shape (egglog_exp_array_api_assume_dtype (egglog_exp_array_api_NDArray_var "X") $__expr_1) (egglog_exp_array_api_TupleInt___init__ (vec-of (egglog_exp_array_api_Int___init__ 150) (egglog_exp_array_api_Int___init__ 4))))) (egglog_exp_array_api_OptionalDType_none ) (egglog_exp_array_api_OptionalBool_none ) (egglog_exp_array_api_OptionalDevice_none ))) $__expr_13) (egglog_exp_array_api_Int___sub__ (egglog_exp_array_api_TupleInt___getitem__ (egglog_exp_array_api_NDArray_shape (egglog_exp_array_api_unique_values (egglog_exp_array_api_concat (egglog_exp_array_api_TupleNDArray___init__ (vec-of (egglog_exp_array_api_unique_values $__expr_33))) (egglog_exp_array_api_OptionalInt_none )))) $__expr_23) $__expr_13)))
(run-schedule (saturate (seq (run egglog.exp.array_api.array_api_ruleset) (run))))
(extract $__expr_42 0)
(let $__expr_43 (egglog_exp_array_api_Int___lt__ (egglog_exp_array_api_Int___sub__ (egglog_exp_array_api_TupleInt___getitem__ (egglog_exp_array_api_NDArray_shape (egglog_exp_array_api_unique_values (egglog_exp_array_api_concat (egglog_exp_array_api_TupleNDArray___init__ (vec-of (egglog_exp_array_api_unique_values $__expr_33))) (egglog_exp_array_api_OptionalInt_none )))) $__expr_23) $__expr_13) $__expr_16))
(run-schedule (saturate (seq (run egglog.exp.array_api.array_api_ruleset) (run))))
(extract $__expr_43 0)
(run-schedule (saturate (seq (run egglog.exp.array_api.array_api_ruleset) (run))))
(extract $__expr_36 0)
(constructor egglog_exp_array_api_unique_inverse (egglog.exp.array_api.NDArray) egglog.exp.array_api.TupleNDArray :unextractable)
(let $__expr_44 (egglog_exp_array_api_unique_inverse (egglog_exp_array_api_asarray (egglog_exp_array_api_reshape (egglog_exp_array_api_asarray (egglog_exp_array_api_assume_value_one_of (egglog_exp_array_api_assume_shape (egglog_exp_array_api_assume_dtype (egglog_exp_array_api_NDArray_var "y") (egglog_exp_array_api_DType_int64 )) (egglog_exp_array_api_TupleInt___init__ (vec-of (egglog_exp_array_api_Int___init__ 150)))) (egglog_exp_array_api_TupleValue___init__ (vec-of (egglog_exp_array_api_Value_from_int (egglog_exp_array_api_Int___init__ 0)) (egglog_exp_array_api_Value_from_int (egglog_exp_array_api_Int___init__ 1)) (egglog_exp_array_api_Value_from_int (egglog_exp_array_api_Int___init__ 2))))) $__expr_8 (egglog_exp_array_api_OptionalBool_none ) $__expr_6) (egglog_exp_array_api_TupleInt___init__ (vec-of (egglog_exp_array_api_Int___init__ -1))) $__expr_19) $__expr_8 $__expr_19 $__expr_6)))
(constructor egglog_exp_array_api_unique_inverse_inverse_indices (egglog.exp.array_api.NDArray) egglog.exp.array_api.NDArray)
(rewrite (egglog_exp_array_api_unique_inverse _x) (egglog_exp_array_api_TupleNDArray___init__ (vec-of (egglog_exp_array_api_unique_values _x) (egglog_exp_array_api_unique_inverse_inverse_indices _x))) :ruleset egglog.exp.array_api.array_api_ruleset)
(run-schedule (saturate (seq (run egglog.exp.array_api.array_api_ruleset) (run))))
(extract $__expr_44 0)
(let $__expr_45 (egglog_exp_array_api_TupleInt___getitem__ (egglog_exp_array_api_NDArray_shape (egglog_exp_array_api_NDArray___init__ (egglog_exp_array_api_RecursiveValue_vec (vec-of (egglog_exp_array_api_RecursiveValue___init__ $__expr_40) (egglog_exp_array_api_RecursiveValue___init__ (egglog_exp_array_api_Value_from_int (egglog_exp_array_api_Int___init__ 1))) (egglog_exp_array_api_RecursiveValue___init__ (egglog_exp_array_api_Value_from_int (egglog_exp_array_api_Int___init__ 2))))))) $__expr_23))
(run-schedule (saturate (seq (run egglog.exp.array_api.array_api_ruleset) (run))))
(extract $__expr_45 0)
(let $__expr_46 (egglog_exp_array_api_unique_values (egglog_exp_array_api_concat (egglog_exp_array_api_TupleNDArray___init__ (vec-of (egglog_exp_array_api_unique_values $__expr_33))) (egglog_exp_array_api_OptionalInt_none ))))
(run-schedule (saturate (seq (run egglog.exp.array_api.array_api_ruleset) (run))))
(extract $__expr_46 0)
(let $__expr_47 (egglog_exp_array_api_Int___eq__ (egglog_exp_array_api_TupleInt___getitem__ (egglog_exp_array_api_NDArray_shape (egglog_exp_array_api_unique_values (egglog_exp_array_api_concat (egglog_exp_array_api_TupleNDArray___init__ (vec-of (egglog_exp_array_api_unique_values $__expr_33))) (egglog_exp_array_api_OptionalInt_none )))) $__expr_23) $__expr_13))
(run-schedule (saturate (seq (run egglog.exp.array_api.array_api_ruleset) (run))))
(extract $__expr_47 0)
(let $__expr_48 (egglog_exp_array_api_NDArray_shape (egglog_exp_array_api_unique_values (egglog_exp_array_api_concat (egglog_exp_array_api_TupleNDArray___init__ (vec-of (egglog_exp_array_api_unique_values $__expr_33))) (egglog_exp_array_api_OptionalInt_none )))))
(run-schedule (saturate (seq (run egglog.exp.array_api.array_api_ruleset) (run))))
(extract $__expr_48 0)
(let $__expr_49 (egglog_exp_array_api_Int___eq__ (egglog_exp_array_api_Int___mul__ $__expr_13 (egglog_exp_array_api_Int___init__ 3)) $__expr_16))
(run-schedule (saturate (seq (run egglog.exp.array_api.array_api_ruleset) (run))))
(extract $__expr_49 0)
(run-schedule (saturate (seq (run egglog.exp.array_api.array_api_ruleset) (run))))
(extract $__expr_2 0)
(run-schedule (saturate (seq (run egglog.exp.array_api.array_api_ruleset) (run))))
(extract $__expr_3 0)
(run-schedule (saturate (seq (run egglog.exp.array_api.array_api_ruleset) (run))))
(extract $__expr_4 0)
(run-schedule (saturate (seq (run egglog.exp.array_api.array_api_ruleset) (run))))
(extract $__expr_5 0)
(run-schedule (saturate (seq (run egglog.exp.array_api.array_api_ruleset) (run))))
(extract $__expr_7 0)
(run-schedule (saturate (seq (run egglog.exp.array_api.array_api_ruleset) (run))))
(extract $__expr_9 0)
(let $__expr_50 (egglog_exp_array_api_Int___lt__ $__expr_21 $__expr_13))
(run-schedule (saturate (seq (run egglog.exp.array_api.array_api_ruleset) (run))))
(extract $__expr_50 0)
(run-schedule (saturate (seq (run egglog.exp.array_api.array_api_ruleset) (run))))
(extract $__expr_11 0)
(run-schedule (saturate (seq (run egglog.exp.array_api.array_api_ruleset) (run))))
(extract $__expr_12 0)
(let $__expr_51 (egglog_exp_array_api_TupleInt_length (egglog_exp_array_api_NDArray_shape (egglog_exp_array_api_assume_isfinite (egglog_exp_array_api_assume_shape (egglog_exp_array_api_assume_dtype (egglog_exp_array_api_NDArray_var "X") $__expr_1) (egglog_exp_array_api_TupleInt___init__ (vec-of (egglog_exp_array_api_Int___init__ 150) (egglog_exp_array_api_Int___init__ 4))))))))
(run-schedule (saturate (seq (run egglog.exp.array_api.array_api_ruleset) (run))))
(extract $__expr_51 0)
(let $__expr_53 (egglog_exp_array_api_assume_isfinite (egglog_exp_array_api_assume_shape (egglog_exp_array_api_assume_dtype (egglog_exp_array_api_NDArray_var "X") $__expr_1) (egglog_exp_array_api_TupleInt___init__ (vec-of (egglog_exp_array_api_Int___init__ 150) (egglog_exp_array_api_Int___init__ 4))))))
(let $__expr_52 (egglog_exp_array_api_Int___eq__ (egglog_exp_array_api_TupleInt___getitem__ (egglog_exp_array_api_NDArray_shape (egglog_exp_array_api_assume_isfinite (egglog_exp_array_api_assume_shape (egglog_exp_array_api_assume_dtype (egglog_exp_array_api_NDArray_var "X") $__expr_1) (egglog_exp_array_api_TupleInt___init__ (vec-of (egglog_exp_array_api_Int___init__ 150) (egglog_exp_array_api_Int___init__ 4)))))) $__expr_13) (egglog_exp_array_api_TupleInt___getitem__ (egglog_exp_array_api_NDArray_shape (egglog_exp_array_api_asarray (egglog_exp_array_api_assume_isfinite (egglog_exp_array_api_assume_shape (egglog_exp_array_api_assume_dtype (egglog_exp_array_api_NDArray_var "X") $__expr_1) (egglog_exp_array_api_TupleInt___init__ (vec-of (egglog_exp_array_api_Int___init__ 150) (egglog_exp_array_api_Int___init__ 4))))) (egglog_exp_array_api_OptionalDType_none ) (egglog_exp_array_api_OptionalBool_none ) (egglog_exp_array_api_OptionalDevice_none ))) $__expr_13)))
(run-schedule (saturate (seq (run egglog.exp.array_api.array_api_ruleset) (run))))
(extract $__expr_52 0)
(let $__expr_55 (egglog_exp_array_api_asarray (egglog_exp_array_api_reshape (egglog_exp_array_api_asarray (egglog_exp_array_api_assume_value_one_of (egglog_exp_array_api_assume_shape (egglog_exp_array_api_assume_dtype (egglog_exp_array_api_NDArray_var "y") (egglog_exp_array_api_DType_int64 )) (egglog_exp_array_api_TupleInt___init__ (vec-of (egglog_exp_array_api_Int___init__ 150)))) (egglog_exp_array_api_TupleValue___init__ (vec-of (egglog_exp_array_api_Value_from_int (egglog_exp_array_api_Int___init__ 0)) (egglog_exp_array_api_Value_from_int (egglog_exp_array_api_Int___init__ 1)) (egglog_exp_array_api_Value_from_int (egglog_exp_array_api_Int___init__ 2))))) $__expr_8 (egglog_exp_array_api_OptionalBool_none ) $__expr_6) (egglog_exp_array_api_TupleInt___init__ (vec-of (egglog_exp_array_api_Int___init__ -1))) $__expr_19) $__expr_8 $__expr_19 $__expr_6))
(let $__expr_56 (egglog_exp_array_api_OptionalInt_none ))
(let $__expr_57 (egglog_exp_array_api_TupleInt___getitem__ (egglog_exp_array_api_NDArray_shape (egglog_exp_array_api_unique_values (egglog_exp_array_api_concat (egglog_exp_array_api_TupleNDArray___init__ (vec-of (egglog_exp_array_api_unique_values $__expr_33))) (egglog_exp_array_api_OptionalInt_none )))) $__expr_23))
(let $__expr_58 (egglog_exp_array_api_NDArray___init__ (egglog_exp_array_api_RecursiveValue___init__ (egglog_exp_array_api_Value_from_int (egglog_exp_array_api_Int___init__ 2)))))
(let $__expr_59 (egglog_exp_array_api_assume_value_one_of (egglog_exp_array_api_assume_shape (egglog_exp_array_api_assume_dtype (egglog_exp_array_api_NDArray_var "y") (egglog_exp_array_api_DType_int64 )) (egglog_exp_array_api_TupleInt___init__ (vec-of (egglog_exp_array_api_Int___init__ 150)))) (egglog_exp_array_api_TupleValue___init__ (vec-of (egglog_exp_array_api_Value_from_int (egglog_exp_array_api_Int___init__ 0)) (egglog_exp_array_api_Value_from_int (egglog_exp_array_api_Int___init__ 1)) (egglog_exp_array_api_Value_from_int (egglog_exp_array_api_Int___init__ 2))))))
(let $__expr_60 (egglog_exp_array_api_NDArray___init__ (egglog_exp_array_api_RecursiveValue___init__ (egglog_exp_array_api_Value_from_int (egglog_exp_array_api_Int___init__ 1)))))
(let $__expr_61 (egglog_exp_array_api_NDArray___init__ (egglog_exp_array_api_RecursiveValue___init__ $__expr_40)))
(let $__expr_62 (egglog_exp_array_api_Float___init__ 1.0))
(let $__expr_63 (egglog_exp_array_api_RecursiveValue___init__ $__expr_40))
(let $__expr_64 (egglog_exp_array_api_asarray (egglog_exp_array_api_assume_isfinite (egglog_exp_array_api_assume_shape (egglog_exp_array_api_assume_dtype (egglog_exp_array_api_NDArray_var "X") $__expr_1) (egglog_exp_array_api_TupleInt___init__ (vec-of (egglog_exp_array_api_Int___init__ 150) (egglog_exp_array_api_Int___init__ 4))))) (egglog_exp_array_api_OptionalDType_none ) (egglog_exp_array_api_OptionalBool_none ) (egglog_exp_array_api_OptionalDevice_none )))
(let $__expr_65 (egglog_exp_array_api_RecursiveValue___init__ (egglog_exp_array_api_Value_from_int (egglog_exp_array_api_Int___init__ 2))))
(let $__expr_66 (egglog_exp_array_api_RecursiveValue___init__ (egglog_exp_array_api_Value_from_int (egglog_exp_array_api_Int___init__ 1))))
(sort egglog.exp.array_api.MultiAxisIndexKey)
(constructor egglog_exp_array_api_IndexKey_multi_axis (egglog.exp.array_api.MultiAxisIndexKey) egglog.exp.array_api.IndexKey)
(sort egglog.exp.array_api.MultiAxisIndexKeyItem)
(sort egglog.builtins.Vec[egglog.exp.array_api.MultiAxisIndexKeyItem] (Vec egglog.exp.array_api.MultiAxisIndexKeyItem))
(constructor egglog_exp_array_api_MultiAxisIndexKey_from_vec (egglog.builtins.Vec[egglog.exp.array_api.MultiAxisIndexKeyItem]) egglog.exp.array_api.MultiAxisIndexKey)
(constructor egglog_exp_array_api_MultiAxisIndexKeyItem_int (egglog.exp.array_api.Int) egglog.exp.array_api.MultiAxisIndexKeyItem)
(sort egglog.exp.array_api.Slice)
(constructor egglog_exp_array_api_MultiAxisIndexKeyItem_slice (egglog.exp.array_api.Slice) egglog.exp.array_api.MultiAxisIndexKeyItem)
(constructor egglog_exp_array_api_Slice___init__ (egglog.exp.array_api.OptionalInt egglog.exp.array_api.OptionalInt egglog.exp.array_api.OptionalInt) egglog.exp.array_api.Slice)
(let $__expr_67 (egglog_exp_array_api_IndexKey_multi_axis (egglog_exp_array_api_MultiAxisIndexKey_from_vec (vec-of (egglog_exp_array_api_MultiAxisIndexKeyItem_int $__expr_23) (egglog_exp_array_api_MultiAxisIndexKeyItem_slice (egglog_exp_array_api_Slice___init__ $__expr_56 $__expr_56 $__expr_56))))))
(let $__expr_69 (egglog_exp_array_api_Value_from_int (egglog_exp_array_api_Int___init__ 1)))
(let $__expr_70 (egglog_exp_array_api_unique_inverse_inverse_indices $__expr_59))
(let $__expr_71 (egglog_exp_array_api_MultiAxisIndexKeyItem_slice (egglog_exp_array_api_Slice___init__ $__expr_56 $__expr_56 $__expr_56)))
(let $__expr_72 (egglog_exp_array_api_Boolean___init__ false))
(constructor egglog_exp_array_api_NDArray___setitem__ (egglog.exp.array_api.NDArray egglog.exp.array_api.IndexKey egglog.exp.array_api.NDArray) egglog.exp.array_api.NDArray)
(constructor egglog_exp_array_api_zeros (egglog.exp.array_api.TupleInt egglog.exp.array_api.OptionalDType egglog.exp.array_api.OptionalDevice) egglog.exp.array_api.NDArray)
(constructor egglog_exp_array_api_OptionalDType_some (egglog.exp.array_api.DType) egglog.exp.array_api.OptionalDType)
(sort egglog.exp.array_api.Device)
(constructor egglog_exp_array_api_OptionalDevice_some (egglog.exp.array_api.Device) egglog.exp.array_api.OptionalDevice)
(constructor egglog_exp_array_api_NDArray_device (egglog.exp.array_api.NDArray) egglog.exp.array_api.Device)
(constructor egglog_exp_array_api_mean (egglog.exp.array_api.NDArray egglog.exp.array_api.OptionalIntOrTuple egglog.exp.array_api.Boolean) egglog.exp.array_api.NDArray)
(constructor egglog_exp_array_api_IndexKey_ndarray (egglog.exp.array_api.NDArray) egglog.exp.array_api.IndexKey)
(constructor egglog_exp_array_api_OptionalIntOrTuple_int (egglog.exp.array_api.Int) egglog.exp.array_api.OptionalIntOrTuple)
(let $__expr_68 (egglog_exp_array_api_NDArray___setitem__ (egglog_exp_array_api_NDArray___setitem__ (egglog_exp_array_api_NDArray___setitem__ (egglog_exp_array_api_zeros (egglog_exp_array_api_TupleInt___init__ (vec-of $__expr_45 (egglog_exp_array_api_TupleInt___getitem__ (egglog_exp_array_api_NDArray_shape (egglog_exp_array_api_asarray (egglog_exp_array_api_assume_isfinite (egglog_exp_array_api_assume_shape (egglog_exp_array_api_assume_dtype (egglog_exp_array_api_NDArray_var "X") $__expr_1) (egglog_exp_array_api_TupleInt___init__ (vec-of (egglog_exp_array_api_Int___init__ 150) (egglog_exp_array_api_Int___init__ 4))))) (egglog_exp_array_api_OptionalDType_none ) (egglog_exp_array_api_OptionalBool_none ) (egglog_exp_array_api_OptionalDevice_none ))) $__expr_13))) (egglog_exp_array_api_OptionalDType_some (egglog_exp_array_api_NDArray_dtype (egglog_exp_array_api_asarray (egglog_exp_array_api_assume_isfinite (egglog_exp_array_api_assume_shape (egglog_exp_array_api_assume_dtype (egglog_exp_array_api_NDArray_var "X") $__expr_1) (egglog_exp_array_api_TupleInt___init__ (vec-of (egglog_exp_array_api_Int___init__ 150) (egglog_exp_array_api_Int___init__ 4))))) (egglog_exp_array_api_OptionalDType_none ) (egglog_exp_array_api_OptionalBool_none ) (egglog_exp_array_api_OptionalDevice_none )))) (egglog_exp_array_api_OptionalDevice_some (egglog_exp_array_api_NDArray_device $__expr_64))) $__expr_67 (egglog_exp_array_api_mean (egglog_exp_array_api_NDArray___getitem__ $__expr_64 (egglog_exp_array_api_IndexKey_ndarray (egglog_exp_array_api_NDArray___eq__ $__expr_70 $__expr_61))) (egglog_exp_array_api_OptionalIntOrTuple_int $__expr_23) $__expr_72)) (egglog_exp_array_api_IndexKey_multi_axis (egglog_exp_array_api_MultiAxisIndexKey_from_vec (vec-of (egglog_exp_array_api_MultiAxisIndexKeyItem_int $__expr_13) $__expr_71))) (egglog_exp_array_api_mean (egglog_exp_array_api_NDArray___getitem__ $__expr_64 (egglog_exp_array_api_IndexKey_ndarray (egglog_exp_array_api_NDArray___eq__ $__expr_70 $__expr_60))) (egglog_exp_array_api_OptionalIntOrTuple_int $__expr_23) $__expr_72)) (egglog_exp_array_api_IndexKey_multi_axis (egglog_exp_array_api_MultiAxisIndexKey_from_vec (vec-of (egglog_exp_array_api_MultiAxisIndexKeyItem_int $__expr_16) $__expr_71))) (egglog_exp_array_api_mean (egglog_exp_array_api_NDArray___getitem__ $__expr_64 (egglog_exp_array_api_IndexKey_ndarray (egglog_exp_array_api_NDArray___eq__ $__expr_70 $__expr_58))) (egglog_exp_array_api_OptionalIntOrTuple_int $__expr_23) $__expr_72)))
(let $__expr_73 (egglog_exp_array_api_IndexKey_multi_axis (egglog_exp_array_api_MultiAxisIndexKey_from_vec (vec-of (egglog_exp_array_api_MultiAxisIndexKeyItem_int $__expr_16) $__expr_71))))
(let $__expr_74 (egglog_exp_array_api_IndexKey_multi_axis (egglog_exp_array_api_MultiAxisIndexKey_from_vec (vec-of (egglog_exp_array_api_MultiAxisIndexKeyItem_int $__expr_13) $__expr_71))))
(let $__expr_76 (egglog_exp_array_api_Value_from_int (egglog_exp_array_api_Int___init__ 2)))
(let $__expr_77 (egglog_exp_array_api_OptionalDevice_some (egglog_exp_array_api_NDArray_device $__expr_64)))
(let $__expr_78 (egglog_exp_array_api_OptionalIntOrTuple_int $__expr_23))
(let $__expr_79 (egglog_exp_array_api_OptionalDType_some (egglog_exp_array_api_NDArray_dtype (egglog_exp_array_api_asarray (egglog_exp_array_api_assume_isfinite (egglog_exp_array_api_assume_shape (egglog_exp_array_api_assume_dtype (egglog_exp_array_api_NDArray_var "X") $__expr_1) (egglog_exp_array_api_TupleInt___init__ (vec-of (egglog_exp_array_api_Int___init__ 150) (egglog_exp_array_api_Int___init__ 4))))) (egglog_exp_array_api_OptionalDType_none ) (egglog_exp_array_api_OptionalBool_none ) (egglog_exp_array_api_OptionalDevice_none )))))
(constructor egglog_exp_array_api_std (egglog.exp.array_api.NDArray egglog.exp.array_api.OptionalIntOrTuple) egglog.exp.array_api.NDArray)
(constructor egglog_exp_array_api_OptionalInt_some (egglog.exp.array_api.Int) egglog.exp.array_api.OptionalInt)
(let $__expr_80 (egglog_exp_array_api_std (egglog_exp_array_api_concat (egglog_exp_array_api_TupleNDArray___init__ (vec-of (egglog_exp_array_api_NDArray___sub__ (egglog_exp_array_api_NDArray___getitem__ $__expr_64 (egglog_exp_array_api_IndexKey_ndarray (egglog_exp_array_api_NDArray___eq__ $__expr_55 $__expr_61))) (egglog_exp_array_api_NDArray___getitem__ $__expr_68 $__expr_67)) (egglog_exp_array_api_NDArray___sub__ (egglog_exp_array_api_NDArray___getitem__ $__expr_64 (egglog_exp_array_api_IndexKey_ndarray (egglog_exp_array_api_NDArray___eq__ $__expr_55 $__expr_60))) (egglog_exp_array_api_NDArray___getitem__ $__expr_68 $__expr_74)) (egglog_exp_array_api_NDArray___sub__ (egglog_exp_array_api_NDArray___getitem__ $__expr_64 (egglog_exp_array_api_IndexKey_ndarray (egglog_exp_array_api_NDArray___eq__ $__expr_55 $__expr_58))) (egglog_exp_array_api_NDArray___getitem__ $__expr_68 $__expr_73)))) (egglog_exp_array_api_OptionalInt_some $__expr_23)) $__expr_78))
(constructor egglog_exp_array_api_svd_ (egglog.exp.array_api.NDArray egglog.exp.array_api.Boolean) egglog.exp.array_api.TupleNDArray)
(constructor ndarray-sqrt (egglog.exp.array_api.NDArray) egglog.exp.array_api.NDArray)
(let $__expr_75 (egglog_exp_array_api_Slice___init__ $__expr_56 (egglog_exp_array_api_OptionalInt_some (egglog_exp_array_api_Value_to_int (egglog_exp_array_api_NDArray_index (egglog_exp_array_api_sum (egglog_exp_array_api_astype (egglog_exp_array_api_NDArray___gt__ (egglog_exp_array_api_TupleNDArray___getitem__ (egglog_exp_array_api_svd_ (egglog_exp_array_api_NDArray___mul__ (ndarray-sqrt (egglog_exp_array_api_asarray (egglog_exp_array_api_NDArray___init__ (egglog_exp_array_api_RecursiveValue___init__ (egglog_exp_array_api_Value_from_float (egglog_exp_array_api_Float___truediv__ $__expr_62 (egglog_exp_array_api_Float_from_int (egglog_exp_array_api_Int___sub__ $__expr_25 $__expr_57)))))) $__expr_79 $__expr_19 $__expr_77)) (egglog_exp_array_api_NDArray___truediv__ (egglog_exp_array_api_concat (egglog_exp_array_api_TupleNDArray___init__ (vec-of (egglog_exp_array_api_NDArray___sub__ (egglog_exp_array_api_NDArray___getitem__ $__expr_64 (egglog_exp_array_api_IndexKey_ndarray (egglog_exp_array_api_NDArray___eq__ $__expr_55 $__expr_61))) (egglog_exp_array_api_NDArray___getitem__ $__expr_68 $__expr_67)) (egglog_exp_array_api_NDArray___sub__ (egglog_exp_array_api_NDArray___getitem__ $__expr_64 (egglog_exp_array_api_IndexKey_ndarray (egglog_exp_array_api_NDArray___eq__ $__expr_55 $__expr_60))) (egglog_exp_array_api_NDArray___getitem__ $__expr_68 $__expr_74)) (egglog_exp_array_api_NDArray___sub__ (egglog_exp_array_api_NDArray___getitem__ $__expr_64 (egglog_exp_array_api_IndexKey_ndarray (egglog_exp_array_api_NDArray___eq__ $__expr_55 $__expr_58))) (egglog_exp_array_api_NDArray___getitem__ $__expr_68 $__expr_73)))) (egglog_exp_array_api_OptionalInt_some $__expr_23)) (egglog_exp_array_api_NDArray___setitem__ $__expr_80 (egglog_exp_array_api_IndexKey_ndarray (egglog_exp_array_api_NDArray___eq__ $__expr_80 $__expr_61)) (egglog_exp_array_api_NDArray___init__ (egglog_exp_array_api_RecursiveValue___init__ (egglog_exp_array_api_Value_from_float (egglog_exp_array_api_Float___init__ 1.0))))))) $__expr_72) $__expr_13) (egglog_exp_array_api_NDArray___init__ (egglog_exp_array_api_RecursiveValue___init__ (egglog_exp_array_api_Value_from_float (egglog_exp_array_api_Float___init__ 0.0001))))) (egglog_exp_array_api_DType_int32 )) (egglog_exp_array_api_OptionalIntOrTuple_none )) (egglog_exp_array_api_TupleInt___init__ (vec-empty ))))) $__expr_56))
(let $__expr_82 (egglog_exp_array_api_NDArray_dtype (egglog_exp_array_api_asarray (egglog_exp_array_api_assume_isfinite (egglog_exp_array_api_assume_shape (egglog_exp_array_api_assume_dtype (egglog_exp_array_api_NDArray_var "X") $__expr_1) (egglog_exp_array_api_TupleInt___init__ (vec-of (egglog_exp_array_api_Int___init__ 150) (egglog_exp_array_api_Int___init__ 4))))) (egglog_exp_array_api_OptionalDType_none ) (egglog_exp_array_api_OptionalBool_none ) (egglog_exp_array_api_OptionalDevice_none ))))
(constructor egglog_exp_array_api_NDArray___matmul__ (egglog.exp.array_api.NDArray egglog.exp.array_api.NDArray) egglog.exp.array_api.NDArray)
(let $__expr_81 (egglog_exp_array_api_NDArray___matmul__ (egglog_exp_array_api_NDArray___truediv__ (egglog_exp_array_api_astype (egglog_exp_array_api_unique_counts_counts (egglog_exp_array_api_assume_value_one_of (egglog_exp_array_api_assume_shape (egglog_exp_array_api_assume_dtype (egglog_exp_array_api_NDArray_var "y") (egglog_exp_array_api_DType_int64 )) (egglog_exp_array_api_TupleInt___init__ (vec-of (egglog_exp_array_api_Int___init__ 150)))) (egglog_exp_array_api_TupleValue___init__ (vec-of (egglog_exp_array_api_Value_from_int (egglog_exp_array_api_Int___init__ 0)) (egglog_exp_array_api_Value_from_int (egglog_exp_array_api_Int___init__ 1)) (egglog_exp_array_api_Value_from_int (egglog_exp_array_api_Int___init__ 2)))))) (egglog_exp_array_api_NDArray_dtype (egglog_exp_array_api_asarray (egglog_exp_array_api_assume_isfinite (egglog_exp_array_api_assume_shape (egglog_exp_array_api_assume_dtype (egglog_exp_array_api_NDArray_var "X") $__expr_1) (egglog_exp_array_api_TupleInt___init__ (vec-of (egglog_exp_array_api_Int___init__ 150) (egglog_exp_array_api_Int___init__ 4))))) (egglog_exp_array_api_OptionalDType_none ) (egglog_exp_array_api_OptionalBool_none ) (egglog_exp_array_api_OptionalDevice_none )))) (egglog_exp_array_api_NDArray___init__ (egglog_exp_array_api_RecursiveValue___init__ (egglog_exp_array_api_Value_from_float (egglog_exp_array_api_Float___init__ 150.0))))) $__expr_68))
(let $__expr_84 (egglog_exp_array_api_TupleNDArray___getitem__ (egglog_exp_array_api_svd_ (egglog_exp_array_api_NDArray___mul__ (ndarray-sqrt (egglog_exp_array_api_asarray (egglog_exp_array_api_NDArray___init__ (egglog_exp_array_api_RecursiveValue___init__ (egglog_exp_array_api_Value_from_float (egglog_exp_array_api_Float___truediv__ $__expr_62 (egglog_exp_array_api_Float_from_int (egglog_exp_array_api_Int___sub__ $__expr_25 $__expr_57)))))) $__expr_79 $__expr_19 $__expr_77)) (egglog_exp_array_api_NDArray___truediv__ (egglog_exp_array_api_concat (egglog_exp_array_api_TupleNDArray___init__ (vec-of (egglog_exp_array_api_NDArray___sub__ (egglog_exp_array_api_NDArray___getitem__ $__expr_64 (egglog_exp_array_api_IndexKey_ndarray (egglog_exp_array_api_NDArray___eq__ $__expr_55 $__expr_61))) (egglog_exp_array_api_NDArray___getitem__ $__expr_68 $__expr_67)) (egglog_exp_array_api_NDArray___sub__ (egglog_exp_array_api_NDArray___getitem__ $__expr_64 (egglog_exp_array_api_IndexKey_ndarray (egglog_exp_array_api_NDArray___eq__ $__expr_55 $__expr_60))) (egglog_exp_array_api_NDArray___getitem__ $__expr_68 $__expr_74)) (egglog_exp_array_api_NDArray___sub__ (egglog_exp_array_api_NDArray___getitem__ $__expr_64 (egglog_exp_array_api_IndexKey_ndarray (egglog_exp_array_api_NDArray___eq__ $__expr_55 $__expr_58))) (egglog_exp_array_api_NDArray___getitem__ $__expr_68 $__expr_73)))) (egglog_exp_array_api_OptionalInt_some $__expr_23)) (egglog_exp_array_api_NDArray___setitem__ $__expr_80 (egglog_exp_array_api_IndexKey_ndarray (egglog_exp_array_api_NDArray___eq__ $__expr_80 $__expr_61)) (egglog_exp_array_api_NDArray___init__ (egglog_exp_array_api_RecursiveValue___init__ (egglog_exp_array_api_Value_from_float (egglog_exp_array_api_Float___init__ 1.0))))))) $__expr_72) $__expr_13))
(let $__expr_85 (egglog_exp_array_api_concat (egglog_exp_array_api_TupleNDArray___init__ (vec-of (egglog_exp_array_api_NDArray___sub__ (egglog_exp_array_api_NDArray___getitem__ $__expr_64 (egglog_exp_array_api_IndexKey_ndarray (egglog_exp_array_api_NDArray___eq__ $__expr_55 $__expr_61))) (egglog_exp_array_api_NDArray___getitem__ $__expr_68 $__expr_67)) (egglog_exp_array_api_NDArray___sub__ (egglog_exp_array_api_NDArray___getitem__ $__expr_64 (egglog_exp_array_api_IndexKey_ndarray (egglog_exp_array_api_NDArray___eq__ $__expr_55 $__expr_60))) (egglog_exp_array_api_NDArray___getitem__ $__expr_68 $__expr_74)) (egglog_exp_array_api_NDArray___sub__ (egglog_exp_array_api_NDArray___getitem__ $__expr_64 (egglog_exp_array_api_IndexKey_ndarray (egglog_exp_array_api_NDArray___eq__ $__expr_55 $__expr_58))) (egglog_exp_array_api_NDArray___getitem__ $__expr_68 $__expr_73)))) (egglog_exp_array_api_OptionalInt_some $__expr_23)))
(let $__expr_86 (egglog_exp_array_api_NDArray___truediv__ (egglog_exp_array_api_astype (egglog_exp_array_api_unique_counts_counts (egglog_exp_array_api_assume_value_one_of (egglog_exp_array_api_assume_shape (egglog_exp_array_api_assume_dtype (egglog_exp_array_api_NDArray_var "y") (egglog_exp_array_api_DType_int64 )) (egglog_exp_array_api_TupleInt___init__ (vec-of (egglog_exp_array_api_Int___init__ 150)))) (egglog_exp_array_api_TupleValue___init__ (vec-of (egglog_exp_array_api_Value_from_int (egglog_exp_array_api_Int___init__ 0)) (egglog_exp_array_api_Value_from_int (egglog_exp_array_api_Int___init__ 1)) (egglog_exp_array_api_Value_from_int (egglog_exp_array_api_Int___init__ 2)))))) (egglog_exp_array_api_NDArray_dtype (egglog_exp_array_api_asarray (egglog_exp_array_api_assume_isfinite (egglog_exp_array_api_assume_shape (egglog_exp_array_api_assume_dtype (egglog_exp_array_api_NDArray_var "X") $__expr_1) (egglog_exp_array_api_TupleInt___init__ (vec-of (egglog_exp_array_api_Int___init__ 150) (egglog_exp_array_api_Int___init__ 4))))) (egglog_exp_array_api_OptionalDType_none ) (egglog_exp_array_api_OptionalBool_none ) (egglog_exp_array_api_OptionalDevice_none )))) (egglog_exp_array_api_NDArray___init__ (egglog_exp_array_api_RecursiveValue___init__ (egglog_exp_array_api_Value_from_float (egglog_exp_array_api_Float___init__ 150.0))))))
(let $__expr_87 (egglog_exp_array_api_NDArray___setitem__ $__expr_80 (egglog_exp_array_api_IndexKey_ndarray (egglog_exp_array_api_NDArray___eq__ $__expr_80 $__expr_61)) (egglog_exp_array_api_NDArray___init__ (egglog_exp_array_api_RecursiveValue___init__ (egglog_exp_array_api_Value_from_float (egglog_exp_array_api_Float___init__ 1.0))))))
(let $__expr_88 (egglog_exp_array_api_svd_ (egglog_exp_array_api_NDArray___mul__ (ndarray-sqrt (egglog_exp_array_api_asarray (egglog_exp_array_api_NDArray___init__ (egglog_exp_array_api_RecursiveValue___init__ (egglog_exp_array_api_Value_from_float (egglog_exp_array_api_Float___truediv__ $__expr_62 (egglog_exp_array_api_Float_from_int (egglog_exp_array_api_Int___sub__ $__expr_25 $__expr_57)))))) $__expr_79 $__expr_19 $__expr_77)) (egglog_exp_array_api_NDArray___truediv__ (egglog_exp_array_api_concat (egglog_exp_array_api_TupleNDArray___init__ (vec-of (egglog_exp_array_api_NDArray___sub__ (egglog_exp_array_api_NDArray___getitem__ $__expr_64 (egglog_exp_array_api_IndexKey_ndarray (egglog_exp_array_api_NDArray___eq__ $__expr_55 $__expr_61))) (egglog_exp_array_api_NDArray___getitem__ $__expr_68 $__expr_67)) (egglog_exp_array_api_NDArray___sub__ (egglog_exp_array_api_NDArray___getitem__ $__expr_64 (egglog_exp_array_api_IndexKey_ndarray (egglog_exp_array_api_NDArray___eq__ $__expr_55 $__expr_60))) (egglog_exp_array_api_NDArray___getitem__ $__expr_68 $__expr_74)) (egglog_exp_array_api_NDArray___sub__ (egglog_exp_array_api_NDArray___getitem__ $__expr_64 (egglog_exp_array_api_IndexKey_ndarray (egglog_exp_array_api_NDArray___eq__ $__expr_55 $__expr_58))) (egglog_exp_array_api_NDArray___getitem__ $__expr_68 $__expr_73)))) (egglog_exp_array_api_OptionalInt_some $__expr_23)) (egglog_exp_array_api_NDArray___setitem__ $__expr_80 (egglog_exp_array_api_IndexKey_ndarray (egglog_exp_array_api_NDArray___eq__ $__expr_80 $__expr_61)) (egglog_exp_array_api_NDArray___init__ (egglog_exp_array_api_RecursiveValue___init__ (egglog_exp_array_api_Value_from_float (egglog_exp_array_api_Float___init__ 1.0))))))) $__expr_72))
(constructor egglog_exp_array_api_IndexKey_slice (egglog.exp.array_api.Slice) egglog.exp.array_api.IndexKey)
(let $__expr_83 (egglog_exp_array_api_TupleNDArray___getitem__ (egglog_exp_array_api_svd_ (egglog_exp_array_api_NDArray___matmul__ (egglog_exp_array_api_NDArray_T (egglog_exp_array_api_NDArray___mul__ (ndarray-sqrt (egglog_exp_array_api_NDArray___mul__ (egglog_exp_array_api_NDArray___mul__ (egglog_exp_array_api_NDArray___init__ (egglog_exp_array_api_RecursiveValue___init__ (egglog_exp_array_api_Value_from_int $__expr_25))) $__expr_86) (egglog_exp_array_api_NDArray___init__ (egglog_exp_array_api_RecursiveValue___init__ (egglog_exp_array_api_Value_from_float (egglog_exp_array_api_Float___truediv__ $__expr_62 (egglog_exp_array_api_Float_from_int (egglog_exp_array_api_Int___sub__ (egglog_exp_array_api_TupleInt___getitem__ (egglog_exp_array_api_NDArray_shape (egglog_exp_array_api_unique_values (egglog_exp_array_api_concat (egglog_exp_array_api_TupleNDArray___init__ (vec-of (egglog_exp_array_api_unique_values $__expr_33))) (egglog_exp_array_api_OptionalInt_none )))) $__expr_23) $__expr_13)))))))) (egglog_exp_array_api_NDArray_T (egglog_exp_array_api_NDArray___sub__ $__expr_68 $__expr_81)))) (egglog_exp_array_api_NDArray___truediv__ (egglog_exp_array_api_NDArray_T (egglog_exp_array_api_NDArray___truediv__ (egglog_exp_array_api_NDArray___getitem__ (egglog_exp_array_api_TupleNDArray___getitem__ $__expr_88 $__expr_16) (egglog_exp_array_api_IndexKey_multi_axis (egglog_exp_array_api_MultiAxisIndexKey_from_vec (vec-of (egglog_exp_array_api_MultiAxisIndexKeyItem_slice $__expr_75) $__expr_71)))) $__expr_87)) (egglog_exp_array_api_NDArray___getitem__ $__expr_84 (egglog_exp_array_api_IndexKey_slice $__expr_75)))) $__expr_72) $__expr_13))
(let $__expr_89 (egglog_exp_array_api_svd_ (egglog_exp_array_api_NDArray___matmul__ (egglog_exp_array_api_NDArray_T (egglog_exp_array_api_NDArray___mul__ (ndarray-sqrt (egglog_exp_array_api_NDArray___mul__ (egglog_exp_array_api_NDArray___mul__ (egglog_exp_array_api_NDArray___init__ (egglog_exp_array_api_RecursiveValue___init__ (egglog_exp_array_api_Value_from_int $__expr_25))) $__expr_86) (egglog_exp_array_api_NDArray___init__ (egglog_exp_array_api_RecursiveValue___init__ (egglog_exp_array_api_Value_from_float (egglog_exp_array_api_Float___truediv__ $__expr_62 (egglog_exp_array_api_Float_from_int (egglog_exp_array_api_Int___sub__ (egglog_exp_array_api_TupleInt___getitem__ (egglog_exp_array_api_NDArray_shape (egglog_exp_array_api_unique_values (egglog_exp_array_api_concat (egglog_exp_array_api_TupleNDArray___init__ (vec-of (egglog_exp_array_api_unique_values $__expr_33))) (egglog_exp_array_api_OptionalInt_none )))) $__expr_23) $__expr_13)))))))) (egglog_exp_array_api_NDArray_T (egglog_exp_array_api_NDArray___sub__ $__expr_68 $__expr_81)))) (egglog_exp_array_api_NDArray___truediv__ (egglog_exp_array_api_NDArray_T (egglog_exp_array_api_NDArray___truediv__ (egglog_exp_array_api_NDArray___getitem__ (egglog_exp_array_api_TupleNDArray___getitem__ $__expr_88 $__expr_16) (egglog_exp_array_api_IndexKey_multi_axis (egglog_exp_array_api_MultiAxisIndexKey_from_vec (vec-of (egglog_exp_array_api_MultiAxisIndexKeyItem_slice $__expr_75) $__expr_71)))) $__expr_87)) (egglog_exp_array_api_NDArray___getitem__ $__expr_84 (egglog_exp_array_api_IndexKey_slice $__expr_75)))) $__expr_72))
(let $__expr_90 (egglog_exp_array_api_OptionalIntOrTuple_none ))
(let $__expr_91 (egglog_exp_array_api_TupleInt___init__ (vec-empty )))
(let $__expr_92 (egglog_exp_array_api_NDArray___truediv__ (egglog_exp_array_api_NDArray_T (egglog_exp_array_api_NDArray___truediv__ (egglog_exp_array_api_NDArray___getitem__ (egglog_exp_array_api_TupleNDArray___getitem__ $__expr_88 $__expr_16) (egglog_exp_array_api_IndexKey_multi_axis (egglog_exp_array_api_MultiAxisIndexKey_from_vec (vec-of (egglog_exp_array_api_MultiAxisIndexKeyItem_slice $__expr_75) $__expr_71)))) $__expr_87)) (egglog_exp_array_api_NDArray___getitem__ $__expr_84 (egglog_exp_array_api_IndexKey_slice $__expr_75))))
(let $__expr_54 (egglog_exp_array_api_NDArray___getitem__ (egglog_exp_array_api_NDArray___matmul__ (egglog_exp_array_api_NDArray___sub__ $__expr_64 $__expr_81) (egglog_exp_array_api_NDArray___matmul__ $__expr_92 (egglog_exp_array_api_NDArray___getitem__ (egglog_exp_array_api_NDArray_T (egglog_exp_array_api_TupleNDArray___getitem__ $__expr_89 $__expr_16)) (egglog_exp_array_api_IndexKey_multi_axis (egglog_exp_array_api_MultiAxisIndexKey_from_vec (vec-of $__expr_71 (egglog_exp_array_api_MultiAxisIndexKeyItem_slice (egglog_exp_array_api_Slice___init__ $__expr_56 (egglog_exp_array_api_OptionalInt_some (egglog_exp_array_api_Value_to_int (egglog_exp_array_api_NDArray_index (egglog_exp_array_api_sum (egglog_exp_array_api_astype (egglog_exp_array_api_NDArray___gt__ $__expr_83 (egglog_exp_array_api_NDArray___mul__ (egglog_exp_array_api_NDArray___init__ (egglog_exp_array_api_RecursiveValue___init__ (egglog_exp_array_api_Value_from_float (egglog_exp_array_api_Float___init__ 0.0001)))) (egglog_exp_array_api_NDArray___getitem__ $__expr_83 (egglog_exp_array_api_IndexKey_int (egglog_exp_array_api_Int___init__ 0))))) (egglog_exp_array_api_DType_int32 )) $__expr_90) $__expr_91))) $__expr_56)))))))) (egglog_exp_array_api_IndexKey_multi_axis (egglog_exp_array_api_MultiAxisIndexKey_from_vec (vec-of $__expr_71 (egglog_exp_array_api_MultiAxisIndexKeyItem_slice (egglog_exp_array_api_Slice___init__ $__expr_56 (egglog_exp_array_api_OptionalInt_some $__expr_16) $__expr_56)))))))
(ruleset ruleset_4764606512)
(rewrite (egglog_exp_array_api_NDArray___eq__ (egglog_exp_array_api_unique_inverse_inverse_indices _x) (egglog_exp_array_api_NDArray___init__ (egglog_exp_array_api_RecursiveValue___init__ (egglog_exp_array_api_Value_from_int _i)))) (egglog_exp_array_api_NDArray___eq__ _x (egglog_exp_array_api_NDArray___init__ (egglog_exp_array_api_RecursiveValue___init__ (egglog_exp_array_api_NDArray_index (egglog_exp_array_api_unique_values _x) (egglog_exp_array_api_TupleInt___init__ (vec-of _i)))))) :subsume :ruleset ruleset_4764606512)
(constructor _lambda_84 (egglog.exp.array_api.NDArray egglog.exp.array_api.TupleValue egglog.exp.array_api.Int) egglog.exp.array_api.Value)
(rewrite (_lambda_84 _x _values _i) (egglog_exp_array_api_NDArray_index (egglog_exp_array_api_sum (egglog_exp_array_api_NDArray___eq__ _x (egglog_exp_array_api_NDArray___init__ (egglog_exp_array_api_RecursiveValue___init__ (egglog_exp_array_api_TupleValue___getitem__ _values _i)))) $__expr_90) $__expr_91) :subsume :ruleset ruleset_4764606512)
(constructor egglog_exp_array_api_numba_count_values (egglog.exp.array_api.NDArray egglog.exp.array_api.TupleValue) egglog.exp.array_api.TupleValue)
(rewrite (egglog_exp_array_api_numba_count_values _x _values) (egglog_exp_array_api_TupleValue_fn (egglog_exp_array_api_TupleValue_length _values) (unstable-fn "_lambda_84" _x _values)) :subsume :ruleset ruleset_4764606512)
(rewrite (egglog_exp_array_api_unique_counts_counts _x) (egglog_exp_array_api_NDArray_from_tuple_value (egglog_exp_array_api_numba_count_values _x (egglog_exp_array_api_NDArray_to_tuple_values (egglog_exp_array_api_unique_values _x)))) :subsume :ruleset ruleset_4764606512)
(constructor egglog_exp_array_api_square (egglog.exp.array_api.NDArray) egglog.exp.array_api.NDArray)
(rewrite (egglog_exp_array_api_std _x (egglog_exp_array_api_OptionalIntOrTuple_int _axis)) (ndarray-sqrt (egglog_exp_array_api_mean (egglog_exp_array_api_square (egglog_exp_array_api_NDArray___sub__ _x (egglog_exp_array_api_mean _x (egglog_exp_array_api_OptionalIntOrTuple_int _axis) (egglog_exp_array_api_Boolean___init__ true)))) (egglog_exp_array_api_OptionalIntOrTuple_int _axis) $__expr_72)) :subsume :ruleset ruleset_4764606512)
(rewrite (egglog_exp_array_api_mean _x (egglog_exp_array_api_OptionalIntOrTuple_int _axis) $__expr_72) (egglog_exp_array_api_NDArray___truediv__ (egglog_exp_array_api_sum _x (egglog_exp_array_api_OptionalIntOrTuple_int _axis)) (egglog_exp_array_api_NDArray___init__ (egglog_exp_array_api_RecursiveValue___init__ (egglog_exp_array_api_Value_from_int (egglog_exp_array_api_TupleInt___getitem__ (egglog_exp_array_api_NDArray_shape _x) _axis))))) :subsume :ruleset ruleset_4764606512)
(constructor egglog_exp_array_api_expand_dims (egglog.exp.array_api.NDArray egglog.exp.array_api.Int) egglog.exp.array_api.NDArray)
(rewrite (egglog_exp_array_api_mean _x (egglog_exp_array_api_OptionalIntOrTuple_int _axis) (egglog_exp_array_api_Boolean___init__ true)) (egglog_exp_array_api_expand_dims (egglog_exp_array_api_NDArray___truediv__ (egglog_exp_array_api_sum _x (egglog_exp_array_api_OptionalIntOrTuple_int _axis)) (egglog_exp_array_api_NDArray___init__ (egglog_exp_array_api_RecursiveValue___init__ (egglog_exp_array_api_Value_from_int (egglog_exp_array_api_TupleInt___getitem__ (egglog_exp_array_api_NDArray_shape _x) _axis))))) _axis) :subsume :ruleset ruleset_4764606512)
(unstable-combined-ruleset combined_ruleset_4764339232 egglog.exp.array_api.array_api_ruleset ruleset_4764606512)
(run-schedule (saturate (run combined_ruleset_4764339232)))
(pop 1)
(sort egglog.exp.array_api.Int)
(constructor egglog_exp_array_api_Int___init__ (i64) egglog.exp.array_api.Int)
(let $__expr_3 (egglog_exp_array_api_Int___init__ 150))
(sort egglog.exp.array_api.Value)
(constructor egglog_exp_array_api_Value_from_int (egglog.exp.array_api.Int) egglog.exp.array_api.Value)
(let $__expr_4 (egglog_exp_array_api_Value_from_int (egglog_exp_array_api_Int___init__ 1)))
(sort egglog.exp.array_api.NDArray)
(sort egglog.exp.array_api.IndexKey)
(constructor egglog_exp_array_api_NDArray___getitem__ (egglog.exp.array_api.NDArray egglog.exp.array_api.IndexKey) egglog.exp.array_api.NDArray)
(constructor egglog_exp_array_api_assume_isfinite (egglog.exp.array_api.NDArray) egglog.exp.array_api.NDArray)
(sort egglog.exp.array_api.TupleInt)
(constructor egglog_exp_array_api_assume_shape (egglog.exp.array_api.NDArray egglog.exp.array_api.TupleInt) egglog.exp.array_api.NDArray)
(sort egglog.exp.array_api.DType)
(constructor egglog_exp_array_api_assume_dtype (egglog.exp.array_api.NDArray egglog.exp.array_api.DType) egglog.exp.array_api.NDArray)
(constructor egglog_exp_array_api_NDArray_var (String) egglog.exp.array_api.NDArray :cost 200)
(constructor egglog_exp_array_api_DType_float64 () egglog.exp.array_api.DType)
(sort egglog.builtins.Vec[egglog.exp.array_api.Int] (Vec egglog.exp.array_api.Int))
(constructor egglog_exp_array_api_TupleInt___init__ (egglog.builtins.Vec[egglog.exp.array_api.Int]) egglog.exp.array_api.TupleInt)
(constructor egglog_exp_array_api_IndexKey_ndarray (egglog.exp.array_api.NDArray) egglog.exp.array_api.IndexKey)
(constructor egglog_exp_array_api_NDArray___eq__ (egglog.exp.array_api.NDArray egglog.exp.array_api.NDArray) egglog.exp.array_api.NDArray)
(sort egglog.exp.array_api.TupleValue)
(constructor egglog_exp_array_api_assume_value_one_of (egglog.exp.array_api.NDArray egglog.exp.array_api.TupleValue) egglog.exp.array_api.NDArray)
(constructor egglog_exp_array_api_DType_int64 () egglog.exp.array_api.DType)
(sort egglog.builtins.Vec[egglog.exp.array_api.Value] (Vec egglog.exp.array_api.Value))
(constructor egglog_exp_array_api_TupleValue___init__ (egglog.builtins.Vec[egglog.exp.array_api.Value]) egglog.exp.array_api.TupleValue)
(sort egglog.exp.array_api.RecursiveValue)
(constructor egglog_exp_array_api_NDArray___init__ (egglog.exp.array_api.RecursiveValue) egglog.exp.array_api.NDArray)
(constructor egglog_exp_array_api_RecursiveValue___init__ (egglog.exp.array_api.Value) egglog.exp.array_api.RecursiveValue)
(let $__expr_2 (egglog_exp_array_api_NDArray___getitem__ (egglog_exp_array_api_assume_isfinite (egglog_exp_array_api_assume_shape (egglog_exp_array_api_assume_dtype (egglog_exp_array_api_NDArray_var "X") (egglog_exp_array_api_DType_float64 )) (egglog_exp_array_api_TupleInt___init__ (vec-of $__expr_3 (egglog_exp_array_api_Int___init__ 4))))) (egglog_exp_array_api_IndexKey_ndarray (egglog_exp_array_api_NDArray___eq__ (egglog_exp_array_api_assume_value_one_of (egglog_exp_array_api_assume_shape (egglog_exp_array_api_assume_dtype (egglog_exp_array_api_NDArray_var "y") (egglog_exp_array_api_DType_int64 )) (egglog_exp_array_api_TupleInt___init__ (vec-of $__expr_3))) (egglog_exp_array_api_TupleValue___init__ (vec-of (egglog_exp_array_api_Value_from_int (egglog_exp_array_api_Int___init__ 0)) $__expr_4 (egglog_exp_array_api_Value_from_int (egglog_exp_array_api_Int___init__ 2))))) (egglog_exp_array_api_NDArray___init__ (egglog_exp_array_api_RecursiveValue___init__ $__expr_4))))))
(let $__expr_5 (egglog_exp_array_api_Int___init__ 4))
(let $__expr_6 (egglog_exp_array_api_NDArray___getitem__ (egglog_exp_array_api_assume_isfinite (egglog_exp_array_api_assume_shape (egglog_exp_array_api_assume_dtype (egglog_exp_array_api_NDArray_var "X") (egglog_exp_array_api_DType_float64 )) (egglog_exp_array_api_TupleInt___init__ (vec-of $__expr_3 (egglog_exp_array_api_Int___init__ 4))))) (egglog_exp_array_api_IndexKey_ndarray (egglog_exp_array_api_NDArray___eq__ (egglog_exp_array_api_assume_value_one_of (egglog_exp_array_api_assume_shape (egglog_exp_array_api_assume_dtype (egglog_exp_array_api_NDArray_var "y") (egglog_exp_array_api_DType_int64 )) (egglog_exp_array_api_TupleInt___init__ (vec-of $__expr_3))) (egglog_exp_array_api_TupleValue___init__ (vec-of (egglog_exp_array_api_Value_from_int (egglog_exp_array_api_Int___init__ 0)) $__expr_4 (egglog_exp_array_api_Value_from_int (egglog_exp_array_api_Int___init__ 2))))) (egglog_exp_array_api_NDArray___init__ (egglog_exp_array_api_RecursiveValue___init__ (egglog_exp_array_api_Value_from_int (egglog_exp_array_api_Int___init__ 0))))))))
(let $__expr_7 (egglog_exp_array_api_assume_isfinite (egglog_exp_array_api_assume_shape (egglog_exp_array_api_assume_dtype (egglog_exp_array_api_NDArray_var "X") (egglog_exp_array_api_DType_float64 )) (egglog_exp_array_api_TupleInt___init__ (vec-of $__expr_3 (egglog_exp_array_api_Int___init__ 4))))))
(let $__expr_8 (egglog_exp_array_api_Int___init__ 0))
(let $__expr_9 (egglog_exp_array_api_Int___init__ 1))
(let $__expr_11 (egglog_exp_array_api_Value_from_int (egglog_exp_array_api_Int___init__ 2)))
(let $__expr_10 (egglog_exp_array_api_NDArray___getitem__ $__expr_7 (egglog_exp_array_api_IndexKey_ndarray (egglog_exp_array_api_NDArray___eq__ (egglog_exp_array_api_assume_value_one_of (egglog_exp_array_api_assume_shape (egglog_exp_array_api_assume_dtype (egglog_exp_array_api_NDArray_var "y") (egglog_exp_array_api_DType_int64 )) (egglog_exp_array_api_TupleInt___init__ (vec-of $__expr_3))) (egglog_exp_array_api_TupleValue___init__ (vec-of (egglog_exp_array_api_Value_from_int (egglog_exp_array_api_Int___init__ 0)) $__expr_4 (egglog_exp_array_api_Value_from_int (egglog_exp_array_api_Int___init__ 2))))) (egglog_exp_array_api_NDArray___init__ (egglog_exp_array_api_RecursiveValue___init__ $__expr_11))))))
(let $__expr_12 (egglog_exp_array_api_Value_from_int (egglog_exp_array_api_Int___init__ 0)))
(sort egglog.exp.array_api.MultiAxisIndexKeyItem)
(sort egglog.exp.array_api.Slice)
(constructor egglog_exp_array_api_MultiAxisIndexKeyItem_slice (egglog.exp.array_api.Slice) egglog.exp.array_api.MultiAxisIndexKeyItem)
(sort egglog.exp.array_api.OptionalInt)
(constructor egglog_exp_array_api_Slice___init__ (egglog.exp.array_api.OptionalInt egglog.exp.array_api.OptionalInt egglog.exp.array_api.OptionalInt) egglog.exp.array_api.Slice)
(constructor egglog_exp_array_api_OptionalInt_none () egglog.exp.array_api.OptionalInt)
(let $__expr_13 (egglog_exp_array_api_MultiAxisIndexKeyItem_slice (egglog_exp_array_api_Slice___init__ (egglog_exp_array_api_OptionalInt_none ) (egglog_exp_array_api_OptionalInt_none ) (egglog_exp_array_api_OptionalInt_none ))))
(sort egglog.exp.array_api.MultiAxisIndexKey)
(constructor egglog_exp_array_api_IndexKey_multi_axis (egglog.exp.array_api.MultiAxisIndexKey) egglog.exp.array_api.IndexKey)
(sort egglog.builtins.Vec[egglog.exp.array_api.MultiAxisIndexKeyItem] (Vec egglog.exp.array_api.MultiAxisIndexKeyItem))
(constructor egglog_exp_array_api_MultiAxisIndexKey_from_vec (egglog.builtins.Vec[egglog.exp.array_api.MultiAxisIndexKeyItem]) egglog.exp.array_api.MultiAxisIndexKey)
(constructor egglog_exp_array_api_MultiAxisIndexKeyItem_int (egglog.exp.array_api.Int) egglog.exp.array_api.MultiAxisIndexKeyItem)
(let $__expr_14 (egglog_exp_array_api_IndexKey_multi_axis (egglog_exp_array_api_MultiAxisIndexKey_from_vec (vec-of (egglog_exp_array_api_MultiAxisIndexKeyItem_int $__expr_8) $__expr_13))))
(sort egglog.exp.array_api.OptionalIntOrTuple)
(constructor egglog_exp_array_api_OptionalIntOrTuple_int (egglog.exp.array_api.Int) egglog.exp.array_api.OptionalIntOrTuple)
(let $__expr_15 (egglog_exp_array_api_OptionalIntOrTuple_int $__expr_8))
(let $__expr_16 (egglog_exp_array_api_IndexKey_multi_axis (egglog_exp_array_api_MultiAxisIndexKey_from_vec (vec-of (egglog_exp_array_api_MultiAxisIndexKeyItem_int $__expr_9) $__expr_13))))
(let $__expr_17 (egglog_exp_array_api_IndexKey_multi_axis (egglog_exp_array_api_MultiAxisIndexKey_from_vec (vec-of (egglog_exp_array_api_MultiAxisIndexKeyItem_int (egglog_exp_array_api_Int___init__ 2)) $__expr_13))))
(let $__expr_19 (egglog_exp_array_api_Int___init__ 2))
(let $__expr_20 (egglog_exp_array_api_DType_float64 ))
(let $__expr_21 (egglog_exp_array_api_assume_value_one_of (egglog_exp_array_api_assume_shape (egglog_exp_array_api_assume_dtype (egglog_exp_array_api_NDArray_var "y") (egglog_exp_array_api_DType_int64 )) (egglog_exp_array_api_TupleInt___init__ (vec-of $__expr_3))) (egglog_exp_array_api_TupleValue___init__ (vec-of (egglog_exp_array_api_Value_from_int (egglog_exp_array_api_Int___init__ 0)) $__expr_4 (egglog_exp_array_api_Value_from_int (egglog_exp_array_api_Int___init__ 2))))))
(constructor egglog_exp_array_api_NDArray___setitem__ (egglog.exp.array_api.NDArray egglog.exp.array_api.IndexKey egglog.exp.array_api.NDArray) egglog.exp.array_api.NDArray)
(sort egglog.exp.array_api.OptionalDType)
(sort egglog.exp.array_api.OptionalDevice)
(constructor egglog_exp_array_api_zeros (egglog.exp.array_api.TupleInt egglog.exp.array_api.OptionalDType egglog.exp.array_api.OptionalDevice) egglog.exp.array_api.NDArray)
(constructor egglog_exp_array_api_OptionalDType_some (egglog.exp.array_api.DType) egglog.exp.array_api.OptionalDType)
(sort egglog.exp.array_api.Device)
(constructor egglog_exp_array_api_OptionalDevice_some (egglog.exp.array_api.Device) egglog.exp.array_api.OptionalDevice)
(constructor egglog_exp_array_api_NDArray_device (egglog.exp.array_api.NDArray) egglog.exp.array_api.Device)
(constructor egglog_exp_array_api_NDArray___truediv__ (egglog.exp.array_api.NDArray egglog.exp.array_api.NDArray) egglog.exp.array_api.NDArray)
(constructor egglog_exp_array_api_sum (egglog.exp.array_api.NDArray egglog.exp.array_api.OptionalIntOrTuple) egglog.exp.array_api.NDArray)
(constructor egglog_exp_array_api_TupleInt___getitem__ (egglog.exp.array_api.TupleInt egglog.exp.array_api.Int) egglog.exp.array_api.Int)
(constructor egglog_exp_array_api_NDArray_shape (egglog.exp.array_api.NDArray) egglog.exp.array_api.TupleInt)
(let $__expr_18 (egglog_exp_array_api_NDArray___setitem__ (egglog_exp_array_api_NDArray___setitem__ (egglog_exp_array_api_NDArray___setitem__ (egglog_exp_array_api_zeros (egglog_exp_array_api_TupleInt___init__ (vec-of (egglog_exp_array_api_Int___init__ 3) $__expr_5)) (egglog_exp_array_api_OptionalDType_some $__expr_20) (egglog_exp_array_api_OptionalDevice_some (egglog_exp_array_api_NDArray_device $__expr_7))) $__expr_14 (egglog_exp_array_api_NDArray___truediv__ (egglog_exp_array_api_sum $__expr_6 $__expr_15) (egglog_exp_array_api_NDArray___init__ (egglog_exp_array_api_RecursiveValue___init__ (egglog_exp_array_api_Value_from_int (egglog_exp_array_api_TupleInt___getitem__ (egglog_exp_array_api_NDArray_shape $__expr_6) $__expr_8)))))) $__expr_16 (egglog_exp_array_api_NDArray___truediv__ (egglog_exp_array_api_sum $__expr_2 $__expr_15) (egglog_exp_array_api_NDArray___init__ (egglog_exp_array_api_RecursiveValue___init__ (egglog_exp_array_api_Value_from_int (egglog_exp_array_api_TupleInt___getitem__ (egglog_exp_array_api_NDArray_shape $__expr_2) $__expr_8)))))) $__expr_17 (egglog_exp_array_api_NDArray___truediv__ (egglog_exp_array_api_sum $__expr_10 $__expr_15) (egglog_exp_array_api_NDArray___init__ (egglog_exp_array_api_RecursiveValue___init__ (egglog_exp_array_api_Value_from_int (egglog_exp_array_api_TupleInt___getitem__ (egglog_exp_array_api_NDArray_shape $__expr_10) $__expr_8)))))))
(sort egglog.exp.array_api.TupleNDArray)
(constructor egglog_exp_array_api_concat (egglog.exp.array_api.TupleNDArray egglog.exp.array_api.OptionalInt) egglog.exp.array_api.NDArray)
(sort egglog.builtins.Vec[egglog.exp.array_api.NDArray] (Vec egglog.exp.array_api.NDArray))
(constructor egglog_exp_array_api_TupleNDArray___init__ (egglog.builtins.Vec[egglog.exp.array_api.NDArray]) egglog.exp.array_api.TupleNDArray)
(constructor egglog_exp_array_api_NDArray___sub__ (egglog.exp.array_api.NDArray egglog.exp.array_api.NDArray) egglog.exp.array_api.NDArray)
(constructor egglog_exp_array_api_OptionalInt_some (egglog.exp.array_api.Int) egglog.exp.array_api.OptionalInt)
(let $__expr_1 (egglog_exp_array_api_concat (egglog_exp_array_api_TupleNDArray___init__ (vec-of (egglog_exp_array_api_NDArray___sub__ $__expr_6 (egglog_exp_array_api_NDArray___getitem__ $__expr_18 $__expr_14)) (egglog_exp_array_api_NDArray___sub__ $__expr_2 (egglog_exp_array_api_NDArray___getitem__ $__expr_18 $__expr_16)) (egglog_exp_array_api_NDArray___sub__ $__expr_10 (egglog_exp_array_api_NDArray___getitem__ $__expr_18 $__expr_17)))) (egglog_exp_array_api_OptionalInt_some $__expr_8)))
(constructor egglog_exp_array_api_OptionalIntOrTuple_none () egglog.exp.array_api.OptionalIntOrTuple)
(let $__expr_23 (egglog_exp_array_api_OptionalIntOrTuple_none ))
(let $__expr_24 (from-string "1"))
(let $__expr_25 (egglog_exp_array_api_NDArray___eq__ (egglog_exp_array_api_assume_value_one_of (egglog_exp_array_api_assume_shape (egglog_exp_array_api_assume_dtype (egglog_exp_array_api_NDArray_var "y") (egglog_exp_array_api_DType_int64 )) (egglog_exp_array_api_TupleInt___init__ (vec-of $__expr_3))) (egglog_exp_array_api_TupleValue___init__ (vec-of (egglog_exp_array_api_Value_from_int (egglog_exp_array_api_Int___init__ 0)) $__expr_4 (egglog_exp_array_api_Value_from_int (egglog_exp_array_api_Int___init__ 2))))) (egglog_exp_array_api_NDArray___init__ (egglog_exp_array_api_RecursiveValue___init__ (egglog_exp_array_api_Value_from_int (egglog_exp_array_api_Int___init__ 0))))))
(let $__expr_26 (egglog_exp_array_api_NDArray___eq__ (egglog_exp_array_api_assume_value_one_of (egglog_exp_array_api_assume_shape (egglog_exp_array_api_assume_dtype (egglog_exp_array_api_NDArray_var "y") (egglog_exp_array_api_DType_int64 )) (egglog_exp_array_api_TupleInt___init__ (vec-of $__expr_3))) (egglog_exp_array_api_TupleValue___init__ (vec-of (egglog_exp_array_api_Value_from_int (egglog_exp_array_api_Int___init__ 0)) $__expr_4 (egglog_exp_array_api_Value_from_int (egglog_exp_array_api_Int___init__ 2))))) (egglog_exp_array_api_NDArray___init__ (egglog_exp_array_api_RecursiveValue___init__ $__expr_11))))
(let $__expr_27 (egglog_exp_array_api_NDArray___eq__ (egglog_exp_array_api_assume_value_one_of (egglog_exp_array_api_assume_shape (egglog_exp_array_api_assume_dtype (egglog_exp_array_api_NDArray_var "y") (egglog_exp_array_api_DType_int64 )) (egglog_exp_array_api_TupleInt___init__ (vec-of $__expr_3))) (egglog_exp_array_api_TupleValue___init__ (vec-of (egglog_exp_array_api_Value_from_int (egglog_exp_array_api_Int___init__ 0)) $__expr_4 (egglog_exp_array_api_Value_from_int (egglog_exp_array_api_Int___init__ 2))))) (egglog_exp_array_api_NDArray___init__ (egglog_exp_array_api_RecursiveValue___init__ $__expr_4))))
(constructor egglog_exp_array_api_square (egglog.exp.array_api.NDArray) egglog.exp.array_api.NDArray)
(constructor egglog_exp_array_api_expand_dims (egglog.exp.array_api.NDArray egglog.exp.array_api.Int) egglog.exp.array_api.NDArray)
(let $__expr_28 (egglog_exp_array_api_square (egglog_exp_array_api_NDArray___sub__ $__expr_1 (egglog_exp_array_api_expand_dims (egglog_exp_array_api_NDArray___truediv__ (egglog_exp_array_api_sum $__expr_1 $__expr_15) (egglog_exp_array_api_NDArray___init__ (egglog_exp_array_api_RecursiveValue___init__ (egglog_exp_array_api_Value_from_int (egglog_exp_array_api_TupleInt___getitem__ (egglog_exp_array_api_NDArray_shape $__expr_1) $__expr_8))))) $__expr_8))))
(let $__expr_29 (egglog_exp_array_api_TupleInt___init__ (vec-empty )))
(let $__expr_31 (egglog_exp_array_api_OptionalDType_some $__expr_20))
(let $__expr_32 (egglog_exp_array_api_OptionalDevice_some (egglog_exp_array_api_NDArray_device $__expr_7)))
(let $__expr_33 (egglog_exp_array_api_NDArray___init__ (egglog_exp_array_api_RecursiveValue___init__ (egglog_exp_array_api_Value_from_int (egglog_exp_array_api_Int___init__ 0)))))
(constructor ndarray-sqrt (egglog.exp.array_api.NDArray) egglog.exp.array_api.NDArray)
(let $__expr_34 (ndarray-sqrt (egglog_exp_array_api_NDArray___truediv__ (egglog_exp_array_api_sum $__expr_28 $__expr_15) (egglog_exp_array_api_NDArray___init__ (egglog_exp_array_api_RecursiveValue___init__ (egglog_exp_array_api_Value_from_int (egglog_exp_array_api_TupleInt___getitem__ (egglog_exp_array_api_NDArray_shape $__expr_28) $__expr_8)))))))
(constructor egglog_exp_array_api_TupleNDArray___getitem__ (egglog.exp.array_api.TupleNDArray egglog.exp.array_api.Int) egglog.exp.array_api.NDArray)
(sort egglog.exp.array_api.Boolean)
(constructor egglog_exp_array_api_svd_ (egglog.exp.array_api.NDArray egglog.exp.array_api.Boolean) egglog.exp.array_api.TupleNDArray)
(constructor egglog_exp_array_api_NDArray___mul__ (egglog.exp.array_api.NDArray egglog.exp.array_api.NDArray) egglog.exp.array_api.NDArray)
(sort egglog.exp.array_api.OptionalBool)
(constructor egglog_exp_array_api_asarray (egglog.exp.array_api.NDArray egglog.exp.array_api.OptionalDType egglog.exp.array_api.OptionalBool egglog.exp.array_api.OptionalDevice) egglog.exp.array_api.NDArray)
(sort egglog.exp.array_api.Float)
(constructor egglog_exp_array_api_Value_from_float (egglog.exp.array_api.Float) egglog.exp.array_api.Value)
(constructor egglog_exp_array_api_Float_rational (BigRat) egglog.exp.array_api.Float :cost 2)
(constructor egglog_exp_array_api_OptionalBool_none () egglog.exp.array_api.OptionalBool)
(constructor egglog_exp_array_api_Value___truediv__ (egglog.exp.array_api.Value egglog.exp.array_api.Value) egglog.exp.array_api.Value)
(constructor egglog_exp_array_api_Boolean___init__ (bool) egglog.exp.array_api.Boolean)
(let $__expr_30 (egglog_exp_array_api_TupleNDArray___getitem__ (egglog_exp_array_api_svd_ (egglog_exp_array_api_NDArray___mul__ (ndarray-sqrt (egglog_exp_array_api_asarray (egglog_exp_array_api_NDArray___init__ (egglog_exp_array_api_RecursiveValue___init__ (egglog_exp_array_api_Value_from_float (egglog_exp_array_api_Float_rational (bigrat $__expr_24 (from-string "147")))))) $__expr_31 (egglog_exp_array_api_OptionalBool_none ) $__expr_32)) (egglog_exp_array_api_NDArray___truediv__ $__expr_1 (egglog_exp_array_api_NDArray___setitem__ $__expr_34 (egglog_exp_array_api_IndexKey_ndarray (egglog_exp_array_api_NDArray___eq__ $__expr_34 $__expr_33)) (egglog_exp_array_api_NDArray___init__ (egglog_exp_array_api_RecursiveValue___init__ (egglog_exp_array_api_Value___truediv__ (egglog_exp_array_api_Value_from_int $__expr_3) (egglog_exp_array_api_Value_from_int $__expr_3))))))) (egglog_exp_array_api_Boolean___init__ false)) $__expr_9))
(let $__expr_36 (egglog_exp_array_api_OptionalInt_none ))
(constructor egglog_exp_array_api_Value_to_int (egglog.exp.array_api.Value) egglog.exp.array_api.Int)
(constructor egglog_exp_array_api_NDArray_index (egglog.exp.array_api.NDArray egglog.exp.array_api.TupleInt) egglog.exp.array_api.Value)
(constructor egglog_exp_array_api_astype (egglog.exp.array_api.NDArray egglog.exp.array_api.DType) egglog.exp.array_api.NDArray)
(constructor egglog_exp_array_api_NDArray___gt__ (egglog.exp.array_api.NDArray egglog.exp.array_api.NDArray) egglog.exp.array_api.NDArray)
(constructor egglog_exp_array_api_Float___init__ (f64) egglog.exp.array_api.Float :cost 3)
(constructor egglog_exp_array_api_DType_int32 () egglog.exp.array_api.DType)
(let $__expr_35 (egglog_exp_array_api_Slice___init__ $__expr_36 (egglog_exp_array_api_OptionalInt_some (egglog_exp_array_api_Value_to_int (egglog_exp_array_api_NDArray_index (egglog_exp_array_api_sum (egglog_exp_array_api_astype (egglog_exp_array_api_NDArray___gt__ $__expr_30 (egglog_exp_array_api_NDArray___init__ (egglog_exp_array_api_RecursiveValue___init__ (egglog_exp_array_api_Value_from_float (egglog_exp_array_api_Float___init__ 0.0001))))) (egglog_exp_array_api_DType_int32 )) $__expr_23) $__expr_29))) $__expr_36))
(sort egglog.builtins.Vec[egglog.exp.array_api.RecursiveValue] (Vec egglog.exp.array_api.RecursiveValue))
(constructor egglog_exp_array_api_RecursiveValue_vec (egglog.builtins.Vec[egglog.exp.array_api.RecursiveValue]) egglog.exp.array_api.RecursiveValue)
(let $__expr_37 (egglog_exp_array_api_NDArray___truediv__ (egglog_exp_array_api_astype (egglog_exp_array_api_NDArray___init__ (egglog_exp_array_api_RecursiveValue_vec (vec-of (egglog_exp_array_api_RecursiveValue___init__ (egglog_exp_array_api_NDArray_index (egglog_exp_array_api_sum $__expr_25 $__expr_23) $__expr_29)) (egglog_exp_array_api_RecursiveValue___init__ (egglog_exp_array_api_NDArray_index (egglog_exp_array_api_sum $__expr_27 $__expr_23) $__expr_29)) (egglog_exp_array_api_RecursiveValue___init__ (egglog_exp_array_api_NDArray_index (egglog_exp_array_api_sum $__expr_26 $__expr_23) $__expr_29))))) $__expr_20) (egglog_exp_array_api_NDArray___init__ (egglog_exp_array_api_RecursiveValue___init__ (egglog_exp_array_api_Value_from_int $__expr_3)))))
(let $__expr_38 (egglog_exp_array_api_svd_ (egglog_exp_array_api_NDArray___mul__ (ndarray-sqrt (egglog_exp_array_api_asarray (egglog_exp_array_api_NDArray___init__ (egglog_exp_array_api_RecursiveValue___init__ (egglog_exp_array_api_Value_from_float (egglog_exp_array_api_Float_rational (bigrat $__expr_24 (from-string "147")))))) $__expr_31 (egglog_exp_array_api_OptionalBool_none ) $__expr_32)) (egglog_exp_array_api_NDArray___truediv__ $__expr_1 (egglog_exp_array_api_NDArray___setitem__ $__expr_34 (egglog_exp_array_api_IndexKey_ndarray (egglog_exp_array_api_NDArray___eq__ $__expr_34 $__expr_33)) (egglog_exp_array_api_NDArray___init__ (egglog_exp_array_api_RecursiveValue___init__ (egglog_exp_array_api_Value___truediv__ (egglog_exp_array_api_Value_from_int $__expr_3) (egglog_exp_array_api_Value_from_int $__expr_3))))))) (egglog_exp_array_api_Boolean___init__ false)))
(let $__expr_39 (egglog_exp_array_api_Boolean___init__ false))
(let $__expr_40 (egglog_exp_array_api_NDArray___setitem__ $__expr_34 (egglog_exp_array_api_IndexKey_ndarray (egglog_exp_array_api_NDArray___eq__ $__expr_34 $__expr_33)) (egglog_exp_array_api_NDArray___init__ (egglog_exp_array_api_RecursiveValue___init__ (egglog_exp_array_api_Value___truediv__ (egglog_exp_array_api_Value_from_int $__expr_3) (egglog_exp_array_api_Value_from_int $__expr_3))))))
(constructor egglog_exp_array_api_NDArray___matmul__ (egglog.exp.array_api.NDArray egglog.exp.array_api.NDArray) egglog.exp.array_api.NDArray)
(constructor egglog_exp_array_api_NDArray_T (egglog.exp.array_api.NDArray) egglog.exp.array_api.NDArray)
(constructor egglog_exp_array_api_IndexKey_slice (egglog.exp.array_api.Slice) egglog.exp.array_api.IndexKey)
(let $__expr_22 (egglog_exp_array_api_TupleNDArray___getitem__ (egglog_exp_array_api_svd_ (egglog_exp_array_api_NDArray___matmul__ (egglog_exp_array_api_NDArray_T (egglog_exp_array_api_NDArray___mul__ (ndarray-sqrt (egglog_exp_array_api_NDArray___mul__ (egglog_exp_array_api_NDArray___mul__ (egglog_exp_array_api_NDArray___init__ (egglog_exp_array_api_RecursiveValue___init__ (egglog_exp_array_api_Value_from_int $__expr_3))) $__expr_37) (egglog_exp_array_api_NDArray___init__ (egglog_exp_array_api_RecursiveValue___init__ (egglog_exp_array_api_Value_from_float (egglog_exp_array_api_Float_rational (bigrat $__expr_24 (from-string "2")))))))) (egglog_exp_array_api_NDArray_T (egglog_exp_array_api_NDArray___sub__ $__expr_18 (egglog_exp_array_api_NDArray___matmul__ $__expr_37 $__expr_18))))) (egglog_exp_array_api_NDArray___truediv__ (egglog_exp_array_api_NDArray_T (egglog_exp_array_api_NDArray___truediv__ (egglog_exp_array_api_NDArray___getitem__ (egglog_exp_array_api_TupleNDArray___getitem__ $__expr_38 $__expr_19) (egglog_exp_array_api_IndexKey_multi_axis (egglog_exp_array_api_MultiAxisIndexKey_from_vec (vec-of (egglog_exp_array_api_MultiAxisIndexKeyItem_slice $__expr_35) $__expr_13)))) $__expr_40)) (egglog_exp_array_api_NDArray___getitem__ $__expr_30 (egglog_exp_array_api_IndexKey_slice $__expr_35)))) $__expr_39) $__expr_9))
(let $__expr_41 (egglog_exp_array_api_NDArray___init__ (egglog_exp_array_api_RecursiveValue___init__ (egglog_exp_array_api_Value_from_float (egglog_exp_array_api_Float___init__ 0.0001)))))
(let $__expr_42 (egglog_exp_array_api_svd_ (egglog_exp_array_api_NDArray___matmul__ (egglog_exp_array_api_NDArray_T (egglog_exp_array_api_NDArray___mul__ (ndarray-sqrt (egglog_exp_array_api_NDArray___mul__ (egglog_exp_array_api_NDArray___mul__ (egglog_exp_array_api_NDArray___init__ (egglog_exp_array_api_RecursiveValue___init__ (egglog_exp_array_api_Value_from_int $__expr_3))) $__expr_37) (egglog_exp_array_api_NDArray___init__ (egglog_exp_array_api_RecursiveValue___init__ (egglog_exp_array_api_Value_from_float (egglog_exp_array_api_Float_rational (bigrat $__expr_24 (from-string "2")))))))) (egglog_exp_array_api_NDArray_T (egglog_exp_array_api_NDArray___sub__ $__expr_18 (egglog_exp_array_api_NDArray___matmul__ $__expr_37 $__expr_18))))) (egglog_exp_array_api_NDArray___truediv__ (egglog_exp_array_api_NDArray_T (egglog_exp_array_api_NDArray___truediv__ (egglog_exp_array_api_NDArray___getitem__ (egglog_exp_array_api_TupleNDArray___getitem__ $__expr_38 $__expr_19) (egglog_exp_array_api_IndexKey_multi_axis (egglog_exp_array_api_MultiAxisIndexKey_from_vec (vec-of (egglog_exp_array_api_MultiAxisIndexKeyItem_slice $__expr_35) $__expr_13)))) $__expr_40)) (egglog_exp_array_api_NDArray___getitem__ $__expr_30 (egglog_exp_array_api_IndexKey_slice $__expr_35)))) $__expr_39))
(let $__expr_43 (egglog_exp_array_api_DType_int32 ))
(let $__expr_44 (egglog_exp_array_api_NDArray___matmul__ $__expr_37 $__expr_18))
(let $__expr_45 (egglog_exp_array_api_NDArray_var "y"))
(let $__expr_46 (egglog_exp_array_api_Value_from_int $__expr_3))
(let $__expr_47 (egglog_exp_array_api_NDArray___init__ (egglog_exp_array_api_RecursiveValue___init__ (egglog_exp_array_api_Value_from_int $__expr_3))))
(let $__expr_48 0)
(let $__expr_49 (egglog_exp_array_api_NDArray___truediv__ (egglog_exp_array_api_NDArray_T (egglog_exp_array_api_NDArray___truediv__ (egglog_exp_array_api_NDArray___getitem__ (egglog_exp_array_api_TupleNDArray___getitem__ $__expr_38 $__expr_19) (egglog_exp_array_api_IndexKey_multi_axis (egglog_exp_array_api_MultiAxisIndexKey_from_vec (vec-of (egglog_exp_array_api_MultiAxisIndexKeyItem_slice $__expr_35) $__expr_13)))) $__expr_40)) (egglog_exp_array_api_NDArray___getitem__ $__expr_30 (egglog_exp_array_api_IndexKey_slice $__expr_35))))
(let $__expr_50 (egglog_exp_array_api_NDArray_var "X"))
(sort egglog.exp.program_gen.Program)
(relation egglog_exp_program_gen_Program_compile (egglog.exp.program_gen.Program i64))
(constructor egglog_exp_array_api_program_gen_ndarray_function_two_program (egglog.exp.array_api.NDArray egglog.exp.array_api.NDArray egglog.exp.array_api.NDArray) egglog.exp.program_gen.Program)
(constructor egglog_exp_array_api_IndexKey_int (egglog.exp.array_api.Int) egglog.exp.array_api.IndexKey)
(let $__expr_0 (egglog_exp_program_gen_Program_compile (egglog_exp_array_api_program_gen_ndarray_function_two_program (egglog_exp_array_api_NDArray___getitem__ (egglog_exp_array_api_NDArray___matmul__ (egglog_exp_array_api_NDArray___sub__ $__expr_7 $__expr_44) (egglog_exp_array_api_NDArray___matmul__ $__expr_49 (egglog_exp_array_api_NDArray___getitem__ (egglog_exp_array_api_NDArray_T (egglog_exp_array_api_TupleNDArray___getitem__ $__expr_42 $__expr_19)) (egglog_exp_array_api_IndexKey_multi_axis (egglog_exp_array_api_MultiAxisIndexKey_from_vec (vec-of $__expr_13 (egglog_exp_array_api_MultiAxisIndexKeyItem_slice (egglog_exp_array_api_Slice___init__ $__expr_36 (egglog_exp_array_api_OptionalInt_some (egglog_exp_array_api_Value_to_int (egglog_exp_array_api_NDArray_index (egglog_exp_array_api_sum (egglog_exp_array_api_astype (egglog_exp_array_api_NDArray___gt__ $__expr_22 (egglog_exp_array_api_NDArray___mul__ $__expr_41 (egglog_exp_array_api_NDArray___getitem__ $__expr_22 (egglog_exp_array_api_IndexKey_int $__expr_8)))) $__expr_43) $__expr_23) $__expr_29))) $__expr_36)))))))) (egglog_exp_array_api_IndexKey_multi_axis (egglog_exp_array_api_MultiAxisIndexKey_from_vec (vec-of $__expr_13 (egglog_exp_array_api_MultiAxisIndexKeyItem_slice (egglog_exp_array_api_Slice___init__ $__expr_36 (egglog_exp_array_api_OptionalInt_some $__expr_19) $__expr_36)))))) $__expr_50 $__expr_45) $__expr_48))
(ruleset egglog.exp.array_api_program_gen.array_api_program_gen_ruleset)
(constructor egglog_exp_program_gen_Program_function_two (egglog.exp.program_gen.Program egglog.exp.program_gen.Program egglog.exp.program_gen.Program String) egglog.exp.program_gen.Program)
(constructor egglog_exp_array_api_program_gen_ndarray_program (egglog.exp.array_api.NDArray) egglog.exp.program_gen.Program)
(rewrite (egglog_exp_array_api_program_gen_ndarray_function_two_program _res _l _r) (egglog_exp_program_gen_Program_function_two (egglog_exp_array_api_program_gen_ndarray_program _res) (egglog_exp_array_api_program_gen_ndarray_program _l) (egglog_exp_array_api_program_gen_ndarray_program _r) "__fn") :ruleset egglog.exp.array_api_program_gen.array_api_program_gen_ruleset)
(constructor egglog_exp_array_api_program_gen_vec_recursive_value_program (egglog.builtins.Vec[egglog.exp.array_api.RecursiveValue]) egglog.exp.program_gen.Program)
(constructor egglog_exp_program_gen_Program___init__ (String bool) egglog.exp.program_gen.Program)
(rewrite (egglog_exp_array_api_program_gen_vec_recursive_value_program (vec-empty )) (egglog_exp_program_gen_Program___init__ "" false) :ruleset egglog.exp.array_api_program_gen.array_api_program_gen_ruleset)
(constructor egglog_exp_program_gen_Program___add__ (egglog.exp.program_gen.Program egglog.exp.program_gen.Program) egglog.exp.program_gen.Program)
(constructor egglog_exp_array_api_program_gen_recursive_value_program (egglog.exp.array_api.RecursiveValue) egglog.exp.program_gen.Program)
(rewrite (egglog_exp_array_api_program_gen_vec_recursive_value_program _vv) (egglog_exp_program_gen_Program___add__ (egglog_exp_program_gen_Program___add__ (egglog_exp_array_api_program_gen_recursive_value_program (vec-get _vv $__expr_48)) (egglog_exp_program_gen_Program___init__ ", " false)) (egglog_exp_array_api_program_gen_vec_recursive_value_program (vec-remove _vv $__expr_48))) :when ((> (vec-length _vv) $__expr_48)) :ruleset egglog.exp.array_api_program_gen.array_api_program_gen_ruleset)
(constructor egglog_exp_array_api_program_gen_value_program (egglog.exp.array_api.Value) egglog.exp.program_gen.Program)
(rewrite (egglog_exp_array_api_program_gen_recursive_value_program (egglog_exp_array_api_RecursiveValue___init__ _v)) (egglog_exp_array_api_program_gen_value_program _v) :ruleset egglog.exp.array_api_program_gen.array_api_program_gen_ruleset)
(rewrite (egglog_exp_array_api_program_gen_recursive_value_program (egglog_exp_array_api_RecursiveValue_vec _vv)) (egglog_exp_program_gen_Program___add__ (egglog_exp_program_gen_Program___add__ (egglog_exp_program_gen_Program___init__ "(" false) (egglog_exp_array_api_program_gen_vec_recursive_value_program _vv)) (egglog_exp_program_gen_Program___init__ ")" false)) :ruleset egglog.exp.array_api_program_gen.array_api_program_gen_ruleset)
(constructor _lambda_0 (egglog.exp.program_gen.Program egglog.exp.array_api.NDArray) egglog.exp.program_gen.Program)
(rewrite (_lambda_0 _acc _i) (egglog_exp_program_gen_Program___add__ (egglog_exp_program_gen_Program___add__ _acc (egglog_exp_array_api_program_gen_ndarray_program _i)) (egglog_exp_program_gen_Program___init__ ", " false)) :subsume :ruleset egglog.exp.array_api_program_gen.array_api_program_gen_ruleset)
(constructor egglog_exp_array_api_program_gen_tuple_ndarray_program (egglog.exp.array_api.TupleNDArray) egglog.exp.program_gen.Program)
(sort egglog.builtins.UnstableFn[egglog.exp.program_gen.Program,egglog.exp.program_gen.Program,egglog.exp.array_api.NDArray] (UnstableFn (egglog.exp.program_gen.Program egglog.exp.array_api.NDArray) egglog.exp.program_gen.Program))
(constructor egglog_exp_array_api_program_gen_tuple_ndarray_foldl_program (egglog.exp.array_api.TupleNDArray egglog.builtins.UnstableFn[egglog.exp.program_gen.Program,egglog.exp.program_gen.Program,egglog.exp.array_api.NDArray] egglog.exp.program_gen.Program) egglog.exp.program_gen.Program)
(rewrite (egglog_exp_array_api_program_gen_tuple_ndarray_program _x) (egglog_exp_program_gen_Program___add__ (egglog_exp_array_api_program_gen_tuple_ndarray_foldl_program _x (unstable-fn "_lambda_0") (egglog_exp_program_gen_Program___init__ "(" false)) (egglog_exp_program_gen_Program___init__ ")" false)) :ruleset egglog.exp.array_api_program_gen.array_api_program_gen_ruleset)
(rewrite (egglog_exp_array_api_program_gen_ndarray_program (egglog_exp_array_api_NDArray_var _s)) (egglog_exp_program_gen_Program___init__ _s true) :ruleset egglog.exp.array_api_program_gen.array_api_program_gen_ruleset)
(constructor egglog_exp_program_gen_Program_statement (egglog.exp.program_gen.Program egglog.exp.program_gen.Program) egglog.exp.program_gen.Program :unextractable)
(constructor egglog_exp_array_api_program_gen_dtype_program (egglog.exp.array_api.DType) egglog.exp.program_gen.Program)
(rewrite (egglog_exp_array_api_program_gen_ndarray_program (egglog_exp_array_api_assume_dtype _z _dtype)) (egglog_exp_program_gen_Program_statement (egglog_exp_array_api_program_gen_ndarray_program _z) (egglog_exp_program_gen_Program___add__ (egglog_exp_program_gen_Program___add__ (egglog_exp_program_gen_Program___add__ (egglog_exp_program_gen_Program___init__ "assert " false) (egglog_exp_array_api_program_gen_ndarray_program _z)) (egglog_exp_program_gen_Program___init__ ".dtype == " false)) (egglog_exp_array_api_program_gen_dtype_program _dtype))) :ruleset egglog.exp.array_api_program_gen.array_api_program_gen_ruleset)
(constructor egglog_exp_array_api_program_gen_tuple_int_program (egglog.exp.array_api.TupleInt) egglog.exp.program_gen.Program)
(rewrite (egglog_exp_array_api_program_gen_ndarray_program (egglog_exp_array_api_assume_shape _z _ti)) (egglog_exp_program_gen_Program_statement (egglog_exp_array_api_program_gen_ndarray_program _z) (egglog_exp_program_gen_Program___add__ (egglog_exp_program_gen_Program___add__ (egglog_exp_program_gen_Program___add__ (egglog_exp_program_gen_Program___init__ "assert " false) (egglog_exp_array_api_program_gen_ndarray_program _z)) (egglog_exp_program_gen_Program___init__ ".shape == " false)) (egglog_exp_array_api_program_gen_tuple_int_program _ti))) :ruleset egglog.exp.array_api_program_gen.array_api_program_gen_ruleset)
(rewrite (egglog_exp_array_api_program_gen_ndarray_program (egglog_exp_array_api_assume_isfinite _z)) (egglog_exp_program_gen_Program_statement (egglog_exp_array_api_program_gen_ndarray_program _z) (egglog_exp_program_gen_Program___add__ (egglog_exp_program_gen_Program___add__ (egglog_exp_program_gen_Program___init__ "assert np.all(np.isfinite(" false) (egglog_exp_array_api_program_gen_ndarray_program _z)) (egglog_exp_program_gen_Program___init__ "))" false))) :ruleset egglog.exp.array_api_program_gen.array_api_program_gen_ruleset)
(constructor egglog_exp_array_api_program_gen_tuple_value_program (egglog.exp.array_api.TupleValue) egglog.exp.program_gen.Program)
(rewrite (egglog_exp_array_api_program_gen_ndarray_program (egglog_exp_array_api_assume_value_one_of _z _tv)) (egglog_exp_program_gen_Program_statement (egglog_exp_array_api_program_gen_ndarray_program _z) (egglog_exp_program_gen_Program___add__ (egglog_exp_program_gen_Program___add__ (egglog_exp_program_gen_Program___add__ (egglog_exp_program_gen_Program___add__ (egglog_exp_program_gen_Program___init__ "assert set(np.unique(" false) (egglog_exp_array_api_program_gen_ndarray_program _z)) (egglog_exp_program_gen_Program___init__ ")) == set(" false)) (egglog_exp_array_api_program_gen_tuple_value_program _tv)) (egglog_exp_program_gen_Program___init__ ")" false))) :ruleset egglog.exp.array_api_program_gen.array_api_program_gen_ruleset)
(constructor egglog_exp_array_api_reshape (egglog.exp.array_api.NDArray egglog.exp.array_api.TupleInt egglog.exp.array_api.OptionalBool) egglog.exp.array_api.NDArray)
(constructor egglog_exp_program_gen_Program_assign (egglog.exp.program_gen.Program) egglog.exp.program_gen.Program)
(rewrite (egglog_exp_array_api_program_gen_ndarray_program (egglog_exp_array_api_reshape _y _ti _ob)) (egglog_exp_program_gen_Program_assign (egglog_exp_program_gen_Program___add__ (egglog_exp_program_gen_Program___add__ (egglog_exp_program_gen_Program___add__ (egglog_exp_array_api_program_gen_ndarray_program _y) (egglog_exp_program_gen_Program___init__ ".reshape(" false)) (egglog_exp_array_api_program_gen_tuple_int_program _ti)) (egglog_exp_program_gen_Program___init__ ")" false))) :ruleset egglog.exp.array_api_program_gen.array_api_program_gen_ruleset)
(rewrite (egglog_exp_array_api_program_gen_ndarray_program (egglog_exp_array_api_astype _y _dtype)) (egglog_exp_program_gen_Program_assign (egglog_exp_program_gen_Program___add__ (egglog_exp_program_gen_Program___add__ (egglog_exp_program_gen_Program___add__ (egglog_exp_array_api_program_gen_ndarray_program _y) (egglog_exp_program_gen_Program___init__ ".astype(" false)) (egglog_exp_array_api_program_gen_dtype_program _dtype)) (egglog_exp_program_gen_Program___init__ ")" false))) :ruleset egglog.exp.array_api_program_gen.array_api_program_gen_ruleset)
(constructor egglog_exp_array_api_unique_counts (egglog.exp.array_api.NDArray) egglog.exp.array_api.TupleNDArray :unextractable)
(rewrite (egglog_exp_array_api_program_gen_tuple_ndarray_program (egglog_exp_array_api_unique_counts _x)) (egglog_exp_program_gen_Program_assign (egglog_exp_program_gen_Program___add__ (egglog_exp_program_gen_Program___add__ (egglog_exp_program_gen_Program___init__ "np.unique(" false) (egglog_exp_array_api_program_gen_ndarray_program _x)) (egglog_exp_program_gen_Program___init__ ", return_counts=True)" false))) :ruleset egglog.exp.array_api_program_gen.array_api_program_gen_ruleset)
(constructor egglog_exp_array_api_unique_inverse (egglog.exp.array_api.NDArray) egglog.exp.array_api.TupleNDArray :unextractable)
(rewrite (egglog_exp_array_api_program_gen_tuple_ndarray_program (egglog_exp_array_api_unique_inverse _x)) (egglog_exp_program_gen_Program_assign (egglog_exp_program_gen_Program___add__ (egglog_exp_program_gen_Program___add__ (egglog_exp_program_gen_Program___init__ "np.unique(" false) (egglog_exp_array_api_program_gen_ndarray_program _x)) (egglog_exp_program_gen_Program___init__ ", return_inverse=True)" false))) :ruleset egglog.exp.array_api_program_gen.array_api_program_gen_ruleset)
(constructor egglog_exp_array_api_program_gen_int_program (egglog.exp.array_api.Int) egglog.exp.program_gen.Program)
(rewrite (egglog_exp_array_api_program_gen_ndarray_program (egglog_exp_array_api_TupleNDArray___getitem__ _tnd _i)) (egglog_exp_program_gen_Program___add__ (egglog_exp_program_gen_Program___add__ (egglog_exp_program_gen_Program___add__ (egglog_exp_array_api_program_gen_tuple_ndarray_program _tnd) (egglog_exp_program_gen_Program___init__ "[" false)) (egglog_exp_array_api_program_gen_int_program _i)) (egglog_exp_program_gen_Program___init__ "]" false)) :ruleset egglog.exp.array_api_program_gen.array_api_program_gen_ruleset)
(rewrite (egglog_exp_array_api_program_gen_ndarray_program (egglog_exp_array_api_NDArray___init__ _rv)) (egglog_exp_program_gen_Program___add__ (egglog_exp_program_gen_Program___add__ (egglog_exp_program_gen_Program___init__ "np.array(" false) (egglog_exp_array_api_program_gen_recursive_value_program _rv)) (egglog_exp_program_gen_Program___init__ ")" false)) :ruleset egglog.exp.array_api_program_gen.array_api_program_gen_ruleset)
(constructor egglog_exp_array_api_OptionalDType_none () egglog.exp.array_api.OptionalDType)
(rewrite (egglog_exp_array_api_program_gen_ndarray_program (egglog_exp_array_api_zeros _ti (egglog_exp_array_api_OptionalDType_none ) _optional_device_)) (egglog_exp_program_gen_Program_assign (egglog_exp_program_gen_Program___add__ (egglog_exp_program_gen_Program___add__ (egglog_exp_program_gen_Program___init__ "np.zeros(" false) (egglog_exp_array_api_program_gen_tuple_int_program _ti)) (egglog_exp_program_gen_Program___init__ ")" false))) :ruleset egglog.exp.array_api_program_gen.array_api_program_gen_ruleset)
(rewrite (egglog_exp_array_api_program_gen_ndarray_program (egglog_exp_array_api_zeros _ti (egglog_exp_array_api_OptionalDType_some _dtype) _optional_device_)) (egglog_exp_program_gen_Program_assign (egglog_exp_program_gen_Program___add__ (egglog_exp_program_gen_Program___add__ (egglog_exp_program_gen_Program___add__ (egglog_exp_program_gen_Program___add__ (egglog_exp_program_gen_Program___init__ "np.zeros(" false) (egglog_exp_array_api_program_gen_tuple_int_program _ti)) (egglog_exp_program_gen_Program___init__ ", dtype=" false)) (egglog_exp_array_api_program_gen_dtype_program _dtype)) (egglog_exp_program_gen_Program___init__ ")" false))) :ruleset egglog.exp.array_api_program_gen.array_api_program_gen_ruleset)
(constructor egglog_exp_array_api_unique_values (egglog.exp.array_api.NDArray) egglog.exp.array_api.NDArray)
(rewrite (egglog_exp_array_api_program_gen_ndarray_program (egglog_exp_array_api_unique_values _x)) (egglog_exp_program_gen_Program_assign (egglog_exp_program_gen_Program___add__ (egglog_exp_program_gen_Program___add__ (egglog_exp_program_gen_Program___init__ "np.unique(" false) (egglog_exp_array_api_program_gen_ndarray_program _x)) (egglog_exp_program_gen_Program___init__ ")" false))) :ruleset egglog.exp.array_api_program_gen.array_api_program_gen_ruleset)
(constructor egglog_exp_array_api_NDArray___add__ (egglog.exp.array_api.NDArray egglog.exp.array_api.NDArray) egglog.exp.array_api.NDArray)
(rewrite (egglog_exp_array_api_program_gen_ndarray_program (egglog_exp_array_api_NDArray___add__ _x _y)) (egglog_exp_program_gen_Program_assign (egglog_exp_program_gen_Program___add__ (egglog_exp_program_gen_Program___add__ (egglog_exp_array_api_program_gen_ndarray_program _x) (egglog_exp_program_gen_Program___init__ " + " false)) (egglog_exp_array_api_program_gen_ndarray_program _y))) :ruleset egglog.exp.array_api_program_gen.array_api_program_gen_ruleset)
(rewrite (egglog_exp_array_api_program_gen_ndarray_program (egglog_exp_array_api_NDArray___sub__ _x _y)) (egglog_exp_program_gen_Program_assign (egglog_exp_program_gen_Program___add__ (egglog_exp_program_gen_Program___add__ (egglog_exp_array_api_program_gen_ndarray_program _x) (egglog_exp_program_gen_Program___init__ " - " false)) (egglog_exp_array_api_program_gen_ndarray_program _y))) :ruleset egglog.exp.array_api_program_gen.array_api_program_gen_ruleset)
(rewrite (egglog_exp_array_api_program_gen_ndarray_program (egglog_exp_array_api_NDArray___mul__ _x _y)) (egglog_exp_program_gen_Program_assign (egglog_exp_program_gen_Program___add__ (egglog_exp_program_gen_Program___add__ (egglog_exp_array_api_program_gen_ndarray_program _x) (egglog_exp_program_gen_Program___init__ " * " false)) (egglog_exp_array_api_program_gen_ndarray_program _y))) :ruleset egglog.exp.array_api_program_gen.array_api_program_gen_ruleset)
(rewrite (egglog_exp_array_api_program_gen_ndarray_program (egglog_exp_array_api_NDArray___truediv__ _x _y)) (egglog_exp_program_gen_Program_assign (egglog_exp_program_gen_Program___add__ (egglog_exp_program_gen_Program___add__ (egglog_exp_array_api_program_gen_ndarray_program _x) (egglog_exp_program_gen_Program___init__ " / " false)) (egglog_exp_array_api_program_gen_ndarray_program _y))) :ruleset egglog.exp.array_api_program_gen.array_api_program_gen_ruleset)
(constructor egglog_exp_array_api_NDArray___lt__ (egglog.exp.array_api.NDArray egglog.exp.array_api.NDArray) egglog.exp.array_api.NDArray)
(rewrite (egglog_exp_array_api_program_gen_ndarray_program (egglog_exp_array_api_NDArray___lt__ _x _y)) (egglog_exp_program_gen_Program_assign (egglog_exp_program_gen_Program___add__ (egglog_exp_program_gen_Program___add__ (egglog_exp_array_api_program_gen_ndarray_program _x) (egglog_exp_program_gen_Program___init__ " < " false)) (egglog_exp_array_api_program_gen_ndarray_program _y))) :ruleset egglog.exp.array_api_program_gen.array_api_program_gen_ruleset)
(constructor egglog_exp_array_api_NDArray___le__ (egglog.exp.array_api.NDArray egglog.exp.array_api.NDArray) egglog.exp.array_api.NDArray)
(rewrite (egglog_exp_array_api_program_gen_ndarray_program (egglog_exp_array_api_NDArray___le__ _x _y)) (egglog_exp_program_gen_Program_assign (egglog_exp_program_gen_Program___add__ (egglog_exp_program_gen_Program___add__ (egglog_exp_array_api_program_gen_ndarray_program _x) (egglog_exp_program_gen_Program___init__ " <= " false)) (egglog_exp_array_api_program_gen_ndarray_program _y))) :ruleset egglog.exp.array_api_program_gen.array_api_program_gen_ruleset)
(rewrite (egglog_exp_array_api_program_gen_ndarray_program (egglog_exp_array_api_NDArray___gt__ _x _y)) (egglog_exp_program_gen_Program_assign (egglog_exp_program_gen_Program___add__ (egglog_exp_program_gen_Program___add__ (egglog_exp_array_api_program_gen_ndarray_program _x) (egglog_exp_program_gen_Program___init__ " > " false)) (egglog_exp_array_api_program_gen_ndarray_program _y))) :ruleset egglog.exp.array_api_program_gen.array_api_program_gen_ruleset)
(constructor egglog_exp_array_api_NDArray___ge__ (egglog.exp.array_api.NDArray egglog.exp.array_api.NDArray) egglog.exp.array_api.NDArray)
(rewrite (egglog_exp_array_api_program_gen_ndarray_program (egglog_exp_array_api_NDArray___ge__ _x _y)) (egglog_exp_program_gen_Program_assign (egglog_exp_program_gen_Program___add__ (egglog_exp_program_gen_Program___add__ (egglog_exp_array_api_program_gen_ndarray_program _x) (egglog_exp_program_gen_Program___init__ " >= " false)) (egglog_exp_array_api_program_gen_ndarray_program _y))) :ruleset egglog.exp.array_api_program_gen.array_api_program_gen_ruleset)
(rewrite (egglog_exp_array_api_program_gen_ndarray_program (egglog_exp_array_api_NDArray___eq__ _x _y)) (egglog_exp_program_gen_Program_assign (egglog_exp_program_gen_Program___add__ (egglog_exp_program_gen_Program___add__ (egglog_exp_array_api_program_gen_ndarray_program _x) (egglog_exp_program_gen_Program___init__ " == " false)) (egglog_exp_array_api_program_gen_ndarray_program _y))) :ruleset egglog.exp.array_api_program_gen.array_api_program_gen_ruleset)
(rewrite (egglog_exp_array_api_program_gen_ndarray_program (egglog_exp_array_api_NDArray___matmul__ _x _y)) (egglog_exp_program_gen_Program_assign (egglog_exp_program_gen_Program___add__ (egglog_exp_program_gen_Program___add__ (egglog_exp_array_api_program_gen_ndarray_program _x) (egglog_exp_program_gen_Program___init__ " @ " false)) (egglog_exp_array_api_program_gen_ndarray_program _y))) :ruleset egglog.exp.array_api_program_gen.array_api_program_gen_ruleset)
(constructor egglog_exp_array_api_NDArray___mod__ (egglog.exp.array_api.NDArray egglog.exp.array_api.NDArray) egglog.exp.array_api.NDArray)
(rewrite (egglog_exp_array_api_program_gen_ndarray_program (egglog_exp_array_api_NDArray___mod__ _x _y)) (egglog_exp_program_gen_Program_assign (egglog_exp_program_gen_Program___add__ (egglog_exp_program_gen_Program___add__ (egglog_exp_array_api_program_gen_ndarray_program _x) (egglog_exp_program_gen_Program___init__ " % " false)) (egglog_exp_array_api_program_gen_ndarray_program _y))) :ruleset egglog.exp.array_api_program_gen.array_api_program_gen_ruleset)
(constructor egglog_exp_array_api_NDArray___and__ (egglog.exp.array_api.NDArray egglog.exp.array_api.NDArray) egglog.exp.array_api.NDArray)
(rewrite (egglog_exp_array_api_program_gen_ndarray_program (egglog_exp_array_api_NDArray___and__ _x _y)) (egglog_exp_program_gen_Program_assign (egglog_exp_program_gen_Program___add__ (egglog_exp_program_gen_Program___add__ (egglog_exp_array_api_program_gen_ndarray_program _x) (egglog_exp_program_gen_Program___init__ " & " false)) (egglog_exp_array_api_program_gen_ndarray_program _y))) :ruleset egglog.exp.array_api_program_gen.array_api_program_gen_ruleset)
(constructor egglog_exp_array_api_NDArray___or__ (egglog.exp.array_api.NDArray egglog.exp.array_api.NDArray) egglog.exp.array_api.NDArray)
(rewrite (egglog_exp_array_api_program_gen_ndarray_program (egglog_exp_array_api_NDArray___or__ _x _y)) (egglog_exp_program_gen_Program_assign (egglog_exp_program_gen_Program___add__ (egglog_exp_program_gen_Program___add__ (egglog_exp_array_api_program_gen_ndarray_program _x) (egglog_exp_program_gen_Program___init__ " | " false)) (egglog_exp_array_api_program_gen_ndarray_program _y))) :ruleset egglog.exp.array_api_program_gen.array_api_program_gen_ruleset)
(constructor egglog_exp_array_api_NDArray___xor__ (egglog.exp.array_api.NDArray egglog.exp.array_api.NDArray) egglog.exp.array_api.NDArray)
(rewrite (egglog_exp_array_api_program_gen_ndarray_program (egglog_exp_array_api_NDArray___xor__ _x _y)) (egglog_exp_program_gen_Program_assign (egglog_exp_program_gen_Program___add__ (egglog_exp_program_gen_Program___add__ (egglog_exp_array_api_program_gen_ndarray_program _x) (egglog_exp_program_gen_Program___init__ " ^ " false)) (egglog_exp_array_api_program_gen_ndarray_program _y))) :ruleset egglog.exp.array_api_program_gen.array_api_program_gen_ruleset)
(constructor egglog_exp_array_api_NDArray___lshift__ (egglog.exp.array_api.NDArray egglog.exp.array_api.NDArray) egglog.exp.array_api.NDArray)
(rewrite (egglog_exp_array_api_program_gen_ndarray_program (egglog_exp_array_api_NDArray___lshift__ _x _y)) (egglog_exp_program_gen_Program_assign (egglog_exp_program_gen_Program___add__ (egglog_exp_program_gen_Program___add__ (egglog_exp_array_api_program_gen_ndarray_program _x) (egglog_exp_program_gen_Program___init__ " << " false)) (egglog_exp_array_api_program_gen_ndarray_program _y))) :ruleset egglog.exp.array_api_program_gen.array_api_program_gen_ruleset)
(constructor egglog_exp_array_api_NDArray___rshift__ (egglog.exp.array_api.NDArray egglog.exp.array_api.NDArray) egglog.exp.array_api.NDArray)
(rewrite (egglog_exp_array_api_program_gen_ndarray_program (egglog_exp_array_api_NDArray___rshift__ _x _y)) (egglog_exp_program_gen_Program_assign (egglog_exp_program_gen_Program___add__ (egglog_exp_program_gen_Program___add__ (egglog_exp_array_api_program_gen_ndarray_program _x) (egglog_exp_program_gen_Program___init__ " >> " false)) (egglog_exp_array_api_program_gen_ndarray_program _y))) :ruleset egglog.exp.array_api_program_gen.array_api_program_gen_ruleset)
(constructor egglog_exp_array_api_NDArray___floordiv__ (egglog.exp.array_api.NDArray egglog.exp.array_api.NDArray) egglog.exp.array_api.NDArray)
(rewrite (egglog_exp_array_api_program_gen_ndarray_program (egglog_exp_array_api_NDArray___floordiv__ _x _y)) (egglog_exp_program_gen_Program_assign (egglog_exp_program_gen_Program___add__ (egglog_exp_program_gen_Program___add__ (egglog_exp_array_api_program_gen_ndarray_program _x) (egglog_exp_program_gen_Program___init__ " // " false)) (egglog_exp_array_api_program_gen_ndarray_program _y))) :ruleset egglog.exp.array_api_program_gen.array_api_program_gen_ruleset)
(constructor egglog_exp_array_api_NDArray___pow__ (egglog.exp.array_api.NDArray egglog.exp.array_api.NDArray) egglog.exp.array_api.NDArray)
(rewrite (egglog_exp_array_api_program_gen_ndarray_program (egglog_exp_array_api_NDArray___pow__ _x _y)) (egglog_exp_program_gen_Program_assign (egglog_exp_program_gen_Program___add__ (egglog_exp_program_gen_Program___add__ (egglog_exp_array_api_program_gen_ndarray_program _x) (egglog_exp_program_gen_Program___init__ " ** " false)) (egglog_exp_array_api_program_gen_ndarray_program _y))) :ruleset egglog.exp.array_api_program_gen.array_api_program_gen_ruleset)
(constructor egglog_exp_array_api_program_gen_index_key_program (egglog.exp.array_api.IndexKey) egglog.exp.program_gen.Program)
(rewrite (egglog_exp_array_api_program_gen_ndarray_program (egglog_exp_array_api_NDArray___setitem__ _x _idx _y)) (egglog_exp_program_gen_Program_statement (egglog_exp_program_gen_Program_assign (egglog_exp_array_api_program_gen_ndarray_program _x)) (egglog_exp_program_gen_Program___add__ (egglog_exp_program_gen_Program___add__ (egglog_exp_program_gen_Program___add__ (egglog_exp_program_gen_Program___add__ (egglog_exp_program_gen_Program_assign (egglog_exp_array_api_program_gen_ndarray_program _x)) (egglog_exp_program_gen_Program___init__ "[" false)) (egglog_exp_array_api_program_gen_index_key_program _idx)) (egglog_exp_program_gen_Program___init__ "] = " false)) (egglog_exp_array_api_program_gen_ndarray_program _y))) :ruleset egglog.exp.array_api_program_gen.array_api_program_gen_ruleset)
(rewrite (egglog_exp_array_api_program_gen_ndarray_program (egglog_exp_array_api_NDArray___getitem__ _x _idx)) (egglog_exp_program_gen_Program___add__ (egglog_exp_program_gen_Program___add__ (egglog_exp_program_gen_Program___add__ (egglog_exp_array_api_program_gen_ndarray_program _x) (egglog_exp_program_gen_Program___init__ "[" false)) (egglog_exp_array_api_program_gen_index_key_program _idx)) (egglog_exp_program_gen_Program___init__ "]" false)) :ruleset egglog.exp.array_api_program_gen.array_api_program_gen_ruleset)
(rewrite (egglog_exp_array_api_program_gen_ndarray_program (egglog_exp_array_api_square _x)) (egglog_exp_program_gen_Program_assign (egglog_exp_program_gen_Program___add__ (egglog_exp_program_gen_Program___add__ (egglog_exp_program_gen_Program___init__ "np.square(" false) (egglog_exp_array_api_program_gen_ndarray_program _x)) (egglog_exp_program_gen_Program___init__ ")" false))) :ruleset egglog.exp.array_api_program_gen.array_api_program_gen_ruleset)
(rewrite (egglog_exp_array_api_program_gen_ndarray_program (egglog_exp_array_api_expand_dims _x _i)) (egglog_exp_program_gen_Program_assign (egglog_exp_program_gen_Program___add__ (egglog_exp_program_gen_Program___add__ (egglog_exp_program_gen_Program___add__ (egglog_exp_program_gen_Program___add__ (egglog_exp_program_gen_Program___init__ "np.expand_dims(" false) (egglog_exp_array_api_program_gen_ndarray_program _x)) (egglog_exp_program_gen_Program___init__ ", " false)) (egglog_exp_array_api_program_gen_int_program _i)) (egglog_exp_program_gen_Program___init__ ")" false))) :ruleset egglog.exp.array_api_program_gen.array_api_program_gen_ruleset)
(constructor egglog_exp_array_api_mean (egglog.exp.array_api.NDArray egglog.exp.array_api.OptionalIntOrTuple egglog.exp.array_api.Boolean) egglog.exp.array_api.NDArray)
(rewrite (egglog_exp_array_api_program_gen_ndarray_program (egglog_exp_array_api_mean _x $__expr_23 $__expr_39)) (egglog_exp_program_gen_Program_assign (egglog_exp_program_gen_Program___add__ (egglog_exp_program_gen_Program___add__ (egglog_exp_program_gen_Program___init__ "np.mean(" false) (egglog_exp_array_api_program_gen_ndarray_program _x)) (egglog_exp_program_gen_Program___init__ ")" false))) :ruleset egglog.exp.array_api_program_gen.array_api_program_gen_ruleset)
(constructor egglog_exp_array_api_program_gen_optional_int_or_tuple_program (egglog.exp.array_api.OptionalIntOrTuple) egglog.exp.program_gen.Program)
(rewrite (egglog_exp_array_api_program_gen_ndarray_program (egglog_exp_array_api_mean _x _optional_int_or_tuple_ $__expr_39)) (egglog_exp_program_gen_Program_assign (egglog_exp_program_gen_Program___add__ (egglog_exp_program_gen_Program___add__ (egglog_exp_program_gen_Program___add__ (egglog_exp_program_gen_Program___add__ (egglog_exp_program_gen_Program___init__ "np.mean(" false) (egglog_exp_array_api_program_gen_ndarray_program _x)) (egglog_exp_program_gen_Program___init__ ", axis=" false)) (egglog_exp_array_api_program_gen_optional_int_or_tuple_program _optional_int_or_tuple_)) (egglog_exp_program_gen_Program___init__ ")" false))) :when ((!= _optional_int_or_tuple_ $__expr_23)) :ruleset egglog.exp.array_api_program_gen.array_api_program_gen_ruleset)
(rewrite (egglog_exp_array_api_program_gen_ndarray_program (egglog_exp_array_api_mean _x _optional_int_or_tuple_ (egglog_exp_array_api_Boolean___init__ true))) (egglog_exp_program_gen_Program_assign (egglog_exp_program_gen_Program___add__ (egglog_exp_program_gen_Program___add__ (egglog_exp_program_gen_Program___add__ (egglog_exp_program_gen_Program___add__ (egglog_exp_program_gen_Program___init__ "np.mean(" false) (egglog_exp_array_api_program_gen_ndarray_program _x)) (egglog_exp_program_gen_Program___init__ ", axis=" false)) (egglog_exp_array_api_program_gen_optional_int_or_tuple_program _optional_int_or_tuple_)) (egglog_exp_program_gen_Program___init__ ", keepdims=True)" false))) :when ((!= _optional_int_or_tuple_ $__expr_23)) :ruleset egglog.exp.array_api_program_gen.array_api_program_gen_ruleset)
(rewrite (egglog_exp_array_api_program_gen_ndarray_program (egglog_exp_array_api_concat _tnd $__expr_36)) (egglog_exp_program_gen_Program_assign (egglog_exp_program_gen_Program___add__ (egglog_exp_program_gen_Program___add__ (egglog_exp_program_gen_Program___init__ "np.concatenate(" false) (egglog_exp_array_api_program_gen_tuple_ndarray_program _tnd)) (egglog_exp_program_gen_Program___init__ ")" false))) :ruleset egglog.exp.array_api_program_gen.array_api_program_gen_ruleset)
(rewrite (egglog_exp_array_api_program_gen_ndarray_program (egglog_exp_array_api_concat _tnd (egglog_exp_array_api_OptionalInt_some _i))) (egglog_exp_program_gen_Program_assign (egglog_exp_program_gen_Program___add__ (egglog_exp_program_gen_Program___add__ (egglog_exp_program_gen_Program___add__ (egglog_exp_program_gen_Program___add__ (egglog_exp_program_gen_Program___init__ "np.concatenate(" false) (egglog_exp_array_api_program_gen_tuple_ndarray_program _tnd)) (egglog_exp_program_gen_Program___init__ ", axis=" false)) (egglog_exp_array_api_program_gen_int_program _i)) (egglog_exp_program_gen_Program___init__ ")" false))) :ruleset egglog.exp.array_api_program_gen.array_api_program_gen_ruleset)
(constructor egglog_exp_array_api_std (egglog.exp.array_api.NDArray egglog.exp.array_api.OptionalIntOrTuple) egglog.exp.array_api.NDArray)
(rewrite (egglog_exp_array_api_program_gen_ndarray_program (egglog_exp_array_api_std _x $__expr_23)) (egglog_exp_program_gen_Program_assign (egglog_exp_program_gen_Program___add__ (egglog_exp_program_gen_Program___add__ (egglog_exp_program_gen_Program___init__ "np.std(" false) (egglog_exp_array_api_program_gen_ndarray_program _x)) (egglog_exp_program_gen_Program___init__ ")" false))) :ruleset egglog.exp.array_api_program_gen.array_api_program_gen_ruleset)
(rewrite (egglog_exp_array_api_program_gen_ndarray_program (egglog_exp_array_api_std _x _optional_int_or_tuple_)) (egglog_exp_program_gen_Program_assign (egglog_exp_program_gen_Program___add__ (egglog_exp_program_gen_Program___add__ (egglog_exp_program_gen_Program___add__ (egglog_exp_program_gen_Program___add__ (egglog_exp_program_gen_Program___init__ "np.std(" false) (egglog_exp_array_api_program_gen_ndarray_program _x)) (egglog_exp_program_gen_Program___init__ ", axis=" false)) (egglog_exp_array_api_program_gen_optional_int_or_tuple_program _optional_int_or_tuple_)) (egglog_exp_program_gen_Program___init__ ")" false))) :when ((!= _optional_int_or_tuple_ $__expr_23)) :ruleset egglog.exp.array_api_program_gen.array_api_program_gen_ruleset)
(rewrite (egglog_exp_array_api_program_gen_tuple_ndarray_program (egglog_exp_array_api_svd_ _x (egglog_exp_array_api_Boolean___init__ true))) (egglog_exp_program_gen_Program_assign (egglog_exp_program_gen_Program___add__ (egglog_exp_program_gen_Program___add__ (egglog_exp_program_gen_Program___init__ "np.linalg.svd(" false) (egglog_exp_array_api_program_gen_ndarray_program _x)) (egglog_exp_program_gen_Program___init__ ")" false))) :ruleset egglog.exp.array_api_program_gen.array_api_program_gen_ruleset)
(rewrite (egglog_exp_array_api_program_gen_tuple_ndarray_program (egglog_exp_array_api_svd_ _x $__expr_39)) (egglog_exp_program_gen_Program_assign (egglog_exp_program_gen_Program___add__ (egglog_exp_program_gen_Program___add__ (egglog_exp_program_gen_Program___init__ "np.linalg.svd(" false) (egglog_exp_array_api_program_gen_ndarray_program _x)) (egglog_exp_program_gen_Program___init__ ", full_matrices=False)" false))) :ruleset egglog.exp.array_api_program_gen.array_api_program_gen_ruleset)
(rewrite (egglog_exp_array_api_program_gen_ndarray_program (ndarray-sqrt _x)) (egglog_exp_program_gen_Program_assign (egglog_exp_program_gen_Program___add__ (egglog_exp_program_gen_Program___add__ (egglog_exp_program_gen_Program___init__ "np.sqrt(" false) (egglog_exp_array_api_program_gen_ndarray_program _x)) (egglog_exp_program_gen_Program___init__ ")" false))) :ruleset egglog.exp.array_api_program_gen.array_api_program_gen_ruleset)
(rewrite (egglog_exp_array_api_program_gen_ndarray_program (egglog_exp_array_api_NDArray_T _x)) (egglog_exp_program_gen_Program___add__ (egglog_exp_array_api_program_gen_ndarray_program _x) (egglog_exp_program_gen_Program___init__ ".T" false)) :ruleset egglog.exp.array_api_program_gen.array_api_program_gen_ruleset)
(rewrite (egglog_exp_array_api_program_gen_ndarray_program (egglog_exp_array_api_sum _x $__expr_23)) (egglog_exp_program_gen_Program_assign (egglog_exp_program_gen_Program___add__ (egglog_exp_program_gen_Program___add__ (egglog_exp_program_gen_Program___init__ "np.sum(" false) (egglog_exp_array_api_program_gen_ndarray_program _x)) (egglog_exp_program_gen_Program___init__ ")" false))) :ruleset egglog.exp.array_api_program_gen.array_api_program_gen_ruleset)
(rewrite (egglog_exp_array_api_program_gen_ndarray_program (egglog_exp_array_api_sum _x _optional_int_or_tuple_)) (egglog_exp_program_gen_Program_assign (egglog_exp_program_gen_Program___add__ (egglog_exp_program_gen_Program___add__ (egglog_exp_program_gen_Program___add__ (egglog_exp_program_gen_Program___add__ (egglog_exp_program_gen_Program___init__ "np.sum(" false) (egglog_exp_array_api_program_gen_ndarray_program _x)) (egglog_exp_program_gen_Program___init__ ", axis=" false)) (egglog_exp_array_api_program_gen_optional_int_or_tuple_program _optional_int_or_tuple_)) (egglog_exp_program_gen_Program___init__ ")" false))) :when ((!= _optional_int_or_tuple_ $__expr_23)) :ruleset egglog.exp.array_api_program_gen.array_api_program_gen_ruleset)
(rewrite (egglog_exp_array_api_program_gen_tuple_int_program (egglog_exp_array_api_NDArray_shape _x)) (egglog_exp_program_gen_Program___add__ (egglog_exp_array_api_program_gen_ndarray_program _x) (egglog_exp_program_gen_Program___init__ ".shape" false)) :ruleset egglog.exp.array_api_program_gen.array_api_program_gen_ruleset)
(constructor ndarray-abs (egglog.exp.array_api.NDArray) egglog.exp.array_api.NDArray)
(rewrite (egglog_exp_array_api_program_gen_ndarray_program (ndarray-abs _x)) (egglog_exp_program_gen_Program_assign (egglog_exp_program_gen_Program___add__ (egglog_exp_program_gen_Program___add__ (egglog_exp_program_gen_Program___init__ "np.abs(" false) (egglog_exp_array_api_program_gen_ndarray_program _x)) (egglog_exp_program_gen_Program___init__ ")" false))) :ruleset egglog.exp.array_api_program_gen.array_api_program_gen_ruleset)
(constructor egglog_exp_array_api_program_gen_optional_dtype_program (egglog.exp.array_api.OptionalDType) egglog.exp.program_gen.Program)
(rewrite (egglog_exp_array_api_program_gen_ndarray_program (egglog_exp_array_api_asarray _x _odtype (egglog_exp_array_api_OptionalBool_none ) _optional_device_)) (egglog_exp_program_gen_Program___add__ (egglog_exp_program_gen_Program___add__ (egglog_exp_program_gen_Program___add__ (egglog_exp_program_gen_Program___add__ (egglog_exp_program_gen_Program___init__ "np.asarray(" false) (egglog_exp_array_api_program_gen_ndarray_program _x)) (egglog_exp_program_gen_Program___init__ ", " false)) (egglog_exp_array_api_program_gen_optional_dtype_program _odtype)) (egglog_exp_program_gen_Program___init__ ")" false)) :ruleset egglog.exp.array_api_program_gen.array_api_program_gen_ruleset)
(rewrite (egglog_exp_array_api_program_gen_optional_int_or_tuple_program (egglog_exp_array_api_OptionalIntOrTuple_int _i)) (egglog_exp_array_api_program_gen_int_program _i) :ruleset egglog.exp.array_api_program_gen.array_api_program_gen_ruleset)
(constructor egglog_exp_array_api_OptionalIntOrTuple_tuple (egglog.exp.array_api.TupleInt) egglog.exp.array_api.OptionalIntOrTuple)
(rewrite (egglog_exp_array_api_program_gen_optional_int_or_tuple_program (egglog_exp_array_api_OptionalIntOrTuple_tuple _ti)) (egglog_exp_array_api_program_gen_tuple_int_program _ti) :ruleset egglog.exp.array_api_program_gen.array_api_program_gen_ruleset)
(rewrite (egglog_exp_array_api_program_gen_optional_int_or_tuple_program $__expr_23) (egglog_exp_program_gen_Program___init__ "None" false) :ruleset egglog.exp.array_api_program_gen.array_api_program_gen_ruleset)
(constructor egglog_exp_array_api_IndexKey_ELLIPSIS () egglog.exp.array_api.IndexKey)
(rewrite (egglog_exp_array_api_program_gen_index_key_program (egglog_exp_array_api_IndexKey_ELLIPSIS )) (egglog_exp_program_gen_Program___init__ "..." false) :ruleset egglog.exp.array_api_program_gen.array_api_program_gen_ruleset)
(rewrite (egglog_exp_array_api_program_gen_index_key_program (egglog_exp_array_api_IndexKey_int _i)) (egglog_exp_array_api_program_gen_int_program _i) :ruleset egglog.exp.array_api_program_gen.array_api_program_gen_ruleset)
(constructor egglog_exp_array_api_program_gen_slice_program (egglog.exp.array_api.Slice) egglog.exp.program_gen.Program)
(rewrite (egglog_exp_array_api_program_gen_index_key_program (egglog_exp_array_api_IndexKey_slice _s)) (egglog_exp_array_api_program_gen_slice_program _s) :ruleset egglog.exp.array_api_program_gen.array_api_program_gen_ruleset)
(constructor egglog_exp_array_api_program_gen_multi_axis_index_key_program (egglog.exp.array_api.MultiAxisIndexKey) egglog.exp.program_gen.Program)
(rewrite (egglog_exp_array_api_program_gen_index_key_program (egglog_exp_array_api_IndexKey_multi_axis _key)) (egglog_exp_array_api_program_gen_multi_axis_index_key_program _key) :ruleset egglog.exp.array_api_program_gen.array_api_program_gen_ruleset)
(rewrite (egglog_exp_array_api_program_gen_index_key_program (egglog_exp_array_api_IndexKey_ndarray _a)) (egglog_exp_array_api_program_gen_ndarray_program _a) :ruleset egglog.exp.array_api_program_gen.array_api_program_gen_ruleset)
(sort egglog.builtins.UnstableFn[egglog.exp.array_api.MultiAxisIndexKeyItem,egglog.exp.array_api.Int] (UnstableFn (egglog.exp.array_api.Int ) egglog.exp.array_api.MultiAxisIndexKeyItem))
(constructor _lambda_1 (egglog.builtins.UnstableFn[egglog.exp.array_api.MultiAxisIndexKeyItem,egglog.exp.array_api.Int] egglog.exp.array_api.Int) egglog.exp.array_api.MultiAxisIndexKeyItem)
(constructor egglog_exp_array_api_Int___add__ (egglog.exp.array_api.Int egglog.exp.array_api.Int) egglog.exp.array_api.Int)
(rewrite (_lambda_1 _idx_fn _i) (unstable-app _idx_fn (egglog_exp_array_api_Int___add__ _i $__expr_9)) :subsume :ruleset egglog.exp.array_api_program_gen.array_api_program_gen_ruleset)
(constructor egglog_exp_array_api_MultiAxisIndexKey___init__ (egglog.exp.array_api.Int egglog.builtins.UnstableFn[egglog.exp.array_api.MultiAxisIndexKeyItem,egglog.exp.array_api.Int]) egglog.exp.array_api.MultiAxisIndexKey)
(rewrite (egglog_exp_array_api_program_gen_multi_axis_index_key_program (egglog_exp_array_api_MultiAxisIndexKey___init__ $__expr_8 _idx_fn)) (egglog_exp_program_gen_Program___init__ "" false) :ruleset egglog.exp.array_api_program_gen.array_api_program_gen_ruleset)
(constructor egglog_exp_array_api_program_gen_multi_axis_index_key_item_program (egglog.exp.array_api.MultiAxisIndexKeyItem) egglog.exp.program_gen.Program)
(rewrite (egglog_exp_array_api_program_gen_multi_axis_index_key_program (egglog_exp_array_api_MultiAxisIndexKey___init__ (egglog_exp_array_api_Int___init__ _k) _idx_fn)) (egglog_exp_program_gen_Program___add__ (egglog_exp_program_gen_Program___add__ (egglog_exp_array_api_program_gen_multi_axis_index_key_item_program (unstable-app _idx_fn $__expr_8)) (egglog_exp_program_gen_Program___init__ ", " false)) (egglog_exp_array_api_program_gen_multi_axis_index_key_program (egglog_exp_array_api_MultiAxisIndexKey___init__ (egglog_exp_array_api_Int___init__ (- _k 1)) (unstable-fn "_lambda_1" _idx_fn)))) :when ((!= _k $__expr_48)) :ruleset egglog.exp.array_api_program_gen.array_api_program_gen_ruleset)
(rewrite (egglog_exp_array_api_program_gen_multi_axis_index_key_program (egglog_exp_array_api_MultiAxisIndexKey_from_vec (vec-of ))) (egglog_exp_program_gen_Program___init__ "" false) :ruleset egglog.exp.array_api_program_gen.array_api_program_gen_ruleset)
(rewrite (egglog_exp_array_api_program_gen_multi_axis_index_key_program (egglog_exp_array_api_MultiAxisIndexKey_from_vec _vec)) (egglog_exp_program_gen_Program___add__ (egglog_exp_array_api_program_gen_multi_axis_index_key_item_program (vec-get _vec $__expr_48)) (egglog_exp_program_gen_Program___init__ "," false)) :when ((= (vec-length _vec) 1)) :ruleset egglog.exp.array_api_program_gen.array_api_program_gen_ruleset)
(rewrite (egglog_exp_array_api_program_gen_multi_axis_index_key_program (egglog_exp_array_api_MultiAxisIndexKey_from_vec _vec)) (egglog_exp_program_gen_Program___add__ (egglog_exp_program_gen_Program___add__ (egglog_exp_array_api_program_gen_multi_axis_index_key_item_program (vec-get _vec $__expr_48)) (egglog_exp_program_gen_Program___init__ ", " false)) (egglog_exp_array_api_program_gen_multi_axis_index_key_program (egglog_exp_array_api_MultiAxisIndexKey_from_vec (vec-remove _vec $__expr_48)))) :when ((> (vec-length _vec) 1)) :ruleset egglog.exp.array_api_program_gen.array_api_program_gen_ruleset)
(rewrite (egglog_exp_array_api_program_gen_multi_axis_index_key_item_program (egglog_exp_array_api_MultiAxisIndexKeyItem_int _i)) (egglog_exp_array_api_program_gen_int_program _i) :ruleset egglog.exp.array_api_program_gen.array_api_program_gen_ruleset)
(rewrite (egglog_exp_array_api_program_gen_multi_axis_index_key_item_program (egglog_exp_array_api_MultiAxisIndexKeyItem_slice _s)) (egglog_exp_array_api_program_gen_slice_program _s) :ruleset egglog.exp.array_api_program_gen.array_api_program_gen_ruleset)
(constructor egglog_exp_array_api_MultiAxisIndexKeyItem_ELLIPSIS () egglog.exp.array_api.MultiAxisIndexKeyItem)
(rewrite (egglog_exp_array_api_program_gen_multi_axis_index_key_item_program (egglog_exp_array_api_MultiAxisIndexKeyItem_ELLIPSIS )) (egglog_exp_program_gen_Program___init__ "..." false) :ruleset egglog.exp.array_api_program_gen.array_api_program_gen_ruleset)
(constructor egglog_exp_array_api_MultiAxisIndexKeyItem_NONE () egglog.exp.array_api.MultiAxisIndexKeyItem)
(rewrite (egglog_exp_array_api_program_gen_multi_axis_index_key_item_program (egglog_exp_array_api_MultiAxisIndexKeyItem_NONE )) (egglog_exp_program_gen_Program___init__ "None" false) :ruleset egglog.exp.array_api_program_gen.array_api_program_gen_ruleset)
(constructor egglog_exp_array_api_program_gen_optional_int_slice_program (egglog.exp.array_api.OptionalInt) egglog.exp.program_gen.Program)
(rewrite (egglog_exp_array_api_program_gen_slice_program (egglog_exp_array_api_Slice___init__ _start _stop $__expr_36)) (egglog_exp_program_gen_Program___add__ (egglog_exp_program_gen_Program___add__ (egglog_exp_array_api_program_gen_optional_int_slice_program _start) (egglog_exp_program_gen_Program___init__ ":" false)) (egglog_exp_array_api_program_gen_optional_int_slice_program _stop)) :ruleset egglog.exp.array_api_program_gen.array_api_program_gen_ruleset)
(rewrite (egglog_exp_array_api_program_gen_slice_program (egglog_exp_array_api_Slice___init__ _start _stop (egglog_exp_array_api_OptionalInt_some _i))) (egglog_exp_program_gen_Program___add__ (egglog_exp_program_gen_Program___add__ (egglog_exp_program_gen_Program___add__ (egglog_exp_program_gen_Program___add__ (egglog_exp_array_api_program_gen_optional_int_slice_program _start) (egglog_exp_program_gen_Program___init__ ":" false)) (egglog_exp_array_api_program_gen_optional_int_slice_program _stop)) (egglog_exp_program_gen_Program___init__ ":" false)) (egglog_exp_array_api_program_gen_int_program _i)) :ruleset egglog.exp.array_api_program_gen.array_api_program_gen_ruleset)
(rewrite (egglog_exp_array_api_program_gen_optional_int_slice_program $__expr_36) (egglog_exp_program_gen_Program___init__ "" false) :ruleset egglog.exp.array_api_program_gen.array_api_program_gen_ruleset)
(rewrite (egglog_exp_array_api_program_gen_optional_int_slice_program (egglog_exp_array_api_OptionalInt_some _x)) (egglog_exp_array_api_program_gen_int_program _x) :ruleset egglog.exp.array_api_program_gen.array_api_program_gen_ruleset)
(constructor egglog_exp_array_api_program_gen_optional_int_program (egglog.exp.array_api.OptionalInt) egglog.exp.program_gen.Program)
(rewrite (egglog_exp_array_api_program_gen_optional_int_program $__expr_36) (egglog_exp_program_gen_Program___init__ "None" false) :ruleset egglog.exp.array_api_program_gen.array_api_program_gen_ruleset)
(rewrite (egglog_exp_array_api_program_gen_optional_int_program (egglog_exp_array_api_OptionalInt_some _x)) (egglog_exp_array_api_program_gen_int_program _x) :ruleset egglog.exp.array_api_program_gen.array_api_program_gen_ruleset)
(rewrite (egglog_exp_array_api_program_gen_optional_dtype_program (egglog_exp_array_api_OptionalDType_none )) (egglog_exp_program_gen_Program___init__ "None" false) :ruleset egglog.exp.array_api_program_gen.array_api_program_gen_ruleset)
(rewrite (egglog_exp_array_api_program_gen_optional_dtype_program (egglog_exp_array_api_OptionalDType_some _dtype)) (egglog_exp_array_api_program_gen_dtype_program _dtype) :ruleset egglog.exp.array_api_program_gen.array_api_program_gen_ruleset)
(rewrite (egglog_exp_array_api_program_gen_ndarray_program (egglog_exp_array_api_TupleNDArray___getitem__ _ti _i)) (egglog_exp_program_gen_Program___add__ (egglog_exp_program_gen_Program___add__ (egglog_exp_program_gen_Program___add__ (egglog_exp_array_api_program_gen_tuple_ndarray_program _ti) (egglog_exp_program_gen_Program___init__ "[" false)) (egglog_exp_array_api_program_gen_int_program _i)) (egglog_exp_program_gen_Program___init__ "]" false)) :ruleset egglog.exp.array_api_program_gen.array_api_program_gen_ruleset)
(constructor egglog_exp_array_api_TupleNDArray_length (egglog.exp.array_api.TupleNDArray) egglog.exp.array_api.Int)
(rewrite (egglog_exp_array_api_program_gen_int_program (egglog_exp_array_api_TupleNDArray_length _ti)) (egglog_exp_program_gen_Program___add__ (egglog_exp_program_gen_Program___add__ (egglog_exp_program_gen_Program___init__ "len(" false) (egglog_exp_array_api_program_gen_tuple_ndarray_program _ti)) (egglog_exp_program_gen_Program___init__ ")" false)) :ruleset egglog.exp.array_api_program_gen.array_api_program_gen_ruleset)
(rewrite (egglog_exp_array_api_program_gen_tuple_ndarray_foldl_program (egglog_exp_array_api_TupleNDArray___init__ (vec-empty )) _f _init) _init :ruleset egglog.exp.array_api_program_gen.array_api_program_gen_ruleset)
(rewrite (egglog_exp_array_api_program_gen_tuple_ndarray_foldl_program (egglog_exp_array_api_TupleNDArray___init__ _vn) _f _init) (unstable-app _f (egglog_exp_array_api_program_gen_tuple_ndarray_foldl_program (egglog_exp_array_api_TupleNDArray___init__ (vec-pop _vn)) _f _init) (vec-get _vn (- (vec-length _vn) 1))) :when ((> (vec-length _vn) $__expr_48)) :ruleset egglog.exp.array_api_program_gen.array_api_program_gen_ruleset)
(constructor _lambda_2 (egglog.exp.program_gen.Program egglog.exp.array_api.Value) egglog.exp.program_gen.Program)
(rewrite (_lambda_2 _acc _i) (egglog_exp_program_gen_Program___add__ (egglog_exp_program_gen_Program___add__ _acc (egglog_exp_array_api_program_gen_value_program _i)) (egglog_exp_program_gen_Program___init__ ", " false)) :subsume :ruleset egglog.exp.array_api_program_gen.array_api_program_gen_ruleset)
(constructor egglog_exp_array_api_TupleValue___getitem__ (egglog.exp.array_api.TupleValue egglog.exp.array_api.Int) egglog.exp.array_api.Value)
(rewrite (egglog_exp_array_api_program_gen_value_program (egglog_exp_array_api_TupleValue___getitem__ _ti _i)) (egglog_exp_program_gen_Program___add__ (egglog_exp_program_gen_Program___add__ (egglog_exp_program_gen_Program___add__ (egglog_exp_array_api_program_gen_tuple_value_program _ti) (egglog_exp_program_gen_Program___init__ "[" false)) (egglog_exp_array_api_program_gen_int_program _i)) (egglog_exp_program_gen_Program___init__ "]" false)) :ruleset egglog.exp.array_api_program_gen.array_api_program_gen_ruleset)
(constructor egglog_exp_array_api_TupleValue_length (egglog.exp.array_api.TupleValue) egglog.exp.array_api.Int)
(rewrite (egglog_exp_array_api_program_gen_int_program (egglog_exp_array_api_TupleValue_length _ti)) (egglog_exp_program_gen_Program___add__ (egglog_exp_program_gen_Program___add__ (egglog_exp_program_gen_Program___init__ "len(" false) (egglog_exp_array_api_program_gen_tuple_value_program _ti)) (egglog_exp_program_gen_Program___init__ ")" false)) :ruleset egglog.exp.array_api_program_gen.array_api_program_gen_ruleset)
(sort egglog.builtins.UnstableFn[egglog.exp.program_gen.Program,egglog.exp.program_gen.Program,egglog.exp.array_api.Value] (UnstableFn (egglog.exp.program_gen.Program egglog.exp.array_api.Value) egglog.exp.program_gen.Program))
(constructor egglog_exp_array_api_program_gen_tuple_value_foldl_program (egglog.exp.array_api.TupleValue egglog.builtins.UnstableFn[egglog.exp.program_gen.Program,egglog.exp.program_gen.Program,egglog.exp.array_api.Value] egglog.exp.program_gen.Program) egglog.exp.program_gen.Program)
(rewrite (egglog_exp_array_api_program_gen_tuple_value_program _ti) (egglog_exp_program_gen_Program___add__ (egglog_exp_array_api_program_gen_tuple_value_foldl_program _ti (unstable-fn "_lambda_2") (egglog_exp_program_gen_Program___init__ "(" false)) (egglog_exp_program_gen_Program___init__ ")" false)) :ruleset egglog.exp.array_api_program_gen.array_api_program_gen_ruleset)
(rewrite (egglog_exp_array_api_program_gen_tuple_value_foldl_program (egglog_exp_array_api_TupleValue___init__ (vec-empty )) _f _init) _init :ruleset egglog.exp.array_api_program_gen.array_api_program_gen_ruleset)
(rewrite (egglog_exp_array_api_program_gen_tuple_value_foldl_program (egglog_exp_array_api_TupleValue___init__ _vv) _f _init) (unstable-app _f (egglog_exp_array_api_program_gen_tuple_value_foldl_program (egglog_exp_array_api_TupleValue___init__ (vec-pop _vv)) _f _init) (vec-get _vv (- (vec-length _vv) 1))) :when ((> (vec-length _vv) $__expr_48)) :ruleset egglog.exp.array_api_program_gen.array_api_program_gen_ruleset)
(rewrite (egglog_exp_array_api_program_gen_value_program (egglog_exp_array_api_Value_from_int _i)) (egglog_exp_array_api_program_gen_int_program _i) :ruleset egglog.exp.array_api_program_gen.array_api_program_gen_ruleset)
(constructor egglog_exp_array_api_Value_from_bool (egglog.exp.array_api.Boolean) egglog.exp.array_api.Value)
(constructor egglog_exp_array_api_program_gen_bool_program (egglog.exp.array_api.Boolean) egglog.exp.program_gen.Program)
(rewrite (egglog_exp_array_api_program_gen_value_program (egglog_exp_array_api_Value_from_bool _b)) (egglog_exp_array_api_program_gen_bool_program _b) :ruleset egglog.exp.array_api_program_gen.array_api_program_gen_ruleset)
(constructor egglog_exp_array_api_program_gen_float_program (egglog.exp.array_api.Float) egglog.exp.program_gen.Program)
(rewrite (egglog_exp_array_api_program_gen_value_program (egglog_exp_array_api_Value_from_float _f)) (egglog_exp_array_api_program_gen_float_program _f) :ruleset egglog.exp.array_api_program_gen.array_api_program_gen_ruleset)
(constructor egglog_exp_array_api_Value___lt__ (egglog.exp.array_api.Value egglog.exp.array_api.Value) egglog.exp.array_api.Value)
(rewrite (egglog_exp_array_api_program_gen_value_program (egglog_exp_array_api_Value___lt__ _v1 _v2)) (egglog_exp_program_gen_Program___add__ (egglog_exp_program_gen_Program___add__ (egglog_exp_program_gen_Program___add__ (egglog_exp_program_gen_Program___add__ (egglog_exp_program_gen_Program___init__ "(" false) (egglog_exp_array_api_program_gen_value_program _v1)) (egglog_exp_program_gen_Program___init__ " < " false)) (egglog_exp_array_api_program_gen_value_program _v2)) (egglog_exp_program_gen_Program___init__ ")" false)) :ruleset egglog.exp.array_api_program_gen.array_api_program_gen_ruleset)
(rewrite (egglog_exp_array_api_program_gen_value_program (egglog_exp_array_api_Value___truediv__ _v1 _v2)) (egglog_exp_program_gen_Program___add__ (egglog_exp_program_gen_Program___add__ (egglog_exp_program_gen_Program___add__ (egglog_exp_program_gen_Program___add__ (egglog_exp_program_gen_Program___init__ "(" false) (egglog_exp_array_api_program_gen_value_program _v1)) (egglog_exp_program_gen_Program___init__ " / " false)) (egglog_exp_array_api_program_gen_value_program _v2)) (egglog_exp_program_gen_Program___init__ ")" false)) :ruleset egglog.exp.array_api_program_gen.array_api_program_gen_ruleset)
(constructor egglog_exp_array_api_Value___add__ (egglog.exp.array_api.Value egglog.exp.array_api.Value) egglog.exp.array_api.Value)
(rewrite (egglog_exp_array_api_program_gen_value_program (egglog_exp_array_api_Value___add__ _v1 _v2)) (egglog_exp_program_gen_Program___add__ (egglog_exp_program_gen_Program___add__ (egglog_exp_program_gen_Program___add__ (egglog_exp_program_gen_Program___add__ (egglog_exp_program_gen_Program___init__ "(" false) (egglog_exp_array_api_program_gen_value_program _v1)) (egglog_exp_program_gen_Program___init__ " + " false)) (egglog_exp_array_api_program_gen_value_program _v2)) (egglog_exp_program_gen_Program___init__ ")" false)) :ruleset egglog.exp.array_api_program_gen.array_api_program_gen_ruleset)
(constructor egglog_exp_array_api_Value___mul__ (egglog.exp.array_api.Value egglog.exp.array_api.Value) egglog.exp.array_api.Value)
(rewrite (egglog_exp_array_api_program_gen_value_program (egglog_exp_array_api_Value___mul__ _v1 _v2)) (egglog_exp_program_gen_Program___add__ (egglog_exp_program_gen_Program___add__ (egglog_exp_program_gen_Program___add__ (egglog_exp_program_gen_Program___add__ (egglog_exp_program_gen_Program___init__ "(" false) (egglog_exp_array_api_program_gen_value_program _v1)) (egglog_exp_program_gen_Program___init__ " * " false)) (egglog_exp_array_api_program_gen_value_program _v2)) (egglog_exp_program_gen_Program___init__ ")" false)) :ruleset egglog.exp.array_api_program_gen.array_api_program_gen_ruleset)
(constructor egglog_exp_array_api_Value_to_bool (egglog.exp.array_api.Value) egglog.exp.array_api.Boolean)
(rewrite (egglog_exp_array_api_program_gen_bool_program (egglog_exp_array_api_Value_to_bool _v1)) (egglog_exp_array_api_program_gen_value_program _v1) :ruleset egglog.exp.array_api_program_gen.array_api_program_gen_ruleset)
(rewrite (egglog_exp_array_api_program_gen_int_program (egglog_exp_array_api_Value_to_int _v1)) (egglog_exp_array_api_program_gen_value_program _v1) :ruleset egglog.exp.array_api_program_gen.array_api_program_gen_ruleset)
(rewrite (egglog_exp_array_api_program_gen_value_program (egglog_exp_array_api_NDArray_index _xs _ti)) (egglog_exp_program_gen_Program_assign (egglog_exp_program_gen_Program___add__ (egglog_exp_program_gen_Program___add__ (egglog_exp_program_gen_Program___add__ (egglog_exp_array_api_program_gen_ndarray_program _xs) (egglog_exp_program_gen_Program___init__ "[" false)) (egglog_exp_array_api_program_gen_tuple_int_program _ti)) (egglog_exp_program_gen_Program___init__ "]" false))) :when ((!= _ti $__expr_29)) :ruleset egglog.exp.array_api_program_gen.array_api_program_gen_ruleset)
(rewrite (egglog_exp_array_api_program_gen_value_program (egglog_exp_array_api_NDArray_index _xs $__expr_29)) (egglog_exp_array_api_program_gen_ndarray_program _xs) :ruleset egglog.exp.array_api_program_gen.array_api_program_gen_ruleset)
(constructor egglog_exp_array_api_Value_sqrt (egglog.exp.array_api.Value) egglog.exp.array_api.Value)
(rewrite (egglog_exp_array_api_program_gen_value_program (egglog_exp_array_api_Value_sqrt _v1)) (egglog_exp_program_gen_Program___add__ (egglog_exp_program_gen_Program___add__ (egglog_exp_program_gen_Program___init__ "np.sqrt(" false) (egglog_exp_array_api_program_gen_value_program _v1)) (egglog_exp_program_gen_Program___init__ ")" false)) :ruleset egglog.exp.array_api_program_gen.array_api_program_gen_ruleset)
(constructor egglog_exp_array_api_Value_real (egglog.exp.array_api.Value) egglog.exp.array_api.Value)
(rewrite (egglog_exp_array_api_program_gen_value_program (egglog_exp_array_api_Value_real _v1)) (egglog_exp_program_gen_Program___add__ (egglog_exp_program_gen_Program___add__ (egglog_exp_program_gen_Program___init__ "np.real(" false) (egglog_exp_array_api_program_gen_value_program _v1)) (egglog_exp_program_gen_Program___init__ ")" false)) :ruleset egglog.exp.array_api_program_gen.array_api_program_gen_ruleset)
(constructor egglog_exp_array_api_Value_conj (egglog.exp.array_api.Value) egglog.exp.array_api.Value)
(rewrite (egglog_exp_array_api_program_gen_value_program (egglog_exp_array_api_Value_conj _v1)) (egglog_exp_program_gen_Program___add__ (egglog_exp_program_gen_Program___add__ (egglog_exp_program_gen_Program___init__ "np.conj(" false) (egglog_exp_array_api_program_gen_value_program _v1)) (egglog_exp_program_gen_Program___init__ ")" false)) :ruleset egglog.exp.array_api_program_gen.array_api_program_gen_ruleset)
(rewrite (egglog_exp_array_api_program_gen_float_program (egglog_exp_array_api_Float___init__ _f64_)) (egglog_exp_program_gen_Program___init__ (to-string _f64_) false) :ruleset egglog.exp.array_api_program_gen.array_api_program_gen_ruleset)
(constructor egglog_exp_array_api_Float_abs (egglog.exp.array_api.Float) egglog.exp.array_api.Float)
(rewrite (egglog_exp_array_api_program_gen_float_program (egglog_exp_array_api_Float_abs _f)) (egglog_exp_program_gen_Program___add__ (egglog_exp_program_gen_Program___add__ (egglog_exp_program_gen_Program___init__ "np.abs(" false) (egglog_exp_array_api_program_gen_float_program _f)) (egglog_exp_program_gen_Program___init__ ")" false)) :ruleset egglog.exp.array_api_program_gen.array_api_program_gen_ruleset)
(constructor egglog_exp_array_api_Float_from_int (egglog.exp.array_api.Int) egglog.exp.array_api.Float)
(rewrite (egglog_exp_array_api_program_gen_float_program (egglog_exp_array_api_Float_from_int _i)) (egglog_exp_array_api_program_gen_int_program _i) :ruleset egglog.exp.array_api_program_gen.array_api_program_gen_ruleset)
(constructor egglog_exp_array_api_Float___add__ (egglog.exp.array_api.Float egglog.exp.array_api.Float) egglog.exp.array_api.Float)
(rewrite (egglog_exp_array_api_program_gen_float_program (egglog_exp_array_api_Float___add__ _f _g)) (egglog_exp_program_gen_Program___add__ (egglog_exp_program_gen_Program___add__ (egglog_exp_program_gen_Program___add__ (egglog_exp_program_gen_Program___add__ (egglog_exp_program_gen_Program___init__ "(" false) (egglog_exp_array_api_program_gen_float_program _f)) (egglog_exp_program_gen_Program___init__ " + " false)) (egglog_exp_array_api_program_gen_float_program _g)) (egglog_exp_program_gen_Program___init__ ")" false)) :ruleset egglog.exp.array_api_program_gen.array_api_program_gen_ruleset)
(constructor egglog_exp_array_api_Float___sub__ (egglog.exp.array_api.Float egglog.exp.array_api.Float) egglog.exp.array_api.Float)
(rewrite (egglog_exp_array_api_program_gen_float_program (egglog_exp_array_api_Float___sub__ _f _g)) (egglog_exp_program_gen_Program___add__ (egglog_exp_program_gen_Program___add__ (egglog_exp_program_gen_Program___add__ (egglog_exp_program_gen_Program___add__ (egglog_exp_program_gen_Program___init__ "(" false) (egglog_exp_array_api_program_gen_float_program _f)) (egglog_exp_program_gen_Program___init__ " - " false)) (egglog_exp_array_api_program_gen_float_program _g)) (egglog_exp_program_gen_Program___init__ ")" false)) :ruleset egglog.exp.array_api_program_gen.array_api_program_gen_ruleset)
(constructor egglog_exp_array_api_Float___mul__ (egglog.exp.array_api.Float egglog.exp.array_api.Float) egglog.exp.array_api.Float)
(rewrite (egglog_exp_array_api_program_gen_float_program (egglog_exp_array_api_Float___mul__ _f _g)) (egglog_exp_program_gen_Program___add__ (egglog_exp_program_gen_Program___add__ (egglog_exp_program_gen_Program___add__ (egglog_exp_program_gen_Program___add__ (egglog_exp_program_gen_Program___init__ "(" false) (egglog_exp_array_api_program_gen_float_program _f)) (egglog_exp_program_gen_Program___init__ " * " false)) (egglog_exp_array_api_program_gen_float_program _g)) (egglog_exp_program_gen_Program___init__ ")" false)) :ruleset egglog.exp.array_api_program_gen.array_api_program_gen_ruleset)
(constructor egglog_exp_array_api_Float___truediv__ (egglog.exp.array_api.Float egglog.exp.array_api.Float) egglog.exp.array_api.Float)
(rewrite (egglog_exp_array_api_program_gen_float_program (egglog_exp_array_api_Float___truediv__ _f _g)) (egglog_exp_program_gen_Program___add__ (egglog_exp_program_gen_Program___add__ (egglog_exp_program_gen_Program___add__ (egglog_exp_program_gen_Program___add__ (egglog_exp_program_gen_Program___init__ "(" false) (egglog_exp_array_api_program_gen_float_program _f)) (egglog_exp_program_gen_Program___init__ " / " false)) (egglog_exp_array_api_program_gen_float_program _g)) (egglog_exp_program_gen_Program___init__ ")" false)) :ruleset egglog.exp.array_api_program_gen.array_api_program_gen_ruleset)
(rewrite (egglog_exp_array_api_program_gen_float_program (egglog_exp_array_api_Float_rational _r)) (egglog_exp_program_gen_Program___add__ (egglog_exp_program_gen_Program___add__ (egglog_exp_program_gen_Program___add__ (egglog_exp_program_gen_Program___add__ (egglog_exp_program_gen_Program___init__ "float(" false) (egglog_exp_program_gen_Program___init__ (to-string (numer _r)) false)) (egglog_exp_program_gen_Program___init__ " / " false)) (egglog_exp_program_gen_Program___init__ (to-string (denom _r)) false)) (egglog_exp_program_gen_Program___init__ ")" false)) :when ((!= (denom _r) (bigint 1))) :ruleset egglog.exp.array_api_program_gen.array_api_program_gen_ruleset)
(rewrite (egglog_exp_array_api_program_gen_float_program (egglog_exp_array_api_Float_rational _r)) (egglog_exp_program_gen_Program___add__ (egglog_exp_program_gen_Program___add__ (egglog_exp_program_gen_Program___init__ "float(" false) (egglog_exp_program_gen_Program___init__ (to-string (numer _r)) false)) (egglog_exp_program_gen_Program___init__ ")" false)) :when ((= (denom _r) (bigint 1))) :ruleset egglog.exp.array_api_program_gen.array_api_program_gen_ruleset)
(rewrite (egglog_exp_array_api_program_gen_dtype_program $__expr_20) (egglog_exp_program_gen_Program___init__ "np.dtype(np.float64)" false) :ruleset egglog.exp.array_api_program_gen.array_api_program_gen_ruleset)
(constructor egglog_exp_array_api_DType_float32 () egglog.exp.array_api.DType)
(rewrite (egglog_exp_array_api_program_gen_dtype_program (egglog_exp_array_api_DType_float32 )) (egglog_exp_program_gen_Program___init__ "np.dtype(np.float32)" false) :ruleset egglog.exp.array_api_program_gen.array_api_program_gen_ruleset)
(rewrite (egglog_exp_array_api_program_gen_dtype_program (egglog_exp_array_api_DType_int64 )) (egglog_exp_program_gen_Program___init__ "np.dtype(np.int64)" false) :ruleset egglog.exp.array_api_program_gen.array_api_program_gen_ruleset)
(rewrite (egglog_exp_array_api_program_gen_dtype_program $__expr_43) (egglog_exp_program_gen_Program___init__ "np.dtype(np.int32)" false) :ruleset egglog.exp.array_api_program_gen.array_api_program_gen_ruleset)
(constructor egglog_exp_array_api_DType_bool () egglog.exp.array_api.DType)
(rewrite (egglog_exp_array_api_program_gen_dtype_program (egglog_exp_array_api_DType_bool )) (egglog_exp_program_gen_Program___init__ "np.dtype(np.bool)" false) :ruleset egglog.exp.array_api_program_gen.array_api_program_gen_ruleset)
(constructor egglog_exp_array_api_DType_object () egglog.exp.array_api.DType)
(rewrite (egglog_exp_array_api_program_gen_dtype_program (egglog_exp_array_api_DType_object )) (egglog_exp_program_gen_Program___init__ "np.dtype(np.object_)" false) :ruleset egglog.exp.array_api_program_gen.array_api_program_gen_ruleset)
(constructor _lambda_3 (egglog.exp.program_gen.Program egglog.exp.array_api.Int) egglog.exp.program_gen.Program)
(rewrite (_lambda_3 _acc _i) (egglog_exp_program_gen_Program___add__ (egglog_exp_program_gen_Program___add__ _acc (egglog_exp_array_api_program_gen_int_program _i)) (egglog_exp_program_gen_Program___init__ ", " false)) :subsume :ruleset egglog.exp.array_api_program_gen.array_api_program_gen_ruleset)
(rewrite (egglog_exp_array_api_program_gen_int_program (egglog_exp_array_api_TupleInt___getitem__ _ti _i)) (egglog_exp_program_gen_Program___add__ (egglog_exp_program_gen_Program___add__ (egglog_exp_program_gen_Program___add__ (egglog_exp_array_api_program_gen_tuple_int_program _ti) (egglog_exp_program_gen_Program___init__ "[" false)) (egglog_exp_array_api_program_gen_int_program _i)) (egglog_exp_program_gen_Program___init__ "]" false)) :ruleset egglog.exp.array_api_program_gen.array_api_program_gen_ruleset)
(constructor egglog_exp_array_api_TupleInt_length (egglog.exp.array_api.TupleInt) egglog.exp.array_api.Int)
(rewrite (egglog_exp_array_api_program_gen_int_program (egglog_exp_array_api_TupleInt_length _ti)) (egglog_exp_program_gen_Program___add__ (egglog_exp_program_gen_Program___add__ (egglog_exp_program_gen_Program___init__ "len(" false) (egglog_exp_array_api_program_gen_tuple_int_program _ti)) (egglog_exp_program_gen_Program___init__ ")" false)) :ruleset egglog.exp.array_api_program_gen.array_api_program_gen_ruleset)
(sort egglog.builtins.UnstableFn[egglog.exp.program_gen.Program] (UnstableFn () egglog.exp.program_gen.Program))
(constructor egglog_exp_array_api_program_gen_program_if (egglog.exp.array_api.Boolean egglog.builtins.UnstableFn[egglog.exp.program_gen.Program] egglog.builtins.UnstableFn[egglog.exp.program_gen.Program]) egglog.exp.program_gen.Program)
(rewrite (egglog_exp_array_api_program_gen_program_if (egglog_exp_array_api_Boolean___init__ true) _tt _ft) (unstable-app _tt) :ruleset egglog.exp.array_api_program_gen.array_api_program_gen_ruleset)
(rewrite (egglog_exp_array_api_program_gen_program_if $__expr_39 _tt _ft) (unstable-app _ft) :ruleset egglog.exp.array_api_program_gen.array_api_program_gen_ruleset)
(constructor egglog_exp_array_api_TupleInt___add__ (egglog.exp.array_api.TupleInt egglog.exp.array_api.TupleInt) egglog.exp.array_api.TupleInt :unextractable)
(rewrite (egglog_exp_array_api_program_gen_tuple_int_program (egglog_exp_array_api_TupleInt___add__ _ti _ti2)) (egglog_exp_program_gen_Program___add__ (egglog_exp_program_gen_Program___add__ (egglog_exp_program_gen_Program___add__ (egglog_exp_program_gen_Program___add__ (egglog_exp_program_gen_Program___init__ "(" false) (egglog_exp_array_api_program_gen_tuple_int_program _ti)) (egglog_exp_program_gen_Program___init__ " + " false)) (egglog_exp_array_api_program_gen_tuple_int_program _ti2)) (egglog_exp_program_gen_Program___init__ ")" false)) :ruleset egglog.exp.array_api_program_gen.array_api_program_gen_ruleset)
(sort egglog.builtins.UnstableFn[egglog.exp.program_gen.Program,egglog.exp.program_gen.Program,egglog.exp.array_api.Int] (UnstableFn (egglog.exp.program_gen.Program egglog.exp.array_api.Int) egglog.exp.program_gen.Program))
(constructor egglog_exp_array_api_program_gen_tuple_int_foldl_program (egglog.exp.array_api.TupleInt egglog.builtins.UnstableFn[egglog.exp.program_gen.Program,egglog.exp.program_gen.Program,egglog.exp.array_api.Int] egglog.exp.program_gen.Program) egglog.exp.program_gen.Program)
(rewrite (egglog_exp_array_api_program_gen_tuple_int_program _ti) (egglog_exp_program_gen_Program___add__ (egglog_exp_array_api_program_gen_tuple_int_foldl_program _ti (unstable-fn "_lambda_3") (egglog_exp_program_gen_Program___init__ "(" false)) (egglog_exp_program_gen_Program___init__ ")" false)) :ruleset egglog.exp.array_api_program_gen.array_api_program_gen_ruleset)
(rewrite (egglog_exp_array_api_program_gen_tuple_int_foldl_program $__expr_29 _f _init) _init :ruleset egglog.exp.array_api_program_gen.array_api_program_gen_ruleset)
(rewrite (egglog_exp_array_api_program_gen_tuple_int_foldl_program (egglog_exp_array_api_TupleInt___init__ _vi) _f _init) (unstable-app _f (egglog_exp_array_api_program_gen_tuple_int_foldl_program (egglog_exp_array_api_TupleInt___init__ (vec-pop _vi)) _f _init) (vec-get _vi (- (vec-length _vi) 1))) :when ((> (vec-length _vi) $__expr_48)) :ruleset egglog.exp.array_api_program_gen.array_api_program_gen_ruleset)
(constructor egglog_exp_array_api_Int_var (String) egglog.exp.array_api.Int)
(rewrite (egglog_exp_array_api_program_gen_int_program (egglog_exp_array_api_Int_var _s)) (egglog_exp_program_gen_Program___init__ _s true) :ruleset egglog.exp.array_api_program_gen.array_api_program_gen_ruleset)
(rewrite (egglog_exp_array_api_program_gen_int_program (egglog_exp_array_api_Int___init__ _i64_)) (egglog_exp_program_gen_Program___init__ (to-string _i64_) false) :ruleset egglog.exp.array_api_program_gen.array_api_program_gen_ruleset)
(constructor egglog_exp_array_api_Int___invert__ (egglog.exp.array_api.Int) egglog.exp.array_api.Int)
(rewrite (egglog_exp_array_api_program_gen_int_program (egglog_exp_array_api_Int___invert__ _i)) (egglog_exp_program_gen_Program___add__ (egglog_exp_program_gen_Program___init__ "~" false) (egglog_exp_array_api_program_gen_int_program _i)) :ruleset egglog.exp.array_api_program_gen.array_api_program_gen_ruleset)
(constructor egglog_exp_array_api_Int___lt__ (egglog.exp.array_api.Int egglog.exp.array_api.Int) egglog.exp.array_api.Boolean)
(rewrite (egglog_exp_array_api_program_gen_bool_program (egglog_exp_array_api_Int___lt__ _i _j)) (egglog_exp_program_gen_Program___add__ (egglog_exp_program_gen_Program___add__ (egglog_exp_program_gen_Program___add__ (egglog_exp_program_gen_Program___add__ (egglog_exp_program_gen_Program___init__ "(" false) (egglog_exp_array_api_program_gen_int_program _i)) (egglog_exp_program_gen_Program___init__ " < " false)) (egglog_exp_array_api_program_gen_int_program _j)) (egglog_exp_program_gen_Program___init__ ")" false)) :ruleset egglog.exp.array_api_program_gen.array_api_program_gen_ruleset)
(constructor egglog_exp_array_api_Int___le__ (egglog.exp.array_api.Int egglog.exp.array_api.Int) egglog.exp.array_api.Boolean)
(rewrite (egglog_exp_array_api_program_gen_bool_program (egglog_exp_array_api_Int___le__ _i _j)) (egglog_exp_program_gen_Program___add__ (egglog_exp_program_gen_Program___add__ (egglog_exp_program_gen_Program___add__ (egglog_exp_program_gen_Program___add__ (egglog_exp_program_gen_Program___init__ "(" false) (egglog_exp_array_api_program_gen_int_program _i)) (egglog_exp_program_gen_Program___init__ " <= " false)) (egglog_exp_array_api_program_gen_int_program _j)) (egglog_exp_program_gen_Program___init__ ")" false)) :ruleset egglog.exp.array_api_program_gen.array_api_program_gen_ruleset)
(constructor egglog_exp_array_api_Int___gt__ (egglog.exp.array_api.Int egglog.exp.array_api.Int) egglog.exp.array_api.Boolean)
(rewrite (egglog_exp_array_api_program_gen_bool_program (egglog_exp_array_api_Int___gt__ _i _j)) (egglog_exp_program_gen_Program___add__ (egglog_exp_program_gen_Program___add__ (egglog_exp_program_gen_Program___add__ (egglog_exp_program_gen_Program___add__ (egglog_exp_program_gen_Program___init__ "(" false) (egglog_exp_array_api_program_gen_int_program _i)) (egglog_exp_program_gen_Program___init__ " > " false)) (egglog_exp_array_api_program_gen_int_program _j)) (egglog_exp_program_gen_Program___init__ ")" false)) :ruleset egglog.exp.array_api_program_gen.array_api_program_gen_ruleset)
(constructor egglog_exp_array_api_Int___ge__ (egglog.exp.array_api.Int egglog.exp.array_api.Int) egglog.exp.array_api.Boolean)
(rewrite (egglog_exp_array_api_program_gen_bool_program (egglog_exp_array_api_Int___ge__ _i _j)) (egglog_exp_program_gen_Program___add__ (egglog_exp_program_gen_Program___add__ (egglog_exp_program_gen_Program___add__ (egglog_exp_program_gen_Program___add__ (egglog_exp_program_gen_Program___init__ "(" false) (egglog_exp_array_api_program_gen_int_program _i)) (egglog_exp_program_gen_Program___init__ " >= " false)) (egglog_exp_array_api_program_gen_int_program _j)) (egglog_exp_program_gen_Program___init__ ")" false)) :ruleset egglog.exp.array_api_program_gen.array_api_program_gen_ruleset)
(constructor egglog_exp_array_api_Int___eq__ (egglog.exp.array_api.Int egglog.exp.array_api.Int) egglog.exp.array_api.Boolean)
(rewrite (egglog_exp_array_api_program_gen_bool_program (egglog_exp_array_api_Int___eq__ _i _j)) (egglog_exp_program_gen_Program___add__ (egglog_exp_program_gen_Program___add__ (egglog_exp_program_gen_Program___add__ (egglog_exp_program_gen_Program___add__ (egglog_exp_program_gen_Program___init__ "(" false) (egglog_exp_array_api_program_gen_int_program _i)) (egglog_exp_program_gen_Program___init__ " == " false)) (egglog_exp_array_api_program_gen_int_program _j)) (egglog_exp_program_gen_Program___init__ ")" false)) :ruleset egglog.exp.array_api_program_gen.array_api_program_gen_ruleset)
(rewrite (egglog_exp_array_api_program_gen_int_program (egglog_exp_array_api_Int___add__ _i _j)) (egglog_exp_program_gen_Program___add__ (egglog_exp_program_gen_Program___add__ (egglog_exp_program_gen_Program___add__ (egglog_exp_program_gen_Program___add__ (egglog_exp_program_gen_Program___init__ "(" false) (egglog_exp_array_api_program_gen_int_program _i)) (egglog_exp_program_gen_Program___init__ " + " false)) (egglog_exp_array_api_program_gen_int_program _j)) (egglog_exp_program_gen_Program___init__ ")" false)) :ruleset egglog.exp.array_api_program_gen.array_api_program_gen_ruleset)
(constructor egglog_exp_array_api_Int___sub__ (egglog.exp.array_api.Int egglog.exp.array_api.Int) egglog.exp.array_api.Int)
(rewrite (egglog_exp_array_api_program_gen_int_program (egglog_exp_array_api_Int___sub__ _i _j)) (egglog_exp_program_gen_Program___add__ (egglog_exp_program_gen_Program___add__ (egglog_exp_program_gen_Program___add__ (egglog_exp_program_gen_Program___add__ (egglog_exp_program_gen_Program___init__ "(" false) (egglog_exp_array_api_program_gen_int_program _i)) (egglog_exp_program_gen_Program___init__ " - " false)) (egglog_exp_array_api_program_gen_int_program _j)) (egglog_exp_program_gen_Program___init__ ")" false)) :ruleset egglog.exp.array_api_program_gen.array_api_program_gen_ruleset)
(constructor egglog_exp_array_api_Int___mul__ (egglog.exp.array_api.Int egglog.exp.array_api.Int) egglog.exp.array_api.Int)
(rewrite (egglog_exp_array_api_program_gen_int_program (egglog_exp_array_api_Int___mul__ _i _j)) (egglog_exp_program_gen_Program___add__ (egglog_exp_program_gen_Program___add__ (egglog_exp_program_gen_Program___add__ (egglog_exp_program_gen_Program___add__ (egglog_exp_program_gen_Program___init__ "(" false) (egglog_exp_array_api_program_gen_int_program _i)) (egglog_exp_program_gen_Program___init__ " * " false)) (egglog_exp_array_api_program_gen_int_program _j)) (egglog_exp_program_gen_Program___init__ ")" false)) :ruleset egglog.exp.array_api_program_gen.array_api_program_gen_ruleset)
(constructor egglog_exp_array_api_Int___truediv__ (egglog.exp.array_api.Int egglog.exp.array_api.Int) egglog.exp.array_api.Int)
(rewrite (egglog_exp_array_api_program_gen_int_program (egglog_exp_array_api_Int___truediv__ _i _j)) (egglog_exp_program_gen_Program___add__ (egglog_exp_program_gen_Program___add__ (egglog_exp_program_gen_Program___add__ (egglog_exp_program_gen_Program___add__ (egglog_exp_program_gen_Program___init__ "(" false) (egglog_exp_array_api_program_gen_int_program _i)) (egglog_exp_program_gen_Program___init__ " / " false)) (egglog_exp_array_api_program_gen_int_program _j)) (egglog_exp_program_gen_Program___init__ ")" false)) :ruleset egglog.exp.array_api_program_gen.array_api_program_gen_ruleset)
(constructor egglog_exp_array_api_Int___mod__ (egglog.exp.array_api.Int egglog.exp.array_api.Int) egglog.exp.array_api.Int)
(rewrite (egglog_exp_array_api_program_gen_int_program (egglog_exp_array_api_Int___mod__ _i _j)) (egglog_exp_program_gen_Program___add__ (egglog_exp_program_gen_Program___add__ (egglog_exp_program_gen_Program___add__ (egglog_exp_program_gen_Program___add__ (egglog_exp_program_gen_Program___init__ "(" false) (egglog_exp_array_api_program_gen_int_program _i)) (egglog_exp_program_gen_Program___init__ " % " false)) (egglog_exp_array_api_program_gen_int_program _j)) (egglog_exp_program_gen_Program___init__ ")" false)) :ruleset egglog.exp.array_api_program_gen.array_api_program_gen_ruleset)
(constructor egglog_exp_array_api_Int___pow__ (egglog.exp.array_api.Int egglog.exp.array_api.Int) egglog.exp.array_api.Int)
(rewrite (egglog_exp_array_api_program_gen_int_program (egglog_exp_array_api_Int___pow__ _i _j)) (egglog_exp_program_gen_Program___add__ (egglog_exp_program_gen_Program___add__ (egglog_exp_program_gen_Program___add__ (egglog_exp_program_gen_Program___add__ (egglog_exp_program_gen_Program___init__ "(" false) (egglog_exp_array_api_program_gen_int_program _i)) (egglog_exp_program_gen_Program___init__ " ** " false)) (egglog_exp_array_api_program_gen_int_program _j)) (egglog_exp_program_gen_Program___init__ ")" false)) :ruleset egglog.exp.array_api_program_gen.array_api_program_gen_ruleset)
(constructor egglog_exp_array_api_Int___and__ (egglog.exp.array_api.Int egglog.exp.array_api.Int) egglog.exp.array_api.Int)
(rewrite (egglog_exp_array_api_program_gen_int_program (egglog_exp_array_api_Int___and__ _i _j)) (egglog_exp_program_gen_Program___add__ (egglog_exp_program_gen_Program___add__ (egglog_exp_program_gen_Program___add__ (egglog_exp_program_gen_Program___add__ (egglog_exp_program_gen_Program___init__ "(" false) (egglog_exp_array_api_program_gen_int_program _i)) (egglog_exp_program_gen_Program___init__ " & " false)) (egglog_exp_array_api_program_gen_int_program _j)) (egglog_exp_program_gen_Program___init__ ")" false)) :ruleset egglog.exp.array_api_program_gen.array_api_program_gen_ruleset)
(constructor egglog_exp_array_api_Int___or__ (egglog.exp.array_api.Int egglog.exp.array_api.Int) egglog.exp.array_api.Int)
(rewrite (egglog_exp_array_api_program_gen_int_program (egglog_exp_array_api_Int___or__ _i _j)) (egglog_exp_program_gen_Program___add__ (egglog_exp_program_gen_Program___add__ (egglog_exp_program_gen_Program___add__ (egglog_exp_program_gen_Program___add__ (egglog_exp_program_gen_Program___init__ "(" false) (egglog_exp_array_api_program_gen_int_program _i)) (egglog_exp_program_gen_Program___init__ " | " false)) (egglog_exp_array_api_program_gen_int_program _j)) (egglog_exp_program_gen_Program___init__ ")" false)) :ruleset egglog.exp.array_api_program_gen.array_api_program_gen_ruleset)
(constructor egglog_exp_array_api_Int___xor__ (egglog.exp.array_api.Int egglog.exp.array_api.Int) egglog.exp.array_api.Int)
(rewrite (egglog_exp_array_api_program_gen_int_program (egglog_exp_array_api_Int___xor__ _i _j)) (egglog_exp_program_gen_Program___add__ (egglog_exp_program_gen_Program___add__ (egglog_exp_program_gen_Program___add__ (egglog_exp_program_gen_Program___add__ (egglog_exp_program_gen_Program___init__ "(" false) (egglog_exp_array_api_program_gen_int_program _i)) (egglog_exp_program_gen_Program___init__ " ^ " false)) (egglog_exp_array_api_program_gen_int_program _j)) (egglog_exp_program_gen_Program___init__ ")" false)) :ruleset egglog.exp.array_api_program_gen.array_api_program_gen_ruleset)
(constructor egglog_exp_array_api_Int___lshift__ (egglog.exp.array_api.Int egglog.exp.array_api.Int) egglog.exp.array_api.Int)
(rewrite (egglog_exp_array_api_program_gen_int_program (egglog_exp_array_api_Int___lshift__ _i _j)) (egglog_exp_program_gen_Program___add__ (egglog_exp_program_gen_Program___add__ (egglog_exp_program_gen_Program___add__ (egglog_exp_program_gen_Program___add__ (egglog_exp_program_gen_Program___init__ "(" false) (egglog_exp_array_api_program_gen_int_program _i)) (egglog_exp_program_gen_Program___init__ " << " false)) (egglog_exp_array_api_program_gen_int_program _j)) (egglog_exp_program_gen_Program___init__ ")" false)) :ruleset egglog.exp.array_api_program_gen.array_api_program_gen_ruleset)
(constructor egglog_exp_array_api_Int___rshift__ (egglog.exp.array_api.Int egglog.exp.array_api.Int) egglog.exp.array_api.Int)
(rewrite (egglog_exp_array_api_program_gen_int_program (egglog_exp_array_api_Int___rshift__ _i _j)) (egglog_exp_program_gen_Program___add__ (egglog_exp_program_gen_Program___add__ (egglog_exp_program_gen_Program___add__ (egglog_exp_program_gen_Program___add__ (egglog_exp_program_gen_Program___init__ "(" false) (egglog_exp_array_api_program_gen_int_program _i)) (egglog_exp_program_gen_Program___init__ " >> " false)) (egglog_exp_array_api_program_gen_int_program _j)) (egglog_exp_program_gen_Program___init__ ")" false)) :ruleset egglog.exp.array_api_program_gen.array_api_program_gen_ruleset)
(constructor egglog_exp_array_api_Int___floordiv__ (egglog.exp.array_api.Int egglog.exp.array_api.Int) egglog.exp.array_api.Int)
(rewrite (egglog_exp_array_api_program_gen_int_program (egglog_exp_array_api_Int___floordiv__ _i _j)) (egglog_exp_program_gen_Program___add__ (egglog_exp_program_gen_Program___add__ (egglog_exp_program_gen_Program___add__ (egglog_exp_program_gen_Program___add__ (egglog_exp_program_gen_Program___init__ "(" false) (egglog_exp_array_api_program_gen_int_program _i)) (egglog_exp_program_gen_Program___init__ " // " false)) (egglog_exp_array_api_program_gen_int_program _j)) (egglog_exp_program_gen_Program___init__ ")" false)) :ruleset egglog.exp.array_api_program_gen.array_api_program_gen_ruleset)
(constructor egglog_exp_array_api_check_index (egglog.exp.array_api.Int egglog.exp.array_api.Int) egglog.exp.array_api.Int)
(rewrite (egglog_exp_array_api_program_gen_int_program (egglog_exp_array_api_check_index _i _j)) (egglog_exp_program_gen_Program_statement (egglog_exp_program_gen_Program_assign (egglog_exp_array_api_program_gen_int_program _j)) (egglog_exp_program_gen_Program___add__ (egglog_exp_program_gen_Program___add__ (egglog_exp_program_gen_Program___add__ (egglog_exp_program_gen_Program___init__ "assert " false) (egglog_exp_program_gen_Program_assign (egglog_exp_array_api_program_gen_int_program _j))) (egglog_exp_program_gen_Program___init__ " < " false)) (egglog_exp_array_api_program_gen_int_program _i))) :subsume :ruleset egglog.exp.array_api_program_gen.array_api_program_gen_ruleset)
(sort egglog.builtins.UnstableFn[egglog.exp.array_api.Int] (UnstableFn () egglog.exp.array_api.Int))
(constructor egglog_exp_array_api_Int_if_ (egglog.exp.array_api.Boolean egglog.builtins.UnstableFn[egglog.exp.array_api.Int] egglog.builtins.UnstableFn[egglog.exp.array_api.Int]) egglog.exp.array_api.Int)
(rewrite (egglog_exp_array_api_program_gen_int_program (egglog_exp_array_api_Int_if_ _b _ti _ti1)) (egglog_exp_program_gen_Program___add__ (egglog_exp_program_gen_Program___add__ (egglog_exp_program_gen_Program___add__ (egglog_exp_program_gen_Program___add__ (egglog_exp_array_api_program_gen_int_program (unstable-app _ti)) (egglog_exp_program_gen_Program___init__ " if " false)) (egglog_exp_array_api_program_gen_bool_program _b)) (egglog_exp_program_gen_Program___init__ " else " false)) (egglog_exp_array_api_program_gen_int_program (unstable-app _ti1))) :ruleset egglog.exp.array_api_program_gen.array_api_program_gen_ruleset)
(rewrite (egglog_exp_array_api_program_gen_bool_program (egglog_exp_array_api_Boolean___init__ true)) (egglog_exp_program_gen_Program___init__ "True" false) :ruleset egglog.exp.array_api_program_gen.array_api_program_gen_ruleset)
(rewrite (egglog_exp_array_api_program_gen_bool_program $__expr_39) (egglog_exp_program_gen_Program___init__ "False" false) :ruleset egglog.exp.array_api_program_gen.array_api_program_gen_ruleset)
(ruleset egglog.exp.program_gen.program_gen_ruleset)
(function egglog_exp_program_gen_Program_expr (egglog.exp.program_gen.Program) String :no-merge)
(function egglog_exp_program_gen_Program_statements (egglog.exp.program_gen.Program) String :no-merge)
(function egglog_exp_program_gen_Program_next_sym (egglog.exp.program_gen.Program) i64 :no-merge)
(function egglog_exp_program_gen_Program_is_identifier (egglog.exp.program_gen.Program) bool :no-merge)
(rule ((= _p (egglog_exp_program_gen_Program___init__ _s _b))
(egglog_exp_program_gen_Program_compile _p _i))
((set (egglog_exp_program_gen_Program_expr _p) _s)
(set (egglog_exp_program_gen_Program_statements _p) "")
(set (egglog_exp_program_gen_Program_next_sym _p) _i)
(set (egglog_exp_program_gen_Program_is_identifier _p) _b))
:ruleset egglog.exp.program_gen.program_gen_ruleset )
(constructor egglog_exp_program_gen_Program_expr_to_statement (egglog.exp.program_gen.Program) egglog.exp.program_gen.Program)
(rewrite (egglog_exp_program_gen_Program_statement _p1 _p2) (egglog_exp_program_gen_Program___add__ _p1 (egglog_exp_program_gen_Program_expr_to_statement _p2)) :ruleset egglog.exp.program_gen.program_gen_ruleset)
(function egglog_exp_program_gen_Program_parent (egglog.exp.program_gen.Program) egglog.exp.program_gen.Program :merge old)
(rule ((= _p (egglog_exp_program_gen_Program_expr_to_statement _p1))
(egglog_exp_program_gen_Program_compile _p _i))
((set (egglog_exp_program_gen_Program_parent _p1) _p)
(set (egglog_exp_program_gen_Program_is_identifier _p) false))
:ruleset egglog.exp.program_gen.program_gen_ruleset )
(rule ((= _p (egglog_exp_program_gen_Program_expr_to_statement _p1))
(egglog_exp_program_gen_Program_compile _p _i)
(= (egglog_exp_program_gen_Program_parent _p1) _p))
((egglog_exp_program_gen_Program_compile _p1 _i))
:ruleset egglog.exp.program_gen.program_gen_ruleset )
(rule ((= _p (egglog_exp_program_gen_Program_expr_to_statement _p1))
(egglog_exp_program_gen_Program_compile _p _i)
(!= (egglog_exp_program_gen_Program_parent _p1) _p)
(= _s1 (egglog_exp_program_gen_Program_expr _p1)))
((set (egglog_exp_program_gen_Program_statements _p) (+ _s1 "
"))
(set (egglog_exp_program_gen_Program_next_sym _p) _i)
(set (egglog_exp_program_gen_Program_expr _p) ""))
:ruleset egglog.exp.program_gen.program_gen_ruleset )
(rule ((= _p (egglog_exp_program_gen_Program_expr_to_statement _p1))
(= (egglog_exp_program_gen_Program_parent _p1) _p)
(= _s1 (egglog_exp_program_gen_Program_expr _p1))
(= _s2 (egglog_exp_program_gen_Program_statements _p1))
(= _i (egglog_exp_program_gen_Program_next_sym _p1)))
((set (egglog_exp_program_gen_Program_statements _p) (+ _s2 _s1 "
"))
(set (egglog_exp_program_gen_Program_next_sym _p) _i)
(set (egglog_exp_program_gen_Program_expr _p) ""))
:ruleset egglog.exp.program_gen.program_gen_ruleset )
(rule ((= _p (egglog_exp_program_gen_Program___add__ _p1 _p2))
(= (egglog_exp_program_gen_Program_expr _p) (egglog_exp_program_gen_Program_expr _p1))
(= _b (egglog_exp_program_gen_Program_is_identifier _p1)))
((set (egglog_exp_program_gen_Program_is_identifier _p) _b))
:ruleset egglog.exp.program_gen.program_gen_ruleset )
(rule ((= _p (egglog_exp_program_gen_Program___add__ _p1 _p2))
(= (egglog_exp_program_gen_Program_expr _p) (egglog_exp_program_gen_Program_expr _p2))
(= _b (egglog_exp_program_gen_Program_is_identifier _p2)))
((set (egglog_exp_program_gen_Program_is_identifier _p) _b))
:ruleset egglog.exp.program_gen.program_gen_ruleset )
(rule ((= _p (egglog_exp_program_gen_Program___add__ _p1 _p2))
(!= (egglog_exp_program_gen_Program_expr _p) (egglog_exp_program_gen_Program_expr _p1))
(!= (egglog_exp_program_gen_Program_expr _p) (egglog_exp_program_gen_Program_expr _p2)))
((set (egglog_exp_program_gen_Program_is_identifier _p) false))
:ruleset egglog.exp.program_gen.program_gen_ruleset )
(rule ((= _p (egglog_exp_program_gen_Program___add__ _p1 _p2))
(egglog_exp_program_gen_Program_compile _p _i))
((set (egglog_exp_program_gen_Program_parent _p1) _p))
:ruleset egglog.exp.program_gen.program_gen_ruleset )
(rule ((= _p (egglog_exp_program_gen_Program___add__ _p1 _p2))
(egglog_exp_program_gen_Program_compile _p _i)
(= (egglog_exp_program_gen_Program_parent _p1) _p))
((egglog_exp_program_gen_Program_compile _p1 _i))
:ruleset egglog.exp.program_gen.program_gen_ruleset )
(rule ((= _p (egglog_exp_program_gen_Program___add__ _p1 _p2))
(egglog_exp_program_gen_Program_compile _p _i)
(egglog_exp_program_gen_Program_next_sym _p1))
((set (egglog_exp_program_gen_Program_parent _p2) _p))
:ruleset egglog.exp.program_gen.program_gen_ruleset )
(rule ((= _p (egglog_exp_program_gen_Program___add__ _p1 _p2))
(egglog_exp_program_gen_Program_compile _p _i)
(!= (egglog_exp_program_gen_Program_parent _p1) _p)
(= (egglog_exp_program_gen_Program_parent _p2) _p))
((egglog_exp_program_gen_Program_compile _p2 _i))
:ruleset egglog.exp.program_gen.program_gen_ruleset )
(rule ((= _p (egglog_exp_program_gen_Program___add__ _p1 _p2))
(egglog_exp_program_gen_Program_compile _p _i2)
(= (egglog_exp_program_gen_Program_parent _p1) _p)
(= _i (egglog_exp_program_gen_Program_next_sym _p1))
(= (egglog_exp_program_gen_Program_parent _p2) _p))
((egglog_exp_program_gen_Program_compile _p2 _i))
:ruleset egglog.exp.program_gen.program_gen_ruleset )
(rule ((= _p (egglog_exp_program_gen_Program___add__ _p1 _p2))
(= _s1 (egglog_exp_program_gen_Program_expr _p1))
(= _s2 (egglog_exp_program_gen_Program_expr _p2)))
((set (egglog_exp_program_gen_Program_expr _p) (+ _s1 _s2)))
:ruleset egglog.exp.program_gen.program_gen_ruleset )
(rule ((= _p (egglog_exp_program_gen_Program___add__ _p1 _p2))
(= (egglog_exp_program_gen_Program_parent _p1) _p)
(= (egglog_exp_program_gen_Program_parent _p2) _p)
(= _s1 (egglog_exp_program_gen_Program_statements _p1))
(= _s2 (egglog_exp_program_gen_Program_statements _p2))
(= _i (egglog_exp_program_gen_Program_next_sym _p2)))
((set (egglog_exp_program_gen_Program_statements _p) (+ _s1 _s2))
(set (egglog_exp_program_gen_Program_next_sym _p) _i))
:ruleset egglog.exp.program_gen.program_gen_ruleset )
(rule ((= _p (egglog_exp_program_gen_Program___add__ _p1 _p2))
(egglog_exp_program_gen_Program_compile _p _i)
(!= (egglog_exp_program_gen_Program_parent _p1) _p)
(!= (egglog_exp_program_gen_Program_parent _p2) _p))
((set (egglog_exp_program_gen_Program_statements _p) "")
(set (egglog_exp_program_gen_Program_next_sym _p) _i))
:ruleset egglog.exp.program_gen.program_gen_ruleset )
(rule ((= _p (egglog_exp_program_gen_Program___add__ _p1 _p2))
(= (egglog_exp_program_gen_Program_parent _p1) _p)
(!= (egglog_exp_program_gen_Program_parent _p2) _p)
(= _s1 (egglog_exp_program_gen_Program_statements _p1))
(= _i (egglog_exp_program_gen_Program_next_sym _p1)))
((set (egglog_exp_program_gen_Program_statements _p) _s1)
(set (egglog_exp_program_gen_Program_next_sym _p) _i))
:ruleset egglog.exp.program_gen.program_gen_ruleset )
(rule ((= _p (egglog_exp_program_gen_Program___add__ _p1 _p2))
(= (egglog_exp_program_gen_Program_parent _p2) _p)
(!= (egglog_exp_program_gen_Program_parent _p1) _p)
(= _s2 (egglog_exp_program_gen_Program_statements _p2))
(= _i (egglog_exp_program_gen_Program_next_sym _p2)))
((set (egglog_exp_program_gen_Program_statements _p) _s2)
(set (egglog_exp_program_gen_Program_next_sym _p) _i))
:ruleset egglog.exp.program_gen.program_gen_ruleset )
(rule ((= _p (egglog_exp_program_gen_Program_assign _p1))
(egglog_exp_program_gen_Program_compile _p _i))
((set (egglog_exp_program_gen_Program_parent _p1) _p)
(set (egglog_exp_program_gen_Program_is_identifier _p) true))
:ruleset egglog.exp.program_gen.program_gen_ruleset )
(rule ((= _p (egglog_exp_program_gen_Program_assign _p1))
(egglog_exp_program_gen_Program_compile _p _i)
(= (egglog_exp_program_gen_Program_parent _p1) _p))
((egglog_exp_program_gen_Program_compile _p1 _i))
:ruleset egglog.exp.program_gen.program_gen_ruleset )
(rule ((= _p (egglog_exp_program_gen_Program_assign _p1))
(= (egglog_exp_program_gen_Program_parent _p1) _p)
(= _s1 (egglog_exp_program_gen_Program_statements _p1))
(= _i (egglog_exp_program_gen_Program_next_sym _p1))
(= _s2 (egglog_exp_program_gen_Program_expr _p1))
(= (egglog_exp_program_gen_Program_is_identifier _p1) false))
((set (egglog_exp_program_gen_Program_statements _p) (+ _s1 (+ "_" (to-string _i)) " = " _s2 "
"))
(set (egglog_exp_program_gen_Program_expr _p) (+ "_" (to-string _i)))
(set (egglog_exp_program_gen_Program_next_sym _p) (+ _i 1)))
:ruleset egglog.exp.program_gen.program_gen_ruleset )
(rule ((= _p (egglog_exp_program_gen_Program_assign _p1))
(!= (egglog_exp_program_gen_Program_parent _p1) _p)
(egglog_exp_program_gen_Program_compile _p _i)
(= _s2 (egglog_exp_program_gen_Program_expr _p1))
(= (egglog_exp_program_gen_Program_is_identifier _p1) false))
((set (egglog_exp_program_gen_Program_statements _p) (+ (+ "_" (to-string _i)) " = " _s2 "
"))
(set (egglog_exp_program_gen_Program_expr _p) (+ "_" (to-string _i)))
(set (egglog_exp_program_gen_Program_next_sym _p) (+ _i 1)))
:ruleset egglog.exp.program_gen.program_gen_ruleset )
(rule ((= _p (egglog_exp_program_gen_Program_assign _p1))
(= (egglog_exp_program_gen_Program_parent _p1) _p)
(= _s1 (egglog_exp_program_gen_Program_statements _p1))
(= _i (egglog_exp_program_gen_Program_next_sym _p1))
(= _s2 (egglog_exp_program_gen_Program_expr _p1))
(= (egglog_exp_program_gen_Program_is_identifier _p1) true))
((set (egglog_exp_program_gen_Program_statements _p) _s1)
(set (egglog_exp_program_gen_Program_expr _p) _s2)
(set (egglog_exp_program_gen_Program_next_sym _p) _i))
:ruleset egglog.exp.program_gen.program_gen_ruleset )
(rule ((= _p (egglog_exp_program_gen_Program_assign _p1))
(!= (egglog_exp_program_gen_Program_parent _p1) _p)
(egglog_exp_program_gen_Program_compile _p _i)
(= _s2 (egglog_exp_program_gen_Program_expr _p1))
(= (egglog_exp_program_gen_Program_is_identifier _p1) true))
((set (egglog_exp_program_gen_Program_statements _p) "")
(set (egglog_exp_program_gen_Program_expr _p) _s2)
(set (egglog_exp_program_gen_Program_next_sym _p) _i))
:ruleset egglog.exp.program_gen.program_gen_ruleset )
(rule ((= _p (egglog_exp_program_gen_Program_function_two _p1 _p2 _p3 _s1))
(egglog_exp_program_gen_Program_compile _p _i))
((set (egglog_exp_program_gen_Program_parent _p2) _p)
(set (egglog_exp_program_gen_Program_parent _p3) _p)
(set (egglog_exp_program_gen_Program_parent _p1) _p)
(egglog_exp_program_gen_Program_compile _p2 _i)
(egglog_exp_program_gen_Program_compile _p3 _i)
(egglog_exp_program_gen_Program_compile _p1 _i)
(set (egglog_exp_program_gen_Program_is_identifier _p) true))
:ruleset egglog.exp.program_gen.program_gen_ruleset )
(rule ((= _p (egglog_exp_program_gen_Program_function_two _p1 _p2 _p3 _s1))
(egglog_exp_program_gen_Program_compile _p _i)
(= _s2 (egglog_exp_program_gen_Program_expr _p1))
(= _s3 (egglog_exp_program_gen_Program_statements _p1))
(= _s4 (egglog_exp_program_gen_Program_expr _p2))
(= _s5 (egglog_exp_program_gen_Program_expr _p3)))
((set (egglog_exp_program_gen_Program_statements _p) (+ "def " _s1 "(" _s4 ", " _s5 "):
" (replace _s3 "
" "
") "return " _s2 "
"))
(set (egglog_exp_program_gen_Program_next_sym _p) _i)
(set (egglog_exp_program_gen_Program_expr _p) _s1))
:ruleset egglog.exp.program_gen.program_gen_ruleset )
(constructor egglog_exp_program_gen_Program_function_three (egglog.exp.program_gen.Program egglog.exp.program_gen.Program egglog.exp.program_gen.Program egglog.exp.program_gen.Program String) egglog.exp.program_gen.Program)
(rule ((= _p (egglog_exp_program_gen_Program_function_three _p1 _p2 _p3 _p4 _s1))
(egglog_exp_program_gen_Program_compile _p _i))
((set (egglog_exp_program_gen_Program_parent _p2) _p)
(set (egglog_exp_program_gen_Program_parent _p3) _p)
(set (egglog_exp_program_gen_Program_parent _p1) _p)
(set (egglog_exp_program_gen_Program_parent _p4) _p)
(egglog_exp_program_gen_Program_compile _p2 _i)
(egglog_exp_program_gen_Program_compile _p3 _i)
(egglog_exp_program_gen_Program_compile _p1 _i)
(egglog_exp_program_gen_Program_compile _p4 _i)
(set (egglog_exp_program_gen_Program_is_identifier _p) true))
:ruleset egglog.exp.program_gen.program_gen_ruleset )
(rule ((= _p (egglog_exp_program_gen_Program_function_three _p1 _p2 _p3 _p4 _s1))
(egglog_exp_program_gen_Program_compile _p _i)
(= _s2 (egglog_exp_program_gen_Program_expr _p1))
(= _s3 (egglog_exp_program_gen_Program_statements _p1))
(= _s4 (egglog_exp_program_gen_Program_expr _p2))
(= _s5 (egglog_exp_program_gen_Program_expr _p3))
(= _s6 (egglog_exp_program_gen_Program_expr _p4)))
((set (egglog_exp_program_gen_Program_statements _p) (+ "def " _s1 "(" _s4 ", " _s5 ", " _s6 "):
" (replace _s3 "
" "
") "return " _s2 "
"))
(set (egglog_exp_program_gen_Program_next_sym _p) _i)
(set (egglog_exp_program_gen_Program_expr _p) _s1))
:ruleset egglog.exp.program_gen.program_gen_ruleset )
(unstable-combined-ruleset combined_ruleset_4764447312 egglog.exp.array_api_program_gen.array_api_program_gen_ruleset egglog.exp.program_gen.program_gen_ruleset)
(ruleset egglog.exp.array_api_program_gen.array_api_program_gen_eval_ruleset)
(unstable-combined-ruleset combined_ruleset_4764447632 combined_ruleset_4764447312 egglog.exp.array_api_program_gen.array_api_program_gen_eval_ruleset)
(run-schedule (saturate (run combined_ruleset_4764447632)))
(extract (egglog_exp_program_gen_Program_statements (egglog_exp_array_api_program_gen_ndarray_function_two_program (egglog_exp_array_api_NDArray___getitem__ (egglog_exp_array_api_NDArray___matmul__ (egglog_exp_array_api_NDArray___sub__ $__expr_7 $__expr_44) (egglog_exp_array_api_NDArray___matmul__ $__expr_49 (egglog_exp_array_api_NDArray___getitem__ (egglog_exp_array_api_NDArray_T (egglog_exp_array_api_TupleNDArray___getitem__ $__expr_42 $__expr_19)) (egglog_exp_array_api_IndexKey_multi_axis (egglog_exp_array_api_MultiAxisIndexKey_from_vec (vec-of $__expr_13 (egglog_exp_array_api_MultiAxisIndexKeyItem_slice (egglog_exp_array_api_Slice___init__ $__expr_36 (egglog_exp_array_api_OptionalInt_some (egglog_exp_array_api_Value_to_int (egglog_exp_array_api_NDArray_index (egglog_exp_array_api_sum (egglog_exp_array_api_astype (egglog_exp_array_api_NDArray___gt__ $__expr_22 (egglog_exp_array_api_NDArray___mul__ $__expr_41 (egglog_exp_array_api_NDArray___getitem__ $__expr_22 (egglog_exp_array_api_IndexKey_int $__expr_8)))) $__expr_43) $__expr_23) $__expr_29))) $__expr_36)))))))) (egglog_exp_array_api_IndexKey_multi_axis (egglog_exp_array_api_MultiAxisIndexKey_from_vec (vec-of $__expr_13 (egglog_exp_array_api_MultiAxisIndexKeyItem_slice (egglog_exp_array_api_Slice___init__ $__expr_36 (egglog_exp_array_api_OptionalInt_some $__expr_19) $__expr_36)))))) $__expr_50 $__expr_45)) 0)