kdrag.kernel

The kernel hold core proof datatypes and core inference rules. By and large, all proofs must flow through this module.

Module Attributes

defns

defn holds definitional axioms for function symbols.

Functions

FreshVar(prefix, sort)

Generate a fresh variable.

Inductive(name[, ctx, auto_fresh])

Declare datatypes with auto generated induction principles.

andI(pfs)

Prove an and from two kd.Proofs of its conjuncts.

axiom(thm[, fvs, by])

Assert an axiom.

choose(pf)

Convert a theorem of the form `|= forall xs, exists y0 y1.

compose(ab, bc)

Compose two implications.

decl_occurs(f, body)

Check if symbol f appears in body.

declare(name, *sorts)

Reserve a name.

define(name, args, body)

Define a non recursive definition.

define_fix(name, args, retsort, fix_lam)

Define a recursive definition.

define_simple(name, args, body)

A simple non recursive definition is a conservative extension https://en.wikipedia.org/wiki/Conservative_extension

ext(domain, range_)

forget(ts, thm)

"Forget" a term using existentials.

free_vars(e)

Get an overapproximation of free variables in a term.

fresh_const(q[, prefixes])

Generate fresh constants of same sort as quantifier.

generalize(vs, pf)

Generalize a theorem with respect to a list of schema variables.

herb(thm[, prefixes])

Herbrandize a theorem.

induct_inductive(x, P)

Build a basic induction principle for an algebraic datatype

instan(ts, pf)

Instantiate a universally quantified formula.

is_declared(e)

is_defined(x)

Determined if expression head is in definitions.

is_fresh_var(v)

Check if a variable is a schema variable.

is_proof(p)

make_unfolding(pf)

Take an axiom of the form |= forall x0 x1 ..., xn, f(x0, x1, ..., xn) = body and return a Defn object for f. Unfolding judgments can be used with unfold_defns.

modus(ab, a)

Modus ponens for implies and equality.

obtain(thm)

Skolemize an existential quantifier.

open_binder(lam)

Open a quantifier with fresh variables.

prove(thm[, by, admit, timeout, dump, ...])

Prove a theorem using a list of previously proved lemmas.

register_definition(defn)

Can register other unfoldings besides those generated by define.

rename_vars2(pf, vs[, patterns, no_patterns])

Rename bound variables and also attach triggers

specialize(ts, thm)

Instantiate a universally quantified formula forall xs, P(xs) -> P(ts) This is forall elimination

subst(t, eqs)

Substitute using equality proofs

trigger(pf[, patterns, no_patterns])

Add e-matching triggers to a quantified proof.

unfold(e, decls)

Unfold function definitions in an expression.

unfold_defns(e, defns)

Unfold definitions in an expression.

weaken(pf, fvs)

Classes

Judgement()

Judgements should be constructed by smart constructors.

Proof(fvs, thm, reason[, admit])

It is unlikely that users should be accessing the Proof constructor directly.

Unfolding(name, decl, args, body, ax, ...)

A record storing definition.

Exceptions

LemmaError

SolverFailure

The solver could not establish a theorem.

kdrag.kernel.FreshVar(prefix: str, sort: SortRef) → ExprRef

Generate a fresh variable. This is distinguished from FreshConst by the fact that it has freshness evidence. This is intended to be used for constants that represent arbitrary terms (implicitly universally quantified). For example, axioms like c_fresh = t should never be asserted about bare FreshVars as they imply a probably inconsistent axiom, whereas asserting such an axiom about FreshConst is ok, effectively defining a new rigid constant.

>>> FreshVar("x", smt.IntSort()).fresh_evidence
_FreshVarEvidence(v=x!...)
Parameters:
  • prefix (str)

  • sort (SortRef)

Return type:

ExprRef

kdrag.kernel.Inductive(name: str, ctx=None, auto_fresh=False) → Datatype

Declare datatypes with auto generated induction principles. Wrapper around z3.Datatype

>>> Nat = Inductive("Nat909")
>>> Nat.declare("zero")
>>> Nat.declare("succ", ("pred", Nat))
>>> Nat = Nat.create()
>>> Nat.succ(Nat.zero)
succ(zero)
Parameters:

name (str)

Return type:

Datatype

class kdrag.kernel.Judgement

Bases: object

Judgements should be constructed by smart constructors. Having an object of supertype judgement represents having shown some kind of truth. Judgements are the things that go above and below inference lines in a proof system. Don’t worry about it. It is just nice to have a name for the concept.

See: - https://en.wikipedia.org/wiki/Judgment_(mathematical_logic) - https://mathoverflow.net/questions/254518/what-exactly-is-a-judgement - https://ncatlab.org/nlab/show/judgment

exception kdrag.kernel.LemmaError

Bases: Exception

add_note(object, /)

Exception.add_note(note) – add a note to the exception

args
with_traceback(object, /)

Exception.with_traceback(tb) – set self.__traceback__ to tb and return self.

class kdrag.kernel.Proof(fvs: frozenset[ExprRef], thm: BoolRef, reason: list[Any], admit: bool = False)

Bases: Judgement

It is unlikely that users should be accessing the Proof constructor directly. This is not ironclad. If you really want the Proof constructor, I can’t stop you.

Parameters:
  • fvs (frozenset[ExprRef])

  • thm (BoolRef)

  • reason (list[Any])

  • admit (bool)

__call__(*args: ExprRef | Proof | int | float | complex | str)
>>> x,y = smt.Ints("x y")
>>> p = prove(smt.ForAll([y], smt.ForAll([x], x >= x - 1)))
>>> p(x)
|= ForAll(x, x >= x - 1)
>>> p(x, 7)
|= 7 >= 7 - 1
>>> r = smt.Real("r")
>>> prove(smt.ForAll(r, r <= r))(42).thm.arg(0).sort()
Real
>>> a,b,c = smt.Bools("a b c")
>>> ab = prove(smt.Implies(a,smt.Implies(a, a)))
>>> a = axiom(a)
>>> ab(a)
|= Implies(a, a)
>>> ab(a,a)
|= a
Parameters:

args (ExprRef | Proof | int | float | complex | str)

admit: bool = False
forall(fresh_vars: list[ExprRef]) → Proof

Generalize a proof involved schematic variables generated by FreshVar

>>> x = FreshVar("x", smt.IntSort())
>>> prove(x + 1 > x).forall([x])
|= ForAll(x!..., x!... + 1 > x!...)
Parameters:

fresh_vars (list[ExprRef])

Return type:

Proof

fvs: frozenset[ExprRef]
reason: list[Any]
thm: BoolRef
exception kdrag.kernel.SolverFailure

Bases: LemmaError

The solver could not establish a theorem.

add_note(object, /)

Exception.add_note(note) – add a note to the exception

args
with_traceback(object, /)

Exception.with_traceback(tb) – set self.__traceback__ to tb and return self.

class kdrag.kernel.Unfolding(name: str, decl: FuncDeclRef, args: list[ExprRef], body: ExprRef, ax: Proof, _subst_fun_body: ExprRef)

Bases: Judgement

A record storing definition. It is useful to record definitions as special axioms because we often must unfold them. It’s more a recognition of a fact in unfoldable form

Parameters:
  • name (str)

  • decl (FuncDeclRef)

  • args (list[ExprRef])

  • body (ExprRef)

  • ax (Proof)

  • _subst_fun_body (ExprRef)

args: list[ExprRef]
ax: Proof
body: ExprRef
decl: FuncDeclRef
name: str
kdrag.kernel.andI(pfs: Sequence[Proof]) → Proof

Prove an and from two kd.Proofs of its conjuncts.

>>> a, b = smt.Bools("a b")
>>> pa = kd.axiom(smt.Implies(True, a))
>>> pb = kd.axiom(smt.Implies(True, b))
>>> andI([pa, pb, pb])
|= Implies(True, And(a, b, b))
Parameters:

pfs (Sequence[Proof])

Return type:

Proof

kdrag.kernel.axiom(thm: BoolRef, fvs=frozenset({}), by=['axiom']) → Proof

Assert an axiom.

Axioms are necessary and useful. But you must use great care.

Parameters:
  • thm (BoolRef) – The axiom to assert.

  • by – A python object explaining why the axiom should exist. Often a string explaining the axiom.

Return type:

Proof

kdrag.kernel.choose(pf: Proof) → tuple[list[FuncDeclRef], Proof]

Convert a theorem of the form |= forall xs, exists y0 y1… , P(xs, y0, y1, …) to |= forall xs, P(xs, f0(xs), f1(xs), …).

>>> x,y,z = smt.Ints("x y z")
>>> pf = kd.prove(smt.ForAll([x], smt.Exists([y], y >= x)))
>>> choose(pf)
([f!...], |= ForAll(x!..., f!...(x!...) >= x!...))
Parameters:

pf (Proof)

Return type:

tuple[list[FuncDeclRef], Proof]

kdrag.kernel.compose(ab: Proof, bc: Proof) → Proof

Compose two implications. Useful for chaining implications.

>>> a,b,c = smt.Bools("a b c")
>>> ab = axiom(smt.Implies(a, b))
>>> bc = axiom(smt.Implies(b, c))
>>> compose(ab, bc)
|= Implies(a, c)
Parameters:
Return type:

Proof

kdrag.kernel.decl_occurs(f: FuncDeclRef, body: ExprRef) → bool

Check if symbol f appears in body.

>>> x = smt.Int("x")
>>> y = smt.Bool("y")
>>> f = smt.Function("f", smt.IntSort(), smt.BoolSort(), smt.IntSort())
>>> assert decl_occurs(f, 1 + f(x, y))
>>> assert not decl_occurs(f, x + y + 1)
Parameters:
  • f (FuncDeclRef)

  • body (ExprRef)

Return type:

bool

kdrag.kernel.declare(name: str, *sorts: SortRef) → FuncDeclRef

Reserve a name. This helps avoid accidental clashing of axioms over the same symbol. It also make serialization possible and easier.

>>> declare("reserved_example", smt.IntSort())
reserved_example
>>> declare("reserved_example", smt.IntSort())
Traceback (most recent call last):
    ...
ValueError: ('Declaration name already reserved: reserved_example', 'with sorts', [], Int)
Parameters:
  • name (str)

  • sorts (SortRef)

Return type:

FuncDeclRef

kdrag.kernel.define(name: str, args: ExprRef | list[ExprRef], body: ExprRef) → FuncDeclRef

Define a non recursive definition. Useful for shorthand and abstraction. Does not currently defend against ill formed definitions. TODO: Check for bad circularity, record dependencies

Parameters:
  • name (str) – The name of the term to define.

  • args (ExprRef | list[ExprRef]) – A single argument or a list of arguments (empty for a constant).

  • body (ExprRef) – The definition of the term.

Returns:

The function declaration, including for zero arguments.

Apply it with () to obtain a constant expression.

Return type:

smt.FuncDeclRef

kdrag.kernel.define_fix(name: str, args: list[ExprRef], retsort, fix_lam) → FuncDeclRef

Define a recursive definition.

Parameters:
  • name (str)

  • args (list[ExprRef])

Return type:

FuncDeclRef

kdrag.kernel.define_simple(name: str, args: list[ExprRef], body: ExprRef) → FuncDeclRef

A simple non recursive definition is a conservative extension https://en.wikipedia.org/wiki/Conservative_extension

>>> x = smt.Int("x")
>>> define_simple("mysucc9034", [x], x + 1)
mysucc9034
>>> f = smt.Function("f102", smt.IntSort(), smt.IntSort())
>>> define_simple("f102", [x], f(x))
Traceback (most recent call last):
    ...
ValueError: ('Symbol appears in it's own definition. This is not a simple definition and requires further checks for consistency', f102, f102(x))
Parameters:
  • name (str)

  • args (list[ExprRef])

  • body (ExprRef)

Return type:

FuncDeclRef

kdrag.kernel.defns: dict[FuncDeclRef, Unfolding] = {(Array (Array Sierpinski Bool) Bool).finite: Unfolding(name='(Array (Array Sierpinski Bool) Bool).finite', decl=(Array (Array Sierpinski Bool) Bool).finite, args=[A!2210], body=Exists(finwit!2209,        ForAll(x!2208,               A!2210[x!2208] ==               Contains(finwit!2209, Unit(x!2208)))), ax=|= ForAll(A,        (Array (Array Sierpinski Bool) Bool).finite(A) ==        (Exists(finwit!2209,                ForAll(x!2208,                       A[x!2208] ==                       Contains(finwit!2209, Unit(x!2208)))))), _subst_fun_body=Exists(finwit!2209,        ForAll(x!2208,               Var(2)[x!2208] ==               Contains(finwit!2209, Unit(x!2208))))), (Array Bool Bool).choose: Unfolding(name='(Array Bool Bool).choose', decl=(Array Bool Bool).choose, args=[P!285], body=If(P!285[True], True, False), ax=|= ForAll(P,        (Array Bool Bool).choose(P) ==        If(P[True], True, False)), _subst_fun_body=If(Var(0)[True], True, False)), (Array Bool Bool).finite: Unfolding(name='(Array Bool Bool).finite', decl=(Array Bool Bool).finite, args=[A!128], body=Exists(finwit!127,        ForAll(x!126,               A!128[x!126] ==               Contains(finwit!127, Unit(x!126)))), ax=|= ForAll(A,        (Array Bool Bool).finite(A) ==        (Exists(finwit!127,                ForAll(x!126,                       A[x!126] ==                       Contains(finwit!127, Unit(x!126)))))), _subst_fun_body=Exists(finwit!127,        ForAll(x!126,               Var(2)[x!126] ==               Contains(finwit!127, Unit(x!126))))), (Array EReal Bool).finite: Unfolding(name='(Array EReal Bool).finite', decl=(Array EReal Bool).finite, args=[A!2606], body=Exists(finwit!2605,        ForAll(x!2604,               A!2606[x!2604] ==               Contains(finwit!2605, Unit(x!2604)))), ax=|= ForAll(A,        (Array EReal Bool).finite(A) ==        (Exists(finwit!2605,                ForAll(x!2604,                       A[x!2604] ==                       Contains(finwit!2605, Unit(x!2604)))))), _subst_fun_body=Exists(finwit!2605,        ForAll(x!2604,               Var(2)[x!2604] ==               Contains(finwit!2605, Unit(x!2604))))), (Array Int Bool).choose: Unfolding(name='(Array Int Bool).choose', decl=(Array Int Bool).choose, args=[P!415], body=search(P!415, 0), ax=|= ForAll(P, (Array Int Bool).choose(P) == search(P, 0)), _subst_fun_body=search(Var(0), 0)), (Array Int Bool).finite: Unfolding(name='(Array Int Bool).finite', decl=(Array Int Bool).finite, args=[A!72], body=Exists(finwit!71,        ForAll(x!70,               A!72[x!70] == Contains(finwit!71, Unit(x!70)))), ax=|= ForAll(A,        (Array Int Bool).finite(A) ==        (Exists(finwit!71,                ForAll(x!70,                       A[x!70] ==                       Contains(finwit!71, Unit(x!70)))))), _subst_fun_body=Exists(finwit!71,        ForAll(x!70,               Var(2)[x!70] ==               Contains(finwit!71, Unit(x!70))))), (Array Int C).add: Unfolding(name='(Array Int C).add', decl=(Array Int C).add, args=[a!2519, b!2520], body=Lambda(i, C.add(a!2519[i], b!2520[i])), ax=|= ForAll([a, b],        (Array Int C).add(a, b) ==        (Lambda(i, C.add(a[i], b[i])))), _subst_fun_body=Lambda(i, C.add(Var(1)[i], Var(2)[i]))), (Array Int C).mul: Unfolding(name='(Array Int C).mul', decl=(Array Int C).mul, args=[a!2532, b!2533], body=Lambda(i, C.mul(a!2532[i], b!2533[i])), ax=|= ForAll([a, b],        (Array Int C).mul(a, b) ==        (Lambda(i, C.mul(a[i], b[i])))), _subst_fun_body=Lambda(i, C.mul(Var(1)[i], Var(2)[i]))), (Array Int Real).add: Unfolding(name='(Array Int Real).add', decl=(Array Int Real).add, args=[a!1360, b!1361], body=Lambda(i, a!1360[i] + b!1361[i]), ax=|= ForAll([a, b],        (Array Int Real).add(a, b) ==        (Lambda(i, a[i] + b[i]))), _subst_fun_body=Lambda(i, Var(1)[i] + Var(2)[i])), (Array Int Real).div_: Unfolding(name='(Array Int Real).div_', decl=(Array Int Real).div_, args=[a!1377, b!1378], body=Lambda(i, a!1377[i]/b!1378[i]), ax=|= ForAll([a, b],        (Array Int Real).div_(a, b) == (Lambda(i, a[i]/b[i]))), _subst_fun_body=Lambda(i, Var(1)[i]/Var(2)[i])), (Array Int Real).mul: Unfolding(name='(Array Int Real).mul', decl=(Array Int Real).mul, args=[a!1368, b!1369], body=Lambda(i, a!1368[i]*b!1369[i]), ax=|= ForAll([a, b],        (Array Int Real).mul(a, b) == (Lambda(i, a[i]*b[i]))), _subst_fun_body=Lambda(i, Var(1)[i]*Var(2)[i])), (Array Int Real).neg: Unfolding(name='(Array Int Real).neg', decl=(Array Int Real).neg, args=[a!1379], body=Lambda(i, -a!1379[i]), ax=|= ForAll(a, (Array Int Real).neg(a) == (Lambda(i, -a[i]))), _subst_fun_body=Lambda(i, -Var(1)[i])), (Array Int Real).sub: Unfolding(name='(Array Int Real).sub', decl=(Array Int Real).sub, args=[a!1366, b!1367], body=Lambda(i, a!1366[i] - b!1367[i]), ax=|= ForAll([a, b],        (Array Int Real).sub(a, b) ==        (Lambda(i, a[i] - b[i]))), _subst_fun_body=Lambda(i, Var(1)[i] - Var(2)[i])), (Array Real Bool).finite: Unfolding(name='(Array Real Bool).finite', decl=(Array Real Bool).finite, args=[A!24], body=Exists(finwit!23,        ForAll(x!22,               A!24[x!22] == Contains(finwit!23, Unit(x!22)))), ax=|= ForAll(A,        (Array Real Bool).finite(A) ==        (Exists(finwit!23,                ForAll(x!22,                       A[x!22] ==                       Contains(finwit!23, Unit(x!22)))))), _subst_fun_body=Exists(finwit!23,        ForAll(x!22,               Var(2)[x!22] ==               Contains(finwit!23, Unit(x!22))))), (Array Real Real).div_: Unfolding(name='(Array Real Real).div_', decl=(Array Real Real).div_, args=[f!519, g!520], body=Lambda(x, f!519[x]/g!520[x]), ax=|= ForAll([f, g],        (Array Real Real).div_(f, g) ==        (Lambda(x, f[x]/g[x]))), _subst_fun_body=Lambda(x, Var(1)[x]/Var(2)[x])), (Array Real Real).mul: Unfolding(name='(Array Real Real).mul', decl=(Array Real Real).mul, args=[f!517, g!518], body=Lambda(x, f!517[x]*g!518[x]), ax=|= ForAll([f, g],        (Array Real Real).mul(f, g) == (Lambda(x, f[x]*g[x]))), _subst_fun_body=Lambda(x, Var(1)[x]*Var(2)[x])), (Array Real Real).sub: Unfolding(name='(Array Real Real).sub', decl=(Array Real Real).sub, args=[f!515, g!516], body=Lambda(x, f!515[x] - g!516[x]), ax=|= ForAll([f, g],        (Array Real Real).sub(f, g) ==        (Lambda(x, f[x] - g[x]))), _subst_fun_body=Lambda(x, Var(1)[x] - Var(2)[x])), (Array Sierpinski Bool).finite: Unfolding(name='(Array Sierpinski Bool).finite', decl=(Array Sierpinski Bool).finite, args=[A!2154], body=Exists(finwit!2153,        ForAll(x!2152,               A!2154[x!2152] ==               Contains(finwit!2153, Unit(x!2152)))), ax=|= ForAll(A,        (Array Sierpinski Bool).finite(A) ==        (Exists(finwit!2153,                ForAll(x!2152,                       A[x!2152] ==                       Contains(finwit!2153, Unit(x!2152)))))), _subst_fun_body=Exists(finwit!2153,        ForAll(x!2152,               Var(2)[x!2152] ==               Contains(finwit!2153, Unit(x!2152))))), (Array Sierpinski Bool).open: Unfolding(name='(Array Sierpinski Bool).open', decl=(Array Sierpinski Bool).open, args=[A!2238], body=Or(A!2238 == K(Sierpinski, False),    A!2238 == K(Sierpinski, True),    A!2238 == Store(K(Sierpinski, False), S1, True)), ax=|= ForAll(A,        (Array Sierpinski Bool).open(A) ==        Or(A == K(Sierpinski, False),           A == K(Sierpinski, True),           A == Store(K(Sierpinski, False), S1, True))), _subst_fun_body=Or(Var(0) == K(Sierpinski, False),    Var(0) == K(Sierpinski, True),    Var(0) == Store(K(Sierpinski, False), S1, True))), (Array Vec2 Bool).finite: Unfolding(name='(Array Vec2 Bool).finite', decl=(Array Vec2 Bool).finite, args=[A!2719], body=Exists(finwit!2718,        ForAll(x!2717,               A!2719[x!2717] ==               Contains(finwit!2718, Unit(x!2717)))), ax=|= ForAll(A,        (Array Vec2 Bool).finite(A) ==        (Exists(finwit!2718,                ForAll(x!2717,                       A[x!2717] ==                       Contains(finwit!2718, Unit(x!2717)))))), _subst_fun_body=Exists(finwit!2718,        ForAll(x!2717,               Var(2)[x!2717] ==               Contains(finwit!2718, Unit(x!2717))))), Atom.fresh: Unfolding(name='Atom.fresh', decl=Atom.fresh, args=[x!2400, a!2401], body=a!2401 != x!2400, ax=|= ForAll([x, a], Atom.fresh(x, a) == a != x), _subst_fun_body=Var(1) != Var(0)), Atom.swap: Unfolding(name='Atom.swap', decl=Atom.swap, args=[x!2402, a!2403, b!2404], body=If(x!2402 == a!2403,    b!2404,    If(x!2402 == b!2404, a!2403, x!2402)), ax=|= ForAll([x, a, b],        Atom.swap(x, a, b) == If(x == a, b, If(x == b, a, x))), _subst_fun_body=If(Var(0) == Var(1),    Var(2),    If(Var(0) == Var(2), Var(1), Var(0)))), BitVecN.to_int: Unfolding(name='BitVecN.to_int', decl=BitVecN.to_int, args=[x!256], body=If(Length(val(x!256)) == 0,    0,    BV2Int(Nth(val(x!256), 0)) +    2*    BitVecN.to_int(BitVecN(seq.extract(val(x!256),                                       1,                                       Length(val(x!256)) - 1)))), ax=|= ForAll(x,        BitVecN.to_int(x) ==        If(Length(val(x)) == 0,           0,           BV2Int(Nth(val(x), 0)) +           2*           BitVecN.to_int(BitVecN(seq.extract(val(x),                                         1,                                         Length(val(x)) - 1))))), _subst_fun_body=If(Length(val(Var(0))) == 0,    0,    BV2Int(Nth(val(Var(0)), 0)) +    2*    BitVecN.to_int(BitVecN(seq.extract(val(Var(0)),                                       1,                                       Length(val(Var(0))) -                                       1))))), C.add: Unfolding(name='C.add', decl=C.add, args=[z1!0, z2!1], body=C(re(z1!0) + re(z2!1), im(z1!0) + im(z2!1)), ax=|= ForAll([z1, z2],        C.add(z1, z2) == C(re(z1) + re(z2), im(z1) + im(z2))), _subst_fun_body=C(re(Var(0)) + re(Var(1)), im(Var(0)) + im(Var(1)))), C.div_: Unfolding(name='C.div_', decl=C.div_, args=[z1!4, z2!5], body=C((re(z1!4)*re(z2!5) + im(z1!4)*im(z2!5))/   (re(z2!5)**2 + im(z2!5)**2),   (im(z1!4)*re(z2!5) - re(z1!4)*im(z2!5))/   (re(z2!5)**2 + im(z2!5)**2)), ax=|= ForAll([z1, z2],        C.div_(z1, z2) ==        C((re(z1)*re(z2) + im(z1)*im(z2))/          (re(z2)**2 + im(z2)**2),          (im(z1)*re(z2) - re(z1)*im(z2))/          (re(z2)**2 + im(z2)**2))), _subst_fun_body=C((re(Var(0))*re(Var(1)) + im(Var(0))*im(Var(1)))/   (re(Var(1))**2 + im(Var(1))**2),   (im(Var(0))*re(Var(1)) - re(Var(0))*im(Var(1)))/   (re(Var(1))**2 + im(Var(1))**2))), C.mul: Unfolding(name='C.mul', decl=C.mul, args=[z1!2, z2!3], body=C(re(z1!2)*re(z2!3) - im(z1!2)*im(z2!3),   re(z1!2)*im(z2!3) + im(z1!2)*re(z2!3)), ax=|= ForAll([z1, z2],        C.mul(z1, z2) ==        C(re(z1)*re(z2) - im(z1)*im(z2),          re(z1)*im(z2) + im(z1)*re(z2))), _subst_fun_body=C(re(Var(0))*re(Var(1)) - im(Var(0))*im(Var(1)),   re(Var(0))*im(Var(1)) + im(Var(0))*re(Var(1)))), C.norm2: Unfolding(name='C.norm2', decl=C.norm2, args=[z!2508], body=C.mul(z!2508, conj(z!2508)), ax=|= ForAll(z, C.norm2(z) == C.mul(z, conj(z))), _subst_fun_body=C.mul(Var(0), conj(Var(0)))), C.rezip: Unfolding(name='C.rezip', decl=C.rezip, args=[ab!2546], body=Lambda(i, C(_0(ab!2546)[i], _1(ab!2546)[i])), ax=|= ForAll(ab,        C.rezip(ab) == (Lambda(i, C(_0(ab)[i], _1(ab)[i])))), _subst_fun_body=Lambda(i, C(_0(Var(1))[i], _1(Var(1))[i]))), C.unzip: Unfolding(name='C.unzip', decl=C.unzip, args=[a!2545], body=Tuple_Array_Array(Lambda(i, re(a!2545[i])),                   Lambda(i, im(a!2545[i]))), ax=|= ForAll(a,        C.unzip(a) ==        Tuple_Array_Array(Lambda(i, re(a[i])),                          Lambda(i, im(a[i])))), _subst_fun_body=Tuple_Array_Array(Lambda(i, re(Var(1)[i])),                   Lambda(i, im(Var(1)[i])))), EPosReal.wf: Unfolding(name='EPosReal.wf', decl=EPosReal.wf, args=[x!2638], body=Implies(is(real, x!2638), val(x!2638) >= 0), ax=|= ForAll(x,        EPosReal.wf(x) == Implies(is(real, x), val(x) >= 0)), _subst_fun_body=Implies(is(real, Var(0)), val(Var(0)) >= 0)), EReal.add: Unfolding(name='EReal.add', decl=EReal.add, args=[x!2565, y!2566], body=If(And(is(Real, x!2565), is(Real, y!2566)),    Real(val(x!2565) + val(y!2566)),    If(And(is(Inf, x!2565), Not(is(NegInf, y!2566))),       Inf,       If(And(Not(is(NegInf, x!2565)), is(Inf, y!2566)),          Inf,          If(And(is(NegInf, x!2565), Not(is(Inf, y!2566))),             NegInf,             If(And(Not(is(Inf, x!2565)), is(NegInf, y!2566)),                NegInf,                add_undef(x!2565, y!2566)))))), ax=|= ForAll([x, y],        EReal.add(x, y) ==        If(And(is(Real, x), is(Real, y)),           Real(val(x) + val(y)),           If(And(is(Inf, x), Not(is(NegInf, y))),              Inf,              If(And(Not(is(NegInf, x)), is(Inf, y)),                 Inf,                 If(And(is(NegInf, x), Not(is(Inf, y))),                    NegInf,                    If(And(Not(is(Inf, x)), is(NegInf, y)),                       NegInf,                       add_undef(x, y))))))), _subst_fun_body=If(And(is(Real, Var(0)), is(Real, Var(1))),    Real(val(Var(0)) + val(Var(1))),    If(And(is(Inf, Var(0)), Not(is(NegInf, Var(1)))),       Inf,       If(And(Not(is(NegInf, Var(0))), is(Inf, Var(1))),          Inf,          If(And(is(NegInf, Var(0)), Not(is(Inf, Var(1)))),             NegInf,             If(And(Not(is(Inf, Var(0))), is(NegInf, Var(1))),                NegInf,                add_undef(Var(0), Var(1)))))))), EReal.le: Unfolding(name='EReal.le', decl=EReal.le, args=[x!2555, y!2556], body=If(x!2555 == y!2556,    True,    If(is(NegInf, x!2555),       True,       If(is(Inf, y!2556),          True,          If(is(NegInf, y!2556),             False,             If(is(Inf, x!2555),                False,                If(And(is(Real, x!2555), is(Real, y!2556)),                   val(x!2555) <= val(y!2556),                   unreachable!2554)))))), ax=|= ForAll([x, y],        EReal.le(x, y) ==        If(x == y,           True,           If(is(NegInf, x),              True,              If(is(Inf, y),                 True,                 If(is(NegInf, y),                    False,                    If(is(Inf, x),                       False,                       If(And(is(Real, x), is(Real, y)),                          val(x) <= val(y),                          unreachable!2554))))))), _subst_fun_body=If(Var(0) == Var(1),    True,    If(is(NegInf, Var(0)),       True,       If(is(Inf, Var(1)),          True,          If(is(NegInf, Var(1)),             False,             If(is(Inf, Var(0)),                False,                If(And(is(Real, Var(0)), is(Real, Var(1))),                   val(Var(0)) <= val(Var(1)),                   unreachable!2554))))))), Interval.add: Unfolding(name='Interval.add', decl=Interval.add, args=[i!2852, j!2853], body=Interval(lo(i!2852) + lo(j!2853), hi(i!2852) + hi(j!2853)), ax=|= ForAll([i, j],        Interval.add(i, j) ==        Interval(lo(i) + lo(j), hi(i) + hi(j))), _subst_fun_body=Interval(lo(Var(0)) + lo(Var(1)), hi(Var(0)) + hi(Var(1)))), Interval.mul: Unfolding(name='Interval.mul', decl=Interval.mul, args=[I!2866, J!2867], body=Interval(If(And(hi(I!2866)*hi(J!2867) <=                 lo(I!2866)*lo(J!2867),                 hi(I!2866)*hi(J!2867) <=                 hi(I!2866)*lo(J!2867),                 hi(I!2866)*hi(J!2867) <=                 lo(I!2866)*hi(J!2867)),             hi(I!2866)*hi(J!2867),             If(And(lo(I!2866)*lo(J!2867) <=                    hi(I!2866)*lo(J!2867),                    lo(I!2866)*lo(J!2867) <=                    lo(I!2866)*hi(J!2867)),                lo(I!2866)*lo(J!2867),                If(And(hi(I!2866)*lo(J!2867) <=                       lo(I!2866)*hi(J!2867)),                   hi(I!2866)*lo(J!2867),                   lo(I!2866)*hi(J!2867)))),          If(And(hi(I!2866)*hi(J!2867) >=                 lo(I!2866)*lo(J!2867),                 hi(I!2866)*hi(J!2867) >=                 hi(I!2866)*lo(J!2867),                 hi(I!2866)*hi(J!2867) >=                 lo(I!2866)*hi(J!2867)),             hi(I!2866)*hi(J!2867),             If(And(lo(I!2866)*lo(J!2867) <=                    hi(I!2866)*lo(J!2867),                    lo(I!2866)*lo(J!2867) <=                    lo(I!2866)*hi(J!2867)),                lo(I!2866)*lo(J!2867),                If(And(hi(I!2866)*lo(J!2867) <=                       lo(I!2866)*hi(J!2867)),                   hi(I!2866)*lo(J!2867),                   lo(I!2866)*hi(J!2867))))), ax=|= ForAll([I, J],        Interval.mul(I, J) ==        Interval(If(And(hi(I)*hi(J) <= lo(I)*lo(J),                        hi(I)*hi(J) <= hi(I)*lo(J),                        hi(I)*hi(J) <= lo(I)*hi(J)),                    hi(I)*hi(J),                    If(And(lo(I)*lo(J) <= hi(I)*lo(J),                           lo(I)*lo(J) <= lo(I)*hi(J)),                       lo(I)*lo(J),                       If(And(hi(I)*lo(J) <= lo(I)*hi(J)),                          hi(I)*lo(J),                          lo(I)*hi(J)))),                 If(And(hi(I)*hi(J) >= lo(I)*lo(J),                        hi(I)*hi(J) >= hi(I)*lo(J),                        hi(I)*hi(J) >= lo(I)*hi(J)),                    hi(I)*hi(J),                    If(And(lo(I)*lo(J) <= hi(I)*lo(J),                           lo(I)*lo(J) <= lo(I)*hi(J)),                       lo(I)*lo(J),                       If(And(hi(I)*lo(J) <= lo(I)*hi(J)),                          hi(I)*lo(J),                          lo(I)*hi(J)))))), _subst_fun_body=Interval(If(And(hi(Var(0))*hi(Var(1)) <=                 lo(Var(0))*lo(Var(1)),                 hi(Var(0))*hi(Var(1)) <=                 hi(Var(0))*lo(Var(1)),                 hi(Var(0))*hi(Var(1)) <=                 lo(Var(0))*hi(Var(1))),             hi(Var(0))*hi(Var(1)),             If(And(lo(Var(0))*lo(Var(1)) <=                    hi(Var(0))*lo(Var(1)),                    lo(Var(0))*lo(Var(1)) <=                    lo(Var(0))*hi(Var(1))),                lo(Var(0))*lo(Var(1)),                If(And(hi(Var(0))*lo(Var(1)) <=                       lo(Var(0))*hi(Var(1))),                   hi(Var(0))*lo(Var(1)),                   lo(Var(0))*hi(Var(1))))),          If(And(hi(Var(0))*hi(Var(1)) >=                 lo(Var(0))*lo(Var(1)),                 hi(Var(0))*hi(Var(1)) >=                 hi(Var(0))*lo(Var(1)),                 hi(Var(0))*hi(Var(1)) >=                 lo(Var(0))*hi(Var(1))),             hi(Var(0))*hi(Var(1)),             If(And(lo(Var(0))*lo(Var(1)) <=                    hi(Var(0))*lo(Var(1)),                    lo(Var(0))*lo(Var(1)) <=                    lo(Var(0))*hi(Var(1))),                lo(Var(0))*lo(Var(1)),                If(And(hi(Var(0))*lo(Var(1)) <=                       lo(Var(0))*hi(Var(1))),                   hi(Var(0))*lo(Var(1)),                   lo(Var(0))*hi(Var(1))))))), Interval.setof: Unfolding(name='Interval.setof', decl=Interval.setof, args=[i!2836], body=Lambda(x, And(lo(i!2836) <= x, x <= hi(i!2836))), ax=|= ForAll(i,        Interval.setof(i) ==        (Lambda(x, And(lo(i) <= x, x <= hi(i))))), _subst_fun_body=Lambda(x, And(lo(Var(1)) <= x, x <= hi(Var(1))))), Interval.sub: Unfolding(name='Interval.sub', decl=Interval.sub, args=[i!2859, j!2860], body=Interval(lo(i!2859) - hi(j!2860), hi(i!2859) - lo(j!2860)), ax=|= ForAll([i, j],        Interval.sub(i, j) ==        Interval(lo(i) - hi(j), hi(i) - lo(j))), _subst_fun_body=Interval(lo(Var(0)) - hi(Var(1)), hi(Var(0)) - lo(Var(1)))), KnownBits_1.and_: Unfolding(name='KnownBits_1.and_', decl=KnownBits_1.and_, args=[x!3786, y!3787], body=KnownBits_1(ones(x!3786) & ones(y!3787),             ~(~unknowns(x!3786) & ~ones(x!3786) |               ~unknowns(y!3787) & ~ones(y!3787) |               ones(x!3786) & ones(y!3787))), ax=|= ForAll([x, y],        KnownBits_1.and_(x, y) ==        KnownBits_1(ones(x) & ones(y),                    ~(~unknowns(x) & ~ones(x) |                      ~unknowns(y) & ~ones(y) |                      ones(x) & ones(y)))), _subst_fun_body=KnownBits_1(ones(Var(0)) & ones(Var(1)),             ~(~unknowns(Var(0)) & ~ones(Var(0)) |               ~unknowns(Var(1)) & ~ones(Var(1)) |               ones(Var(0)) & ones(Var(1))))), KnownBits_1.const: Unfolding(name='KnownBits_1.const', decl=KnownBits_1.const, args=[a!3753], body=KnownBits_1(a!3753, 0), ax=|= ForAll(a, KnownBits_1.const(a) == KnownBits_1(a, 0)), _subst_fun_body=KnownBits_1(Var(0), 0)), KnownBits_1.invert: Unfolding(name='KnownBits_1.invert', decl=KnownBits_1.invert, args=[x!3777], body=KnownBits_1(~unknowns(x!3777) & ~ones(x!3777),             unknowns(x!3777)), ax=|= ForAll(x,        KnownBits_1.invert(x) ==        KnownBits_1(~unknowns(x) & ~ones(x), unknowns(x))), _subst_fun_body=KnownBits_1(~unknowns(Var(0)) & ~ones(Var(0)),             unknowns(Var(0)))), KnownBits_1.is_const: Unfolding(name='KnownBits_1.is_const', decl=KnownBits_1.is_const, args=[x!3754], body=unknowns(x!3754) == 0, ax=|= ForAll(x, KnownBits_1.is_const(x) == (unknowns(x) == 0)), _subst_fun_body=unknowns(Var(0)) == 0), KnownBits_1.or_: Unfolding(name='KnownBits_1.or_', decl=KnownBits_1.or_, args=[x!3804, y!3805], body=KnownBits_1(ones(x!3804) | ones(y!3805),             ~(ones(x!3804) |               ones(y!3805) |               ~unknowns(x!3804) &               ~ones(x!3804) &               ~unknowns(y!3805) &               ~ones(y!3805))), ax=|= ForAll([x, y],        KnownBits_1.or_(x, y) ==        KnownBits_1(ones(x) | ones(y),                    ~(ones(x) |                      ones(y) |                      ~unknowns(x) &                      ~ones(x) &                      ~unknowns(y) &                      ~ones(y)))), _subst_fun_body=KnownBits_1(ones(Var(0)) | ones(Var(1)),             ~(ones(Var(0)) |               ones(Var(1)) |               ~unknowns(Var(0)) &               ~ones(Var(0)) &               ~unknowns(Var(1)) &               ~ones(Var(1))))), KnownBits_1.setof: Unfolding(name='KnownBits_1.setof', decl=KnownBits_1.setof, args=[x!3751], body=Lambda(a, ~unknowns(x!3751) & a == ones(x!3751)), ax=|= ForAll(x,        KnownBits_1.setof(x) ==        (Lambda(a, ~unknowns(x) & a == ones(x)))), _subst_fun_body=Lambda(a, ~unknowns(Var(1)) & a == ones(Var(1)))), KnownBits_1.wf: Unfolding(name='KnownBits_1.wf', decl=KnownBits_1.wf, args=[x!3752], body=ones(x!3752) & unknowns(x!3752) == 0, ax=|= ForAll(x, KnownBits_1.wf(x) == (ones(x) & unknowns(x) == 0)), _subst_fun_body=ones(Var(0)) & unknowns(Var(0)) == 0), KnownBits_1.zeros: Unfolding(name='KnownBits_1.zeros', decl=KnownBits_1.zeros, args=[x!3776], body=~unknowns(x!3776) & ~ones(x!3776), ax=|= ForAll(x, KnownBits_1.zeros(x) == ~unknowns(x) & ~ones(x)), _subst_fun_body=~unknowns(Var(0)) & ~ones(Var(0))), NDArray.add: Unfolding(name='NDArray.add', decl=NDArray.add, args=[u!2925, v!2926], body=If(shape(u!2925) == shape(v!2926),    NDArray(shape(u!2925),            Lambda(k, data(u!2925)[k] + data(v!2926)[k])),    add_undef(u!2925, v!2926)), ax=|= ForAll([u, v],        NDArray.add(u, v) ==        If(shape(u) == shape(v),           NDArray(shape(u),                   Lambda(k, data(u)[k] + data(v)[k])),           add_undef(u, v))), _subst_fun_body=If(shape(Var(0)) == shape(Var(1)),    NDArray(shape(Var(0)),            Lambda(k, data(Var(1))[k] + data(Var(2))[k])),    add_undef(Var(0), Var(1)))), Nat.add: Unfolding(name='Nat.add', decl=Nat.add, args=[x!484, y!485], body=If(is(Z, x!484), y!485, S(Nat.add(pred(x!484), y!485))), ax=|= ForAll([x, y],        Nat.add(x, y) ==        If(is(Z, x), y, S(Nat.add(pred(x), y)))), _subst_fun_body=If(is(Z, Var(0)), Var(1), S(Nat.add(pred(Var(0)), Var(1))))), PosEReal0.add: Unfolding(name='PosEReal0.add', decl=PosEReal0.add, args=[x!2868, y!2869], body=If(Or(is(Inf, x!2868), is(Inf, y!2869)),    Inf,    Fin(fin(x!2868) + fin(y!2869))), ax=|= ForAll([x, y],        PosEReal0.add(x, y) ==        If(Or(is(Inf, x), is(Inf, y)),           Inf,           Fin(fin(x) + fin(y)))), _subst_fun_body=If(Or(is(Inf, Var(0)), is(Inf, Var(1))),    Inf,    Fin(fin(Var(0)) + fin(Var(1))))), PosEReal0.le: Unfolding(name='PosEReal0.le', decl=PosEReal0.le, args=[x!2880, y!2881], body=If(is(Inf, y!2881),    True,    If(is(Inf, x!2880), False, fin(x!2880) <= fin(y!2881))), ax=|= ForAll([x, y],        PosEReal0.le(x, y) ==        If(is(Inf, y),           True,           If(is(Inf, x), False, fin(x) <= fin(y)))), _subst_fun_body=If(is(Inf, Var(1)),    True,    If(is(Inf, Var(0)), False, fin(Var(0)) <= fin(Var(1))))), PosEReal0.mul: Unfolding(name='PosEReal0.mul', decl=PosEReal0.mul, args=[x!2890, y!2891], body=If(Or(is(Inf, x!2890), is(Inf, y!2891)),    Inf,    Fin(fin(x!2890)*fin(y!2891))), ax=|= ForAll([x, y],        PosEReal0.mul(x, y) ==        If(Or(is(Inf, x), is(Inf, y)),           Inf,           Fin(fin(x)*fin(y)))), _subst_fun_body=If(Or(is(Inf, Var(0)), is(Inf, Var(1))),    Inf,    Fin(fin(Var(0))*fin(Var(1))))), R.add: Unfolding(name='R.add', decl=R.add, args=[x!522, y!523], body=x!522 + y!523, ax=|= ForAll([x, y], R.add(x, y) == x + y), _subst_fun_body=Var(0) + Var(1)), R.dist: Unfolding(name='R.dist', decl=R.dist, args=[x!2489, y!2490], body=absR(x!2489 - y!2490), ax=|= ForAll([x!2468, y!2469],        R.dist(x!2468, y!2469) == absR(x!2468 - y!2469)), _subst_fun_body=absR(Var(0) - Var(1))), R.max: Unfolding(name='R.max', decl=R.max, args=[x!612, y!613], body=If(x!612 >= y!613, x!612, y!613), ax=|= ForAll([x, y], R.max(x, y) == If(x >= y, x, y)), _subst_fun_body=If(Var(0) >= Var(1), Var(0), Var(1))), R.sqr: Unfolding(name='R.sqr', decl=R.sqr, args=[x!699], body=x!699*x!699, ax=|= ForAll(x, R.sqr(x) == x*x), _subst_fun_body=Var(0)*Var(0)), R.zero: Unfolding(name='R.zero', decl=R.zero, args=[], body=0, ax=|= R.zero == 0, _subst_fun_body=0), RFun.const: Unfolding(name='RFun.const', decl=RFun.const, args=[x!759], body=K(Real, x!759), ax=|= ForAll(x, RFun.const(x) == K(Real, x)), _subst_fun_body=K(Real, Var(0))), RFun.ident: Unfolding(name='RFun.ident', decl=RFun.ident, args=[], body=Lambda(x, x), ax=|= RFun.ident == (Lambda(x, x)), _subst_fun_body=Lambda(x, x)), RFun.smul: Unfolding(name='RFun.smul', decl=RFun.smul, args=[c!2639, f!2640], body=Lambda(x, mul(c!2639, f!2640[x])), ax=|= ForAll([c, f], RFun.smul(c, f) == (Lambda(x, mul(c, f[x])))), _subst_fun_body=Lambda(x, mul(Var(1), Var(2)[x]))), RSeq.const: Unfolding(name='RSeq.const', decl=RSeq.const, args=[x!1337], body=Lambda(i, x!1337), ax=|= ForAll(x, RSeq.const(x) == (Lambda(i, x))), _subst_fun_body=Lambda(i, Var(1))), RSeq.id: Unfolding(name='RSeq.id', decl=RSeq.id, args=[], body=Lambda(i, ToReal(i)), ax=|= RSeq.id == (Lambda(i, ToReal(i))), _subst_fun_body=Lambda(i, ToReal(i))), RSeq.range_nonneg: Unfolding(name='RSeq.range_nonneg', decl=RSeq.range_nonneg, args=[a!1590], body=Lambda(x, Exists(n, And(n >= 0, a!1590[n] == x))), ax=|= ForAll(a,        RSeq.range_nonneg(a) ==        (Lambda(x, Exists(n, And(n >= 0, a[n] == x))))), _subst_fun_body=Lambda(x, Exists(n, And(n >= 0, Var(2)[n] == x)))), RSeq.rev: Unfolding(name='RSeq.rev', decl=RSeq.rev, args=[a!1345], body=Lambda(i, a!1345[-i]), ax=|= ForAll(a, RSeq.rev(a) == (Lambda(i, a[-i]))), _subst_fun_body=Lambda(i, Var(1)[-i])), RSeq.shift: Unfolding(name='RSeq.shift', decl=RSeq.shift, args=[a!1342, n!1343], body=Lambda(i, a!1342[i - n!1343]), ax=|= ForAll([a, n], RSeq.shift(a, n) == (Lambda(i, a[i - n]))), _subst_fun_body=Lambda(i, Var(1)[i - Var(2)])), RSeq.smul: Unfolding(name='RSeq.smul', decl=RSeq.smul, args=[x!1381, a!1382], body=Lambda(n, x!1381*a!1382[n]), ax=|= ForAll([x, a], RSeq.smul(x, a) == (Lambda(n, x*a[n]))), _subst_fun_body=Lambda(n, Var(1)*Var(2)[n])), RSeq.zero: Unfolding(name='RSeq.zero', decl=RSeq.zero, args=[], body=K(Int, 0), ax=|= RSeq.zero == K(Int, 0), _subst_fun_body=K(Int, 0)), RSet.ball: Unfolding(name='RSet.ball', decl=RSet.ball, args=[x!782, r!783], body=Lambda(y, And(x!782 - r!783 < y, y < x!782 + r!783)), ax=|= ForAll([x, r],        RSet.ball(x, r) ==        (Lambda(y, And(x - r < y, y < x + r)))), _subst_fun_body=Lambda(y, And(Var(1) - Var(2) < y, y < Var(1) + Var(2)))), RSet.bdd_above: Unfolding(name='RSet.bdd_above', decl=RSet.bdd_above, args=[A!800], body=Exists(u, RSet.is_ub(A!800, u)), ax=|= ForAll(A,        RSet.bdd_above(A) == (Exists(u, RSet.is_ub(A, u)))), _subst_fun_body=Exists(u, RSet.is_ub(Var(1), u))), RSet.bdd_below: Unfolding(name='RSet.bdd_below', decl=RSet.bdd_below, args=[A!801], body=Exists(u, RSet.is_lb(A!801, u)), ax=|= ForAll(A,        RSet.bdd_below(A) == (Exists(u, RSet.is_lb(A, u)))), _subst_fun_body=Exists(u, RSet.is_lb(Var(1), u))), RSet.closure: Unfolding(name='RSet.closure', decl=RSet.closure, args=[A!793], body=Lambda(x,        ForAll(eps,               Implies(eps > 0,                       Exists(y,                              And(A!793[y],                                  RSet.ball(x, eps)[y]))))), ax=|= ForAll(A,        RSet.closure(A) ==        (Lambda(x,                ForAll(eps,                       Implies(eps > 0,                               Exists(y,                                      And(A[y],                                         RSet.ball(x, eps)[y]))))))), _subst_fun_body=Lambda(x,        ForAll(eps,               Implies(eps > 0,                       Exists(y,                              And(Var(3)[y],                                  RSet.ball(x, eps)[y])))))), RSet.icc: Unfolding(name='RSet.icc', decl=RSet.icc, args=[a!778, b!779], body=Lambda(x, And(a!778 <= x, x <= b!779)), ax=|= ForAll([a, b],        RSet.icc(a, b) == (Lambda(x, And(a <= x, x <= b)))), _subst_fun_body=Lambda(x, And(Var(1) <= x, x <= Var(2)))), RSet.iinter: Unfolding(name='RSet.iinter', decl=RSet.iinter, args=[F!785], body=Lambda(x, ForAll(i, Implies(i >= 0, F!785[i][x]))), ax=|= ForAll(F,        RSet.iinter(F) ==        (Lambda(x, ForAll(i, Implies(i >= 0, F[i][x]))))), _subst_fun_body=Lambda(x, ForAll(i, Implies(i >= 0, Var(2)[i][x])))), RSet.interior: Unfolding(name='RSet.interior', decl=RSet.interior, args=[A!792], body=Lambda(x,        Exists(eps!791,               And(eps!791 > 0,                   subset(RSet.ball(x, eps!791), A!792)))), ax=|= ForAll(A,        RSet.interior(A) ==        (Lambda(x,                Exists(eps!791,                       And(eps!791 > 0,                           subset(RSet.ball(x, eps!791), A)))))), _subst_fun_body=Lambda(x,        Exists(eps!791,               And(eps!791 > 0,                   subset(RSet.ball(x, eps!791), Var(2)))))), RSet.ioo: Unfolding(name='RSet.ioo', decl=RSet.ioo, args=[a!780, b!781], body=Lambda(x, And(a!780 < x, x < b!781)), ax=|= ForAll([a, b],        RSet.ioo(a, b) == (Lambda(x, And(a < x, x < b)))), _subst_fun_body=Lambda(x, And(Var(1) < x, x < Var(2)))), RSet.is_closed: Unfolding(name='RSet.is_closed', decl=RSet.is_closed, args=[A!790], body=RSet.is_open(complement(A!790)), ax=|= ForAll(A, RSet.is_closed(A) == RSet.is_open(complement(A))), _subst_fun_body=RSet.is_open(complement(Var(0)))), RSet.is_glb: Unfolding(name='RSet.is_glb', decl=RSet.is_glb, args=[A!804, u!805], body=And(RSet.is_lb(A!804, u!805),     ForAll(v, Implies(RSet.is_lb(A!804, v), v <= u!805))), ax=|= ForAll([A, u],        RSet.is_glb(A, u) ==        And(RSet.is_lb(A, u),            ForAll(v, Implies(RSet.is_lb(A, v), v <= u)))), _subst_fun_body=And(RSet.is_lb(Var(0), Var(1)),     ForAll(v, Implies(RSet.is_lb(Var(1), v), v <= Var(2))))), RSet.is_lb: Unfolding(name='RSet.is_lb', decl=RSet.is_lb, args=[A!796, u!797], body=ForAll(x, Implies(A!796[x], u!797 <= x)), ax=|= ForAll([A, u],        RSet.is_lb(A, u) ==        (ForAll(x, Implies(A[x], u <= x)))), _subst_fun_body=ForAll(x, Implies(Var(1)[x], Var(2) <= x))), RSet.is_lub: Unfolding(name='RSet.is_lub', decl=RSet.is_lub, args=[A!802, u!803], body=And(RSet.is_ub(A!802, u!803),     ForAll(v, Implies(RSet.is_ub(A!802, v), u!803 <= v))), ax=|= ForAll([A, u],        RSet.is_lub(A, u) ==        And(RSet.is_ub(A, u),            ForAll(v, Implies(RSet.is_ub(A, v), u <= v)))), _subst_fun_body=And(RSet.is_ub(Var(0), Var(1)),     ForAll(v, Implies(RSet.is_ub(Var(1), v), Var(2) <= v)))), RSet.is_open: Unfolding(name='RSet.is_open', decl=RSet.is_open, args=[A!789], body=ForAll(x,        Implies(A!789[x],                Exists(eps!788,                       And(eps!788 > 0,                           subset(RSet.ball(x, eps!788),                                  A!789))))), ax=|= ForAll(A,        RSet.is_open(A) ==        (ForAll(x,                Implies(A[x],                        Exists(eps!788,                               And(eps!788 > 0,                                   subset(RSet.ball(x,                                         eps!788),                                         A))))))), _subst_fun_body=ForAll(x,        Implies(Var(1)[x],                Exists(eps!788,                       And(eps!788 > 0,                           subset(RSet.ball(x, eps!788),                                  Var(2))))))), RSet.is_ub: Unfolding(name='RSet.is_ub', decl=RSet.is_ub, args=[A!794, u!795], body=ForAll(x, Implies(A!794[x], x <= u!795)), ax=|= ForAll([A, u],        RSet.is_ub(A, u) ==        (ForAll(x, Implies(A[x], x <= u)))), _subst_fun_body=ForAll(x, Implies(Var(1)[x], x <= Var(2)))), RSet.iunion: Unfolding(name='RSet.iunion', decl=RSet.iunion, args=[F!784], body=Lambda(x, Exists(i, And(i >= 0, F!784[i][x]))), ax=|= ForAll(F,        RSet.iunion(F) ==        (Lambda(x, Exists(i, And(i >= 0, F[i][x]))))), _subst_fun_body=Lambda(x, Exists(i, And(i >= 0, Var(2)[i][x])))), RSet.lower_bounds: Unfolding(name='RSet.lower_bounds', decl=RSet.lower_bounds, args=[A!799], body=Lambda(u, RSet.is_lb(A!799, u)), ax=|= ForAll(A,        RSet.lower_bounds(A) == (Lambda(u, RSet.is_lb(A, u)))), _subst_fun_body=Lambda(u, RSet.is_lb(Var(1), u))), RSet.sing: Unfolding(name='RSet.sing', decl=RSet.sing, args=[c!1151], body=Lambda(x, x == c!1151), ax=|= ForAll(c, RSet.sing(c) == (Lambda(x, x == c))), _subst_fun_body=Lambda(x, x == Var(1))), RSet.sinter: Unfolding(name='RSet.sinter', decl=RSet.sinter, args=[C!787], body=Lambda(x, ForAll(A, Implies(C!787[A], A[x]))), ax=|= ForAll(C,        RSet.sinter(C) ==        (Lambda(x, ForAll(A, Implies(C[A], A[x]))))), _subst_fun_body=Lambda(x, ForAll(A, Implies(Var(2)[A], A[x])))), RSet.sunion: Unfolding(name='RSet.sunion', decl=RSet.sunion, args=[C!786], body=Lambda(x, Exists(A, And(C!786[A], A[x]))), ax=|= ForAll(C,        RSet.sunion(C) ==        (Lambda(x, Exists(A, And(C[A], A[x]))))), _subst_fun_body=Lambda(x, Exists(A, And(Var(2)[A], A[x])))), RSet.upper_bounds: Unfolding(name='RSet.upper_bounds', decl=RSet.upper_bounds, args=[A!798], body=Lambda(u, RSet.is_ub(A!798, u)), ax=|= ForAll(A,        RSet.upper_bounds(A) == (Lambda(u, RSet.is_ub(A, u)))), _subst_fun_body=Lambda(u, RSet.is_ub(Var(1), u))), Real.sqrt: Unfolding(name='Real.sqrt', decl=Real.sqrt, args=[x!702], body=x!702**(1/2), ax=|= ForAll(x, Real.sqrt(x) == x**(1/2)), _subst_fun_body=Var(0)**(1/2)), T_Int.add: Unfolding(name='T_Int.add', decl=T_Int.add, args=[x!2405, y!2406], body=T_Int(Lambda(t, val(x!2405)[t] + val(y!2406)[t])), ax=|= ForAll([x, y],        T_Int.add(x, y) ==        T_Int(Lambda(t, val(x)[t] + val(y)[t]))), _subst_fun_body=T_Int(Lambda(t, val(Var(1))[t] + val(Var(2))[t]))), T_Int.ge: Unfolding(name='T_Int.ge', decl=T_Int.ge, args=[x!2409, y!2410], body=T_Bool(Lambda(t, val(x!2409)[t] >= val(y!2410)[t])), ax=|= ForAll([x, y],        T_Int.ge(x, y) ==        T_Bool(Lambda(t, val(x)[t] >= val(y)[t]))), _subst_fun_body=T_Bool(Lambda(t, val(Var(1))[t] >= val(Var(2))[t]))), T_Int.le: Unfolding(name='T_Int.le', decl=T_Int.le, args=[x!2411, y!2412], body=T_Bool(Lambda(t, val(x!2411)[t] <= val(y!2412)[t])), ax=|= ForAll([x, y],        T_Int.le(x, y) ==        T_Bool(Lambda(t, val(x)[t] <= val(y)[t]))), _subst_fun_body=T_Bool(Lambda(t, val(Var(1))[t] <= val(Var(2))[t]))), T_Real.add: Unfolding(name='T_Real.add', decl=T_Real.add, args=[x!2407, y!2408], body=T_Real(Lambda(t, val(x!2407)[t] + val(y!2408)[t])), ax=|= ForAll([x, y],        T_Real.add(x, y) ==        T_Real(Lambda(t, val(x)[t] + val(y)[t]))), _subst_fun_body=T_Real(Lambda(t, val(Var(1))[t] + val(Var(2))[t]))), Vec2.add: Unfolding(name='Vec2.add', decl=Vec2.add, args=[u!2671, v!2672], body=Vec2(x(u!2671) + x(v!2672), y(u!2671) + y(v!2672)), ax=|= ForAll([u, v],        Vec2.add(u, v) == Vec2(x(u) + x(v), y(u) + y(v))), _subst_fun_body=Vec2(x(Var(0)) + x(Var(1)), y(Var(0)) + y(Var(1)))), Vec2.cross: Unfolding(name='Vec2.cross', decl=Vec2.cross, args=[u!2688, v!2689], body=x(u!2688)*y(v!2689) - y(u!2688)*x(v!2689), ax=|= ForAll([u, v], Vec2.cross(u, v) == x(u)*y(v) - y(u)*x(v)), _subst_fun_body=x(Var(0))*y(Var(1)) - y(Var(0))*x(Var(1))), Vec2.dist: Unfolding(name='Vec2.dist', decl=Vec2.dist, args=[u!2686, v!2687], body=Real.sqrt(Vec2.norm2(Vec2.sub(u!2686, v!2687))), ax=|= ForAll([u, v],        Vec2.dist(u, v) ==        Real.sqrt(Vec2.norm2(Vec2.sub(u, v)))), _subst_fun_body=Real.sqrt(Vec2.norm2(Vec2.sub(Var(0), Var(1))))), Vec2.dot: Unfolding(name='Vec2.dot', decl=Vec2.dot, args=[u!2678, v!2679], body=x(u!2678)*x(v!2679) + y(u!2678)*y(v!2679), ax=|= ForAll([u, v], Vec2.dot(u, v) == x(u)*x(v) + y(u)*y(v)), _subst_fun_body=x(Var(0))*x(Var(1)) + y(Var(0))*y(Var(1))), Vec2.neg: Unfolding(name='Vec2.neg', decl=Vec2.neg, args=[u!2675], body=Vec2(-x(u!2675), -y(u!2675)), ax=|= ForAll(u, Vec2.neg(u) == Vec2(-x(u), -y(u))), _subst_fun_body=Vec2(-x(Var(0)), -y(Var(0)))), Vec2.norm: Unfolding(name='Vec2.norm', decl=Vec2.norm, args=[u!2681], body=Real.sqrt(Vec2.dot(u!2681, u!2681)), ax=|= ForAll(u, Vec2.norm(u) == Real.sqrt(Vec2.dot(u, u))), _subst_fun_body=Real.sqrt(Vec2.dot(Var(0), Var(0)))), Vec2.norm2: Unfolding(name='Vec2.norm2', decl=Vec2.norm2, args=[u!2680], body=Vec2.dot(u!2680, u!2680), ax=|= ForAll(u, Vec2.norm2(u) == Vec2.dot(u, u)), _subst_fun_body=Vec2.dot(Var(0), Var(0))), Vec2.smul: Unfolding(name='Vec2.smul', decl=Vec2.smul, args=[r!2676, u!2677], body=Vec2(r!2676*x(u!2677), r!2676*y(u!2677)), ax=|= ForAll([r, u], Vec2.smul(r, u) == Vec2(r*x(u), r*y(u))), _subst_fun_body=Vec2(Var(0)*x(Var(1)), Var(0)*y(Var(1)))), Vec2.sub: Unfolding(name='Vec2.sub', decl=Vec2.sub, args=[u!2673, v!2674], body=Vec2(x(u!2673) - x(v!2674), y(u!2673) - y(v!2674)), ax=|= ForAll([u, v],        Vec2.sub(u, v) == Vec2(x(u) - x(v), y(u) - y(v))), _subst_fun_body=Vec2(x(Var(0)) - x(Var(1)), y(Var(0)) - y(Var(1)))), Vec3.add: Unfolding(name='Vec3.add', decl=Vec3.add, args=[u!2932, v!2933], body=Vec3(x(u!2932) + x(v!2933),      y(u!2932) + y(v!2933),      z(u!2932) + z(v!2933)), ax=|= ForAll([u, v],        Vec3.add(u, v) ==        Vec3(x(u) + x(v), y(u) + y(v), z(u) + z(v))), _subst_fun_body=Vec3(x(Var(0)) + x(Var(1)),      y(Var(0)) + y(Var(1)),      z(Var(0)) + z(Var(1)))), Vec3.dist: Unfolding(name='Vec3.dist', decl=Vec3.dist, args=[u!2967, v!2968], body=Real.sqrt(Vec3.norm2(Vec3.sub(u!2967, v!2968))), ax=|= ForAll([u, v],        Vec3.dist(u, v) ==        Real.sqrt(Vec3.norm2(Vec3.sub(u, v)))), _subst_fun_body=Real.sqrt(Vec3.norm2(Vec3.sub(Var(0), Var(1))))), Vec3.dot: Unfolding(name='Vec3.dot', decl=Vec3.dot, args=[u!2949, v!2950], body=x(u!2949)*x(v!2950) + y(u!2949)*y(v!2950) + z(u!2949)*z(v!2950), ax=|= ForAll([u, v],        Vec3.dot(u, v) == x(u)*x(v) + y(u)*y(v) + z(u)*z(v)), _subst_fun_body=x(Var(0))*x(Var(1)) + y(Var(0))*y(Var(1)) + z(Var(0))*z(Var(1))), Vec3.neg: Unfolding(name='Vec3.neg', decl=Vec3.neg, args=[u!2938], body=Vec3(-x(u!2938), -y(u!2938), -z(u!2938)), ax=|= ForAll(u, Vec3.neg(u) == Vec3(-x(u), -y(u), -z(u))), _subst_fun_body=Vec3(-x(Var(0)), -y(Var(0)), -z(Var(0)))), Vec3.norm: Unfolding(name='Vec3.norm', decl=Vec3.norm, args=[u!2962], body=Real.sqrt(Vec3.norm2(u!2962)), ax=|= ForAll(u, Vec3.norm(u) == Real.sqrt(Vec3.norm2(u))), _subst_fun_body=Real.sqrt(Vec3.norm2(Var(0)))), Vec3.norm2: Unfolding(name='Vec3.norm2', decl=Vec3.norm2, args=[u!2958], body=Vec3.dot(u!2958, u!2958), ax=|= ForAll(u, Vec3.norm2(u) == Vec3.dot(u, u)), _subst_fun_body=Vec3.dot(Var(0), Var(0))), Vec3.smul: Unfolding(name='Vec3.smul', decl=Vec3.smul, args=[a!2939, u!2940], body=Vec3(a!2939*x(u!2940), a!2939*y(u!2940), a!2939*z(u!2940)), ax=|= ForAll([a, u],        Vec3.smul(a, u) == Vec3(a*x(u), a*y(u), a*z(u))), _subst_fun_body=Vec3(Var(0)*x(Var(1)), Var(0)*y(Var(1)), Var(0)*z(Var(1)))), Vec3.sub: Unfolding(name='Vec3.sub', decl=Vec3.sub, args=[u!2936, v!2937], body=Vec3(x(u!2936) - x(v!2937),      y(u!2936) - y(v!2937),      z(u!2936) - z(v!2937)), ax=|= ForAll([u, v],        Vec3.sub(u, v) ==        Vec3(x(u) - x(v), y(u) - y(v), z(u) - z(v))), _subst_fun_body=Vec3(x(Var(0)) - x(Var(1)),      y(Var(0)) - y(Var(1)),      z(Var(0)) - z(Var(1)))), ZF.elts: Unfolding(name='ZF.elts', decl=ZF.elts, args=[A!2998], body=Lambda(x, ∈(x, A!2998)), ax=|= ForAll(A, ZF.elts(A) == (Lambda(x, ∈(x, A)))), _subst_fun_body=Lambda(x, ∈(x, Var(1)))), ZF.sing: Unfolding(name='ZF.sing', decl=ZF.sing, args=[x!3067], body=upair(x!3067, x!3067), ax=|= ForAll(x, ZF.sing(x) == upair(x, x)), _subst_fun_body=upair(Var(0), Var(0))), ZFSet.le: Unfolding(name='ZFSet.le', decl=ZFSet.le, args=[A!3003, B!3004], body=ForAll(x, Implies(∈(x, A!3003), ∈(x, B!3004))), ax=|= ForAll([A, B],        ZFSet.le(A, B) ==        (ForAll(x, Implies(∈(x, A), ∈(x, B))))), _subst_fun_body=ForAll(x, Implies(∈(x, Var(1)), ∈(x, Var(2))))), ZFSet.sub: Unfolding(name='ZFSet.sub', decl=ZFSet.sub, args=[A!3344, B!3345], body=sep(A!3344, Lambda(x, Not(∈(x, B!3345)))), ax=|= ForAll([A, B],        ZFSet.sub(A, B) == sep(A, Lambda(x, Not(∈(x, B))))), _subst_fun_body=sep(Var(0), Lambda(x, Not(∈(x, Var(2)))))), ZSet.finite: Unfolding(name='ZSet.finite', decl=ZSet.finite, args=[A!428], body=And(ZSet.is_ub(A!428), ZSet.is_lb(A!428)), ax=|= ForAll(A,        ZSet.finite(A) == And(ZSet.is_ub(A), ZSet.is_lb(A))), _subst_fun_body=And(ZSet.is_ub(Var(0)), ZSet.is_lb(Var(0)))), ZSet.has_lb: Unfolding(name='ZSet.has_lb', decl=ZSet.has_lb, args=[A!425, y!426], body=ForAll(x, Implies(A!425[x], y!426 <= x)), ax=|= ForAll([A, y],        ZSet.has_lb(A, y) ==        (ForAll(x, Implies(A[x], y <= x)))), _subst_fun_body=ForAll(x, Implies(Var(1)[x], Var(2) <= x))), ZSet.has_ub: Unfolding(name='ZSet.has_ub', decl=ZSet.has_ub, args=[A!422, y!423], body=ForAll(x, Implies(A!422[x], x <= y!423)), ax=|= ForAll([A, y],        ZSet.has_ub(A, y) ==        (ForAll(x, Implies(A[x], x <= y)))), _subst_fun_body=ForAll(x, Implies(Var(1)[x], x <= Var(2)))), ZSet.is_lb: Unfolding(name='ZSet.is_lb', decl=ZSet.is_lb, args=[A!427], body=Exists(x, ZSet.has_lb(A!427, x)), ax=|= ForAll(A, ZSet.is_lb(A) == (Exists(x, ZSet.has_lb(A, x)))), _subst_fun_body=Exists(x, ZSet.has_lb(Var(1), x))), ZSet.is_ub: Unfolding(name='ZSet.is_ub', decl=ZSet.is_ub, args=[A!424], body=Exists(x, ZSet.has_ub(A!424, x)), ax=|= ForAll(A, ZSet.is_ub(A) == (Exists(x, ZSet.has_ub(A, x)))), _subst_fun_body=Exists(x, ZSet.has_ub(Var(1), x))), abelian: Unfolding(name='abelian', decl=abelian, args=[], body=ForAll([x!2000, y!2001],        mul(x!2000, y!2001) == mul(y!2001, x!2000)), ax=|= abelian == (ForAll([x!2000, y!2001],         mul(x!2000, y!2001) == mul(y!2001, x!2000))), _subst_fun_body=ForAll([x!2000, y!2001],        mul(x!2000, y!2001) == mul(y!2001, x!2000))), absR: Unfolding(name='absR', decl=absR, args=[x!545], body=If(x!545 >= 0, x!545, -x!545), ax=|= ForAll(x, absR(x) == If(x >= 0, x, -x)), _subst_fun_body=If(Var(0) >= 0, Var(0), -Var(0))), add_defined: Unfolding(name='add_defined', decl=add_defined, args=[x!2567, y!2568], body=Or(And(is(Real, x!2567), is(Real, y!2568)),    And(is(Inf, x!2567), Not(is(NegInf, y!2568))),    And(Not(is(NegInf, x!2567)), is(Inf, y!2568)),    And(is(NegInf, x!2567), Not(is(Inf, y!2568))),    And(Not(is(Inf, x!2567)), is(NegInf, y!2568))), ax=|= ForAll([x, y],        add_defined(x, y) ==        Or(And(is(Real, x), is(Real, y)),           And(is(Inf, x), Not(is(NegInf, y))),           And(Not(is(NegInf, x)), is(Inf, y)),           And(is(NegInf, x), Not(is(Inf, y))),           And(Not(is(Inf, x)), is(NegInf, y)))), _subst_fun_body=Or(And(is(Real, Var(0)), is(Real, Var(1))),    And(is(Inf, Var(0)), Not(is(NegInf, Var(1)))),    And(Not(is(NegInf, Var(0))), is(Inf, Var(1))),    And(is(NegInf, Var(0)), Not(is(Inf, Var(1)))),    And(Not(is(Inf, Var(0))), is(NegInf, Var(1))))), aeq: Unfolding(name='aeq', decl=aeq, args=[x!588, y!589, eps!590], body=If(x!588 - y!589 > 0, x!588 - y!589, -(x!588 - y!589)) <= eps!590, ax=|= ForAll([x, y, eps],        aeq(x, y, eps) ==        (If(x - y > 0, x - y, -(x - y)) <= eps)), _subst_fun_body=If(Var(0) - Var(1) > 0, Var(0) - Var(1), -(Var(0) - Var(1))) <= Var(2)), always: Unfolding(name='always', decl=always, args=[p!2429], body=T_Bool(Lambda(t!2427,               ForAll(dt!2428,                      Implies(dt!2428 >= 0,                              val(p!2429)[t!2427 + dt!2428])))), ax=|= ForAll(p,        always(p) ==        T_Bool(Lambda(t!2427,                      ForAll(dt!2428,                             Implies(dt!2428 >= 0,                                     val(p)[t!2427 + dt!2428]))))), _subst_fun_body=T_Bool(Lambda(t!2427,               ForAll(dt!2428,                      Implies(dt!2428 >= 0,                              val(Var(2))[t!2427 + dt!2428]))))), analysis.sin_series: Unfolding(name='analysis.sin_series', decl=analysis.sin_series, args=[x!4841], body=f!4840(x!4841), ax=|= ForAll(x, analysis.sin_series(x) == f!4840(x)), _subst_fun_body=f!4840(Var(0))), analysis.sin_terms: Unfolding(name='analysis.sin_terms', decl=analysis.sin_terms, args=[x!4817], body=Lambda(n,        (pownat(-1, n)*pownat(x!4817, 2*n + 1))/        ToReal(fact(2*n + 1))), ax=|= ForAll(x,        analysis.sin_terms(x) ==        (Lambda(n,                (pownat(-1, n)*pownat(x, 2*n + 1))/                ToReal(fact(2*n + 1))))), _subst_fun_body=Lambda(n,        (pownat(-1, n)*pownat(Var(1), 2*n + 1))/        ToReal(fact(2*n + 1)))), and1: Unfolding(name='and1', decl=and1, args=[x!4870, y!4871], body=not1(nand1(x!4870, y!4871)), ax=|= ForAll([x, y], and1(x, y) == not1(nand1(x, y))), _subst_fun_body=not1(nand1(Var(0), Var(1)))), and2: Unfolding(name='and2', decl=and2, args=[x!4885, y!4886], body=Concat(and1(Extract(1, 1, x!4885), Extract(1, 1, y!4886)),        and1(Extract(0, 0, x!4885), Extract(0, 0, y!4886))), ax=|= ForAll([x, y],        and2(x, y) ==        Concat(and1(Extract(1, 1, x), Extract(1, 1, y)),               and1(Extract(0, 0, x), Extract(0, 0, y)))), _subst_fun_body=Concat(and1(Extract(1, 1, Var(0)), Extract(1, 1, Var(1))),        and1(Extract(0, 0, Var(0)), Extract(0, 0, Var(1))))), ball: Unfolding(name='ball', decl=ball, args=[x!2473, r!2474], body=Lambda(y!2472, absR(y!2472 - x!2473) < r!2474), ax=|= ForAll([x!2468, r!2471],        ball(x!2468, r!2471) ==        (Lambda(y!2472, absR(y!2472 - x!2468) < r!2471))), _subst_fun_body=Lambda(y!2472, absR(y!2472 - Var(1)) < Var(2))), bchoose: Unfolding(name='bchoose', decl=bchoose, args=[P!418, N!419], body=downsearch(P!418, N!419), ax=|= ForAll([P, N], bchoose(P, N) == downsearch(P, N)), _subst_fun_body=downsearch(Var(0), Var(1))), beq: Unfolding(name='beq', decl=beq, args=[p!2433, q!2434], body=T_Bool(Lambda(t!2432,               val(p!2433)[t!2432] == val(q!2434)[t!2432])), ax=|= ForAll([p, q],        beq(p, q) ==        T_Bool(Lambda(t!2432,                      val(p)[t!2432] == val(q)[t!2432]))), _subst_fun_body=T_Bool(Lambda(t!2432,               val(Var(1))[t!2432] == val(Var(2))[t!2432]))), between: Unfolding(name='between', decl=between, args=[p!2801, q!2802, a!2803], body=And(collinear(p!2801, q!2802, a!2803),     Vec2.dot(Vec2.sub(q!2802, p!2801),              Vec2.sub(a!2803, p!2801)) >=     0,     Vec2.dot(Vec2.sub(p!2801, q!2802),              Vec2.sub(a!2803, q!2802)) >=     0), ax=|= ForAll([p, q, a],        between(p, q, a) ==        And(collinear(p, q, a),            Vec2.dot(Vec2.sub(q, p), Vec2.sub(a, p)) >= 0,            Vec2.dot(Vec2.sub(p, q), Vec2.sub(a, q)) >= 0)), _subst_fun_body=And(collinear(Var(0), Var(1), Var(2)),     Vec2.dot(Vec2.sub(Var(1), Var(0)),              Vec2.sub(Var(2), Var(0))) >=     0,     Vec2.dot(Vec2.sub(Var(0), Var(1)),              Vec2.sub(Var(2), Var(1))) >=     0)), bexist: Unfolding(name='bexist', decl=bexist, args=[A!2357, n!2358], body=If(n!2358 < 0,    False,    Or(A!2357[n!2358], bexists(A!2357, n!2358 - 1))), ax=|= ForAll([A, n],        bexist(A, n) ==        If(n < 0, False, Or(A[n], bexists(A, n - 1)))), _subst_fun_body=If(Var(1) < 0,    False,    Or(Var(0)[Var(1)], bexists(Var(0), Var(1) - 1)))), bexists: Unfolding(name='bexists', decl=bexists, args=[P!420, N!421], body=P!420[bchoose(P!420, N!421)], ax=|= ForAll([P, N], bexists(P, N) == P[bchoose(P, N)]), _subst_fun_body=Var(0)[bchoose(Var(0), Var(1))]), bforall: Unfolding(name='bforall', decl=bforall, args=[A!2359, n!2360], body=If(n!2360 < 0,    True,    And(A!2359[n!2360], bforall(A!2359, n!2360 - 1))), ax=|= ForAll([A, n],        bforall(A, n) ==        If(n < 0, True, And(A[n], bforall(A, n - 1)))), _subst_fun_body=If(Var(1) < 0,    True,    And(Var(0)[Var(1)], bforall(Var(0), Var(1) - 1)))), biginter: Unfolding(name='biginter', decl=biginter, args=[a!3186], body=sep(pick(a!3186),     Lambda(x,            ForAll(b!2994,                   Implies(∈(b!2994, a!3186), ∈(x, b!2994))))), ax=|= ForAll(a!2993,        biginter(a!2993) ==        sep(pick(a!2993),            Lambda(x,                   ForAll(b!2994,                          Implies(∈(b!2994, a!2993),                                  ∈(x, b!2994)))))), _subst_fun_body=sep(pick(Var(0)),     Lambda(x,            ForAll(b!2994,                   Implies(∈(b!2994, Var(2)), ∈(x, b!2994)))))), cauchy_mod: Unfolding(name='cauchy_mod', decl=cauchy_mod, args=[a!1592, mod!1593], body=ForAll(eps,        Implies(eps > 0,                ForAll([m, k],                       Implies(m > mod!1593[eps],                               Implies(k > mod!1593[eps],                                       absR(a!1592[m] -                                         a!1592[k]) <                                       eps))))), ax=|= ForAll([a, mod],        cauchy_mod(a, mod) ==        (ForAll(eps,                Implies(eps > 0,                        ForAll([m, k],                               Implies(m > mod[eps],                                       Implies(k > mod[eps],                                         absR(a[m] - a[k]) <                                         eps))))))), _subst_fun_body=ForAll(eps,        Implies(eps > 0,                ForAll([m, k],                       Implies(m > Var(4)[eps],                               Implies(k > Var(4)[eps],                                       absR(Var(3)[m] -                                         Var(3)[k]) <                                       eps)))))), ceil: Unfolding(name='ceil', decl=ceil, args=[x!677], body=-floor(-x!677), ax=|= ForAll(x, ceil(x) == -floor(-x)), _subst_fun_body=-floor(-Var(0))), circle: Unfolding(name='circle', decl=circle, args=[c!2833, p!2834], body=Lambda(q,        Vec2.norm2(Vec2.sub(p!2834, c!2833)) ==        Vec2.norm2(Vec2.sub(q, c!2833))), ax=|= ForAll([c, p],        circle(c, p) ==        (Lambda(q,                Vec2.norm2(Vec2.sub(p, c)) ==                Vec2.norm2(Vec2.sub(q, c))))), _subst_fun_body=Lambda(q,        Vec2.norm2(Vec2.sub(Var(2), Var(1))) ==        Vec2.norm2(Vec2.sub(q, Var(1))))), closed: Unfolding(name='closed', decl=closed, args=[A!2354], body=(Array Sierpinski Bool).open(complement(A!2354)), ax=|= ForAll(A,        closed(A) ==        (Array Sierpinski Bool).open(complement(A))), _subst_fun_body=(Array Sierpinski Bool).open(complement(Var(0)))), collinear: Unfolding(name='collinear', decl=collinear, args=[p!2796, q!2797, a!2798], body=Vec2.cross(Vec2.sub(q!2797, p!2796),            Vec2.sub(a!2798, p!2796)) == 0, ax=|= ForAll([p, q, a],        collinear(p, q, a) ==        (Vec2.cross(Vec2.sub(q, p), Vec2.sub(a, p)) == 0)), _subst_fun_body=Vec2.cross(Vec2.sub(Var(1), Var(0)),            Vec2.sub(Var(2), Var(0))) == 0), comp: Unfolding(name='comp', decl=comp, args=[f!757, g!758], body=Lambda(x, f!757[g!758[x]]), ax=|= ForAll([f, g], comp(f, g) == (Lambda(x, f[g[x]]))), _subst_fun_body=Lambda(x, Var(1)[Var(2)[x]])), cong_seg: Unfolding(name='cong_seg', decl=cong_seg, args=[p!2805, q!2806, a!2807, b!2808], body=Vec2.norm2(Vec2.sub(p!2805, q!2806)) == Vec2.norm2(Vec2.sub(a!2807, b!2808)), ax=|= ForAll([p, q, a, b],        cong_seg(p, q, a, b) ==        (Vec2.norm2(Vec2.sub(p, q)) ==         Vec2.norm2(Vec2.sub(a, b)))), _subst_fun_body=Vec2.norm2(Vec2.sub(Var(0), Var(1))) == Vec2.norm2(Vec2.sub(Var(2), Var(3)))), conj: Unfolding(name='conj', decl=conj, args=[z!2498], body=C(re(z!2498), -im(z!2498)), ax=|= ForAll(z, conj(z) == C(re(z), -im(z))), _subst_fun_body=C(re(Var(0)), -im(Var(0)))), cont_at: Unfolding(name='cont_at', decl=cont_at, args=[f!765, x!766], body=ForAll(eps,        Implies(eps > 0,                Exists(delta,                       And(delta > 0,                           ForAll(y,                                  Implies(absR(x!766 - y) <                                         delta,                                         absR(f!765[x!766] -                                         f!765[y]) <                                         eps)))))), ax=|= ForAll([f, x],        cont_at(f, x) ==        (ForAll(eps,                Implies(eps > 0,                        Exists(delta,                               And(delta > 0,                                   ForAll(y,                                         Implies(absR(x - y) <                                         delta,                                         absR(f[x] - f[y]) <                                         eps)))))))), _subst_fun_body=ForAll(eps,        Implies(eps > 0,                Exists(delta,                       And(delta > 0,                           ForAll(y,                                  Implies(absR(Var(4) - y) <                                         delta,                                         absR(Var(3)[Var(4)] -                                         Var(3)[y]) <                                         eps))))))), cross: Unfolding(name='cross', decl=cross, args=[u!2971, v!2972], body=Vec3(y(u!2971)*z(v!2972) - z(u!2971)*y(v!2972),      z(u!2971)*x(v!2972) - x(u!2971)*z(v!2972),      x(u!2971)*y(v!2972) - y(u!2971)*x(v!2972)), ax=|= ForAll([u, v],        cross(u, v) ==        Vec3(y(u)*z(v) - z(u)*y(v),             z(u)*x(v) - x(u)*z(v),             x(u)*y(v) - y(u)*x(v))), _subst_fun_body=Vec3(y(Var(0))*z(Var(1)) - z(Var(0))*y(Var(1)),      z(Var(0))*x(Var(1)) - x(Var(0))*z(Var(1)),      x(Var(0))*y(Var(1)) - y(Var(0))*x(Var(1)))), cumsum: Unfolding(name='cumsum', decl=cumsum, args=[a!1394], body=Lambda(i,        If(i == 0,           0,           If(i > 0,              cumsum(a!1394)[i - 1] + a!1394[i - 1],              cumsum(a!1394)[i + 1] - a!1394[i]))), ax=|= ForAll(a,        cumsum(a) ==        (Lambda(i,                If(i == 0,                   0,                   If(i > 0,                      cumsum(a)[i - 1] + a[i - 1],                      cumsum(a)[i + 1] - a[i]))))), _subst_fun_body=Lambda(i,        If(i == 0,           0,           If(i > 0,              cumsum(Var(1))[i - 1] + Var(1)[i - 1],              cumsum(Var(1))[i + 1] - Var(1)[i])))), decimate: Unfolding(name='decimate', decl=decimate, args=[a!1348, n!1349], body=Lambda(i, a!1348[i*n!1349]), ax=|= ForAll([a, n], decimate(a, n) == (Lambda(i, a[i*n]))), _subst_fun_body=Lambda(i, Var(1)[i*Var(2)])), delay: Unfolding(name='delay', decl=delay, args=[a!1344], body=RSeq.shift(a!1344, 1), ax=|= ForAll(a, delay(a) == RSeq.shift(a, 1)), _subst_fun_body=RSeq.shift(Var(0), 1)), diff: Unfolding(name='diff', decl=diff, args=[a!1359], body=Lambda(i, a!1359[i + 1] - a!1359[i]), ax=|= ForAll(a, diff(a) == (Lambda(i, a[i + 1] - a[i]))), _subst_fun_body=Lambda(i, Var(1)[i + 1] - Var(1)[i])), diff_at: Unfolding(name='diff_at', decl=diff_at, args=[f!763, x!764], body=Exists(y, has_diff_at(f!763, x!764, y)), ax=|= ForAll([f, x],        diff_at(f, x) == (Exists(y, has_diff_at(f, x, y)))), _subst_fun_body=Exists(y, has_diff_at(Var(1), Var(2), y))), dilate: Unfolding(name='dilate', decl=dilate, args=[a!1346, n!1347], body=Lambda(i, a!1346[i/n!1347]), ax=|= ForAll([a, n], dilate(a, n) == (Lambda(i, a[i/n]))), _subst_fun_body=Lambda(i, Var(1)[i/Var(2)])), dir: Unfolding(name='dir', decl=dir, args=[p!2817], body=ray(Vec2(ToReal(0), ToReal(0)), p!2817), ax=|= ForAll(p, dir(p) == ray(Vec2(ToReal(0), ToReal(0)), p)), _subst_fun_body=ray(Vec2(ToReal(0), ToReal(0)), Var(0))), dom: Unfolding(name='dom', decl=dom, args=[R!3503], body=sep(bigunion(bigunion(R!3503)),     Lambda(x, Exists(y, ∈(pair(x, y), R!3503)))), ax=|= ForAll(R,        dom(R) ==        sep(bigunion(bigunion(R)),            Lambda(x, Exists(y, ∈(pair(x, y), R))))), _subst_fun_body=sep(bigunion(bigunion(Var(0))),     Lambda(x, Exists(y, ∈(pair(x, y), Var(2)))))), dommap: Unfolding(name='dommap', decl=dommap, args=[F!1340, a!1341], body=Lambda(i, a!1341[F!1340[i]]), ax=|= ForAll([F, a], dommap(F, a) == (Lambda(i, a[F[i]]))), _subst_fun_body=Lambda(i, Var(2)[Var(1)[i]])), double: Unfolding(name='double', decl=double, args=[n!483], body=If(is(Z, n!483), Z, S(S(double(pred(n!483))))), ax=|= ForAll(n,        double(n) == If(is(Z, n), Z, S(S(double(pred(n)))))), _subst_fun_body=If(is(Z, Var(0)), Z, S(S(double(pred(Var(0))))))), downsearch: Unfolding(name='downsearch', decl=downsearch, args=[P!416, n!417], body=If(P!416[n!417],    n!417,    If(n!417 < 0, 0, downsearch(P!416, n!417 - 1))), ax=|= ForAll([P, n!381],        downsearch(P, n!381) ==        If(P[n!381],           n!381,           If(n!381 < 0, 0, downsearch(P, n!381 - 1)))), _subst_fun_body=If(Var(0)[Var(1)],    Var(1),    If(Var(1) < 0, 0, downsearch(Var(0), Var(1) - 1)))), dvd: Unfolding(name='dvd', decl=dvd, args=[n!378, m!379], body=Exists(p, m!379 == n!378*p), ax=|= ForAll([n, m], dvd(n, m) == (Exists(p, m == n*p))), _subst_fun_body=Exists(p, Var(2) == Var(1)*p)), empty: Unfolding(name='empty', decl=empty, args=[], body=Interval(1, 0), ax=|= empty == Interval(1, 0), _subst_fun_body=Interval(1, 0)), even: Unfolding(name='even', decl=even, args=[x!351], body=Exists(y, x!351 == 2*y), ax=|= ForAll(x, even(x) == (Exists(y, x == 2*y))), _subst_fun_body=Exists(y, Var(1) == 2*y)), eventually: Unfolding(name='eventually', decl=eventually, args=[P!1596], body=Exists(N, ForAll(n, Implies(n > N, P!1596[n]))), ax=|= ForAll(P,        eventually(P) ==        (Exists(N, ForAll(n, Implies(n > N, P[n]))))), _subst_fun_body=Exists(N, ForAll(n, Implies(n > N, Var(2)[n])))), eventually: Unfolding(name='eventually', decl=eventually, args=[p!2426], body=T_Bool(Lambda(t!2424,               Exists(dt!2425,                      And(dt!2425 >= 0,                          val(p!2426)[t!2424 + dt!2425])))), ax=|= ForAll(p,        eventually(p) ==        T_Bool(Lambda(t!2424,                      Exists(dt!2425,                             And(dt!2425 >= 0,                                 val(p)[t!2424 + dt!2425]))))), _subst_fun_body=T_Bool(Lambda(t!2424,               Exists(dt!2425,                      And(dt!2425 >= 0,                          val(Var(2))[t!2424 + dt!2425]))))), expi: Unfolding(name='expi', decl=expi, args=[t!2509], body=C(Real.cos(t!2509), Real.sin(t!2509)), ax=|= ForAll(t, expi(t) == C(Real.cos(t), Real.sin(t))), _subst_fun_body=C(Real.cos(Var(0)), Real.sin(Var(0)))), eye: Unfolding(name='eye', decl=eye, args=[n!1552], body=Lambda([i, j], If(i == j, 1, 0)), ax=|= ForAll(n, eye(n) == (Lambda([i, j], If(i == j, 1, 0)))), _subst_fun_body=Lambda([i, j], If(i == j, 1, 0))), fact: Unfolding(name='fact', decl=fact, args=[n!380], body=If(n!380 <= 0, 1, n!380*fact(n!380 - 1)), ax=|= ForAll(n, fact(n) == If(n <= 0, 1, n*fact(n - 1))), _subst_fun_body=If(Var(0) <= 0, 1, Var(0)*fact(Var(0) - 1))), finsum: Unfolding(name='finsum', decl=finsum, args=[a!1503, n!1504], body=cumsum(a!1503)[n!1504], ax=|= ForAll([a, n], finsum(a, n) == cumsum(a)[n]), _subst_fun_body=cumsum(Var(0))[Var(1)]), floor: Unfolding(name='floor', decl=floor, args=[x!660], body=ToReal(ToInt(x!660)), ax=|= ForAll(x, floor(x) == ToReal(ToInt(x))), _subst_fun_body=ToReal(ToInt(Var(0)))), from_int: Unfolding(name='from_int', decl=from_int, args=[a!461], body=If(a!461 <= 0, Z, S(from_int(a!461 - 1))), ax=|= ForAll(a, from_int(a) == If(a <= 0, Z, S(from_int(a - 1)))), _subst_fun_body=If(Var(0) <= 0, Z, S(from_int(Var(0) - 1)))), from_nat: Unfolding(name='from_nat', decl=from_nat, args=[n!430], body=If(n!430%2 == 0, n!430/2, -(n!430 + 1)/2), ax=|= ForAll(n!381,        from_nat(n!381) ==        If(n!381%2 == 0, n!381/2, -(n!381 + 1)/2)), _subst_fun_body=If(Var(0)%2 == 0, Var(0)/2, -(Var(0) + 1)/2)), fst: Unfolding(name='fst', decl=fst, args=[p!3381], body=pick(biginter(p!3381)), ax=|= ForAll(p!2997, fst(p!2997) == pick(biginter(p!2997))), _subst_fun_body=pick(biginter(Var(0)))), geom: Unfolding(name='geom', decl=geom, args=[x!1338], body=Lambda(i, pownat(x!1338, i)), ax=|= ForAll(x, geom(x) == (Lambda(i, pownat(x, i)))), _subst_fun_body=Lambda(i, pownat(Var(1), i))), has_bound: Unfolding(name='has_bound', decl=has_bound, args=[a!1585, M!1586], body=ForAll(n, absR(a!1585[n]) <= M!1586), ax=|= ForAll([a, M],        has_bound(a, M) == (ForAll(n, absR(a[n]) <= M))), _subst_fun_body=ForAll(n, absR(Var(1)[n]) <= Var(2))), has_deriv_at: Unfolding(name='has_deriv_at', decl=has_deriv_at, args=[f!3952, a!3953, p!3954], body=has_lim_at(Lambda(x,                   (f!3952[x] - f!3952[p!3954])/(x - p!3954)),            p!3954,            a!3953), ax=|= ForAll([f, a, p],        has_deriv_at(f, a, p) ==        has_lim_at(Lambda(x, (f[x] - f[p])/(x - p)), p, a)), _subst_fun_body=has_lim_at(Lambda(x,                   (Var(1)[x] - Var(1)[Var(3)])/(x - Var(3))),            Var(2),            Var(1))), has_integral: Unfolding(name='has_integral', decl=has_integral, args=[f!4134, a!4135, b!4136, I!4137], body=ForAll(eps,        Implies(eps > 0,                Exists(D,                       And(ForAll(x, D[x] > 0),                           ForAll([xs, ts, n],                                  Implies(is_tagged_partition(xs,                                         ts,                                         n,                                         a!4135,                                         b!4136),                                         Implies(is_fine(D,                                         xs,                                         ts,                                         n),                                         absR(riemann_sum(f!4134,                                         xs,                                         ts,                                         n) -                                         I!4137) <                                         eps))))))), ax=|= ForAll([f, a, b, I],        has_integral(f, a, b, I) ==        (ForAll(eps,                Implies(eps > 0,                        Exists(D,                               And(ForAll(x, D[x] > 0),                                   ForAll([xs, ts, n],                                         Implies(is_tagged_partition(xs,                                         ts,                                         n,                                         a,                                         b),                                         Implies(is_fine(D,                                         xs,                                         ts,                                         n),                                         absR(riemann_sum(f,                                         xs,                                         ts,                                         n) -                                         I) <                                         eps))))))))), _subst_fun_body=ForAll(eps,        Implies(eps > 0,                Exists(D,                       And(ForAll(x, D[x] > 0),                           ForAll([xs, ts, n],                                  Implies(is_tagged_partition(xs,                                         ts,                                         n,                                         Var(6),                                         Var(7)),                                         Implies(is_fine(D,                                         xs,                                         ts,                                         n),                                         absR(riemann_sum(Var(5),                                         xs,                                         ts,                                         n) -                                         Var(8)) <                                         eps)))))))), has_lim: Unfolding(name='has_lim', decl=has_lim, args=[a!1594, y!1595], body=ForAll(eps,        Implies(eps > 0,                Exists(N,                       ForAll(n,                              Implies(n > N,                                      absR(a!1594[n] - y!1595) <                                      eps))))), ax=|= ForAll([a, y],        has_lim(a, y) ==        (ForAll(eps,                Implies(eps > 0,                        Exists(N,                               ForAll(n,                                      Implies(n > N,                                         absR(a[n] - y) < eps))))))), _subst_fun_body=ForAll(eps,        Implies(eps > 0,                Exists(N,                       ForAll(n,                              Implies(n > N,                                      absR(Var(3)[n] - Var(4)) <                                      eps)))))), has_lim_at: Unfolding(name='has_lim_at', decl=has_lim_at, args=[f!760, p!761, L!762], body=ForAll(eps,        Implies(0 < eps,                Exists(delta,                       And(delta > 0,                           ForAll(x,                                  Implies(0 < absR(x - p!761),                                         Implies(absR(x -                                         p!761) <                                         delta,                                         absR(f!760[x] -                                         L!762) <                                         eps))))))), ax=|= ForAll([f, p, L],        has_lim_at(f, p, L) ==        (ForAll(eps,                Implies(0 < eps,                        Exists(delta,                               And(delta > 0,                                   ForAll(x,                                         Implies(0 <                                         absR(x - p),                                         Implies(absR(x - p) <                                         delta,                                         absR(f[x] - L) < eps))))))))), _subst_fun_body=ForAll(eps,        Implies(0 < eps,                Exists(delta,                       And(delta > 0,                           ForAll(x,                                  Implies(0 <                                         absR(x - Var(4)),                                         Implies(absR(x -                                         Var(4)) <                                         delta,                                         absR(Var(3)[x] -                                         Var(5)) <                                         eps)))))))), has_sum: Unfolding(name='has_sum', decl=has_sum, args=[a!1843, y!1844], body=has_lim(cumsum(a!1843), y!1844), ax=|= ForAll([a, y], has_sum(a, y) == has_lim(cumsum(a), y)), _subst_fun_body=has_lim(cumsum(Var(0)), Var(1))), iand: Unfolding(name='iand', decl=iand, args=[a!2364, b!2365], body=Prop(Lambda(w, And(val(a!2364)[w], val(b!2365)[w]))), ax=|= ForAll([a, b],        iand(a, b) ==        Prop(Lambda(w, And(val(a)[w], val(b)[w])))), _subst_fun_body=Prop(Lambda(w, And(val(Var(1))[w], val(Var(2))[w])))), ieq: Unfolding(name='ieq', decl=ieq, args=[x!2456, y!2457], body=T_Bool(Lambda(t!2455,               val(x!2456)[t!2455] == val(y!2457)[t!2455])), ax=|= ForAll([x, y],        ieq(x, y) ==        T_Bool(Lambda(t!2455,                      val(x)[t!2455] == val(y)[t!2455]))), _subst_fun_body=T_Bool(Lambda(t!2455,               val(Var(1))[t!2455] == val(Var(2))[t!2455]))), if_int: Unfolding(name='if_int', decl=if_int, args=[p!2464, x!2465, y!2466], body=T_Int(Lambda(t!2463,              If(val(p!2464)[t!2463],                 val(x!2465)[t!2463],                 val(y!2466)[t!2463]))), ax=|= ForAll([p, x, y],        if_int(p, x, y) ==        T_Int(Lambda(t!2463,                     If(val(p)[t!2463],                        val(x)[t!2463],                        val(y)[t!2463])))), _subst_fun_body=T_Int(Lambda(t!2463,              If(val(Var(1))[t!2463],                 val(Var(2))[t!2463],                 val(Var(3))[t!2463])))), iimpl: Unfolding(name='iimpl', decl=iimpl, args=[a!2368, b!2369], body=Prop(Lambda(w,             ForAll(u,                    Implies(acc(w, u),                            Implies(val(a!2368)[u],                                    val(b!2369)[u]))))), ax=|= ForAll([a, b],        iimpl(a, b) ==        Prop(Lambda(w,                    ForAll(u,                           Implies(acc(w, u),                                   Implies(val(a)[u],                                         val(b)[u])))))), _subst_fun_body=Prop(Lambda(w,             ForAll(u,                    Implies(acc(w, u),                            Implies(val(Var(2))[u],                                    val(Var(3))[u])))))), ind: Unfolding(name='ind', decl=ind, args=[S!1339], body=Lambda(i, If(S!1339[i], 1, 0)), ax=|= ForAll(S, ind(S) == (Lambda(i, If(S[i], 1, 0)))), _subst_fun_body=Lambda(i, If(Var(1)[i], 1, 0))), ineq: Unfolding(name='ineq', decl=ineq, args=[x!2459, y!2460], body=T_Bool(Lambda(t!2458,               val(x!2459)[t!2458] != val(y!2460)[t!2458])), ax=|= ForAll([x, y],        ineq(x, y) ==        T_Bool(Lambda(t!2458,                      val(x)[t!2458] != val(y)[t!2458]))), _subst_fun_body=T_Bool(Lambda(t!2458,               val(Var(1))[t!2458] != val(Var(2))[t!2458]))), inext: Unfolding(name='inext', decl=inext, args=[x!2462], body=T_Int(Lambda(t!2461, val(x!2462)[t!2461 + 1])), ax=|= ForAll(x,        inext(x) == T_Int(Lambda(t!2461, val(x)[t!2461 + 1]))), _subst_fun_body=T_Int(Lambda(t!2461, val(Var(1))[t!2461 + 1]))), inot: Unfolding(name='inot', decl=inot, args=[a!2370], body=Prop(Lambda(w,             ForAll(u,                    Implies(acc(w, u),                            Implies(val(a!2370)[u],                                    val(Prop(K(World, False)))[u]))))), ax=|= ForAll(a,        inot(a) ==        Prop(Lambda(w,                    ForAll(u,                           Implies(acc(w, u),                                   Implies(val(a)[u],                                         val(Prop(K(World,                                         False)))[u])))))), _subst_fun_body=Prop(Lambda(w,             ForAll(u,                    Implies(acc(w, u),                            Implies(val(Var(2))[u],                                    val(Prop(K(World, False)))[u])))))), integral: Unfolding(name='integral', decl=integral, args=[f!4431, a!4432, b!4433], body=f!4430(b!4433, a!4432, f!4431), ax=|= ForAll([f!4427, a!4428, b!4429],        integral(f!4427, a!4428, b!4429) ==        f!4430(b!4429, a!4428, f!4427)), _subst_fun_body=f!4430(Var(2), Var(1), Var(0))), inter: Unfolding(name='inter', decl=inter, args=[A!3203, B!3204], body=sep(A!3203, Lambda(x, ∈(x, B!3204))), ax=|= ForAll([A, B], inter(A, B) == sep(A, Lambda(x, ∈(x, B)))), _subst_fun_body=sep(Var(0), Lambda(x, ∈(x, Var(2))))), ior: Unfolding(name='ior', decl=ior, args=[a!2366, b!2367], body=Prop(Lambda(w, Or(val(a!2366)[w], val(b!2367)[w]))), ax=|= ForAll([a, b],        ior(a, b) ==        Prop(Lambda(w, Or(val(a)[w], val(b)[w])))), _subst_fun_body=Prop(Lambda(w, Or(val(Var(1))[w], val(Var(2))[w])))), is_bounded: Unfolding(name='is_bounded', decl=is_bounded, args=[a!1587], body=Exists(M, has_bound(a!1587, M)), ax=|= ForAll(a, is_bounded(a) == (Exists(M, has_bound(a, M)))), _subst_fun_body=Exists(M, has_bound(Var(1), M))), is_cauchy: Unfolding(name='is_cauchy', decl=is_cauchy, args=[a!1591], body=ForAll(eps,        Implies(eps > 0,                Exists(N,                       ForAll([m, k],                              Implies(m > N,                                      Implies(k > N,                                         absR(a!1591[m] -                                         a!1591[k]) <                                         eps)))))), ax=|= ForAll(a,        is_cauchy(a) ==        (ForAll(eps,                Implies(eps > 0,                        Exists(N,                               ForAll([m, k],                                      Implies(m > N,                                         Implies(k > N,                                         absR(a[m] - a[k]) <                                         eps)))))))), _subst_fun_body=ForAll(eps,        Implies(eps > 0,                Exists(N,                       ForAll([m, k],                              Implies(m > N,                                      Implies(k > N,                                         absR(Var(4)[m] -                                         Var(4)[k]) <                                         eps))))))), is_circle: Unfolding(name='is_circle', decl=is_circle, args=[A!2835], body=Exists([c, q], ForAll(p, circle(c, q)[p] == A!2835[p])), ax=|= ForAll(A,        is_circle(A) ==        (Exists([c, q], ForAll(p, circle(c, q)[p] == A[p])))), _subst_fun_body=Exists([c, q], ForAll(p, circle(c, q)[p] == Var(3)[p]))), is_cont: Unfolding(name='is_cont', decl=is_cont, args=[f!771], body=ForAll(x, cont_at(f!771, x)), ax=|= ForAll(f, is_cont(f) == (ForAll(x, cont_at(f, x)))), _subst_fun_body=ForAll(x, cont_at(Var(1), x))), is_conv: Unfolding(name='is_conv', decl=is_conv, args=[a!1617], body=Exists(y, has_lim(a!1617, y)), ax=|= ForAll(a, is_conv(a) == (Exists(y, has_lim(a, y)))), _subst_fun_body=Exists(y, has_lim(Var(1), y))), is_diff: Unfolding(name='is_diff', decl=is_diff, args=[f!770], body=ForAll(x, diff_at(f!770, x)), ax=|= ForAll(f, is_diff(f) == (ForAll(x, diff_at(f, x)))), _subst_fun_body=ForAll(x, diff_at(Var(1), x))), is_dir: Unfolding(name='is_dir', decl=is_dir, args=[A!2818], body=Exists(p,        And(p != Vec2(ToReal(0), ToReal(0)),            Vec2.norm2(p) == 1,            dir(p) == A!2818)), ax=|= ForAll(A,        is_dir(A) ==        (Exists(p,                And(p != Vec2(ToReal(0), ToReal(0)),                    Vec2.norm2(p) == 1,                    dir(p) == A)))), _subst_fun_body=Exists(p,        And(p != Vec2(ToReal(0), ToReal(0)),            Vec2.norm2(p) == 1,            dir(p) == Var(1)))), is_empty: Unfolding(name='is_empty', decl=is_empty, args=[I!2849], body=hi(i) > lo(i), ax=|= ForAll(I, is_empty(I) == (hi(i) > lo(i))), _subst_fun_body=hi(i) > lo(i)), is_fine: Unfolding(name='is_fine', decl=is_fine, args=[D!4126, xs!4127, ts!4128, n!4129], body=ForAll(i,        Implies(i >= 0,                Implies(i < n!4129,                        And(ts!4128[i] - D!4126[ts!4128[i]] <                            xs!4127[i],                            xs!4127[i + 1] <                            ts!4128[i] + D!4126[ts!4128[i]])))), ax=|= ForAll([D, xs, ts, n],        is_fine(D, xs, ts, n) ==        (ForAll(i,                Implies(i >= 0,                        Implies(i < n,                                And(ts[i] - D[ts[i]] < xs[i],                                    xs[i + 1] <                                    ts[i] + D[ts[i]])))))), _subst_fun_body=ForAll(i,        Implies(i >= 0,                Implies(i < Var(4),                        And(Var(3)[i] - Var(1)[Var(3)[i]] <                            Var(2)[i],                            Var(2)[i + 1] <                            Var(3)[i] + Var(1)[Var(3)[i]]))))), is_idem: Unfolding(name='is_idem', decl=is_idem, args=[A!2125], body=mul(A!2125, A!2125) == A!2125, ax=|= ForAll(A, is_idem(A) == (mul(A, A) == A)), _subst_fun_body=mul(Var(0), Var(0)) == Var(0)), is_integrable: Unfolding(name='is_integrable', decl=is_integrable, args=[f!4424, a!4425, b!4426], body=Exists(I, has_integral(f!4424, a!4425, b!4426, I)), ax=|= ForAll([f, a, b],        is_integrable(f, a, b) ==        (Exists(I, has_integral(f, a, b, I)))), _subst_fun_body=Exists(I, has_integral(Var(1), Var(2), Var(3), I))), is_line: Unfolding(name='is_line', decl=is_line, args=[A!2751], body=Exists([p, q],        And(p != q, ForAll(a, line(p, q)[a] == A!2751[a]))), ax=|= ForAll(A,        is_line(A) ==        (Exists([p, q],                And(p != q, ForAll(a, line(p, q)[a] == A[a]))))), _subst_fun_body=Exists([p, q],        And(p != q, ForAll(a, line(p, q)[a] == Var(3)[a])))), is_linear: Unfolding(name='is_linear', decl=is_linear, args=[f!2641], body=And(ForAll([x, y],            f!2641[R.add(x, y)] ==            R.add(f!2641[x], f!2641[y])),     ForAll([x, c], f!2641[mul(c, x)] == mul(c, f!2641[x]))), ax=|= ForAll(f,        is_linear(f) ==        And(ForAll([x, y],                   f[R.add(x, y)] == R.add(f[x], f[y])),            ForAll([x, c], f[mul(c, x)] == mul(c, f[x])))), _subst_fun_body=And(ForAll([x, y],            Var(2)[R.add(x, y)] ==            R.add(Var(2)[x], Var(2)[y])),     ForAll([x, c], Var(2)[mul(c, x)] == mul(c, Var(2)[x])))), is_lub: Unfolding(name='is_lub', decl=is_lub, args=[A!2636, x!2637], body=And(upper_bound(A!2636, x!2637),     ForAll(y,            Implies(upper_bound(A!2636, y),                    EReal.le(x!2637, y)))), ax=|= ForAll([A, x],        is_lub(A, x) ==        And(upper_bound(A, x),            ForAll(y,                   Implies(upper_bound(A, y), EReal.le(x, y))))), _subst_fun_body=And(upper_bound(Var(0), Var(1)),     ForAll(y,            Implies(upper_bound(Var(1), y),                    EReal.le(Var(2), y))))), is_monotone: Unfolding(name='is_monotone', decl=is_monotone, args=[a!1588], body=ForAll([n, m], Implies(n <= m, a!1588[n] <= a!1588[m])), ax=|= ForAll(a,        is_monotone(a) ==        (ForAll([n, m], Implies(n <= m, a[n] <= a[m])))), _subst_fun_body=ForAll([n, m], Implies(n <= m, Var(2)[n] <= Var(2)[m]))), is_nonneg: Unfolding(name='is_nonneg', decl=is_nonneg, args=[a!1589], body=ForAll(n, a!1589[n] >= 0), ax=|= ForAll(a, is_nonneg(a) == (ForAll(n, a[n] >= 0))), _subst_fun_body=ForAll(n, Var(1)[n] >= 0)), is_open: Unfolding(name='is_open', decl=is_open, args=[S!2475], body=ForAll(x!2468,        Implies(S!2475[x!2468],                Exists(r!2471,                       And(0 < r!2471,                           subset(ball(x!2468, r!2471),                                  S!2475))))), ax=|= ForAll(S,        is_open(S) ==        (ForAll(x!2468,                Implies(S[x!2468],                        Exists(r!2471,                               And(0 < r!2471,                                   subset(ball(x!2468,                                         r!2471),                                         S))))))), _subst_fun_body=ForAll(x!2468,        Implies(Var(1)[x!2468],                Exists(r!2471,                       And(0 < r!2471,                           subset(ball(x!2468, r!2471),                                  Var(2))))))), is_orth: Unfolding(name='is_orth', decl=is_orth, args=[A!2124], body=mul(A!2124, trans(A!2124)) == I, ax=|= ForAll(A, is_orth(A) == (mul(A, trans(A)) == I)), _subst_fun_body=mul(Var(0), trans(Var(0))) == I), is_pair: Unfolding(name='is_pair', decl=is_pair, args=[c!3380], body=Exists([a!2993, b!2994], pair(a!2993, b!2994) == c!3380), ax=|= ForAll(c!2995,        is_pair(c!2995) ==        (Exists([a!2993, b!2994],                pair(a!2993, b!2994) == c!2995))), _subst_fun_body=Exists([a!2993, b!2994], pair(a!2993, b!2994) == Var(2))), is_parallel: Unfolding(name='is_parallel', decl=is_parallel, args=[A!2792, B!2793], body=Vec2.cross(Vec2.sub(f!2788(A!2792), f!2789(A!2792)),            Vec2.sub(f!2788(B!2793), f!2789(B!2793))) == 0, ax=|= ForAll([A, B],        is_parallel(A, B) ==        (Vec2.cross(Vec2.sub(f!2788(A), f!2789(A)),                    Vec2.sub(f!2788(B), f!2789(B))) ==         0)), _subst_fun_body=Vec2.cross(Vec2.sub(f!2788(Var(0)), f!2789(Var(0))),            Vec2.sub(f!2788(Var(1)), f!2789(Var(1)))) == 0), is_perp: Unfolding(name='is_perp', decl=is_perp, args=[A!2790, B!2791], body=Vec2.dot(Vec2.sub(f!2788(A!2790), f!2789(A!2790)),          Vec2.sub(f!2788(B!2791), f!2789(B!2791))) == 0, ax=|= ForAll([A, B],        is_perp(A, B) ==        (Vec2.dot(Vec2.sub(f!2788(A), f!2789(A)),                  Vec2.sub(f!2788(B), f!2789(B))) ==         0)), _subst_fun_body=Vec2.dot(Vec2.sub(f!2788(Var(0)), f!2789(Var(0))),          Vec2.sub(f!2788(Var(1)), f!2789(Var(1)))) == 0), is_point: Unfolding(name='is_point', decl=is_point, args=[A!2748], body=Exists(p, point(p) == A!2748), ax=|= ForAll(A, is_point(A) == (Exists(p, point(p) == A))), _subst_fun_body=Exists(p, point(p) == Var(1))), is_rel: Unfolding(name='is_rel', decl=is_rel, args=[R!3502], body=ForAll(p!2997, Implies(∈(p!2997, R!3502), is_pair(p!2997))), ax=|= ForAll(R,        is_rel(R) ==        (ForAll(p!2997,                Implies(∈(p!2997, R), is_pair(p!2997))))), _subst_fun_body=ForAll(p!2997, Implies(∈(p!2997, Var(1)), is_pair(p!2997)))), is_set: Unfolding(name='is_set', decl=is_set, args=[P!3001], body=Exists(A, reflects(P!3001, A)), ax=|= ForAll(P, is_set(P) == (Exists(A, reflects(P, A)))), _subst_fun_body=Exists(A, reflects(Var(1), A))), is_summable: Unfolding(name='is_summable', decl=is_summable, args=[a!1845], body=Exists(y, has_sum(a!1845, y)), ax=|= ForAll(a, is_summable(a) == (Exists(y, has_sum(a, y)))), _subst_fun_body=Exists(y, has_sum(Var(1), y))), is_symm: Unfolding(name='is_symm', decl=is_symm, args=[A!2123], body=trans(A!2123) == A!2123, ax=|= ForAll(A, is_symm(A) == (trans(A) == A)), _subst_fun_body=trans(Var(0)) == Var(0)), is_tagged_partition: Unfolding(name='is_tagged_partition', decl=is_tagged_partition, args=[xs!4121, ts!4122, n!4123, a!4124, b!4125], body=And(n!4123 >= 0,     xs!4121[0] == a!4124,     xs!4121[n!4123] == b!4125,     ForAll(i,            Implies(i >= 0,                    Implies(i < n!4123,                            And(xs!4121[i] <= ts!4122[i],                                ts!4122[i] <= xs!4121[i + 1]))))), ax=|= ForAll([xs, ts, n, a, b],        is_tagged_partition(xs, ts, n, a, b) ==        And(n >= 0,            xs[0] == a,            xs[n] == b,            ForAll(i,                   Implies(i >= 0,                           Implies(i < n,                                   And(xs[i] <= ts[i],                                       ts[i] <= xs[i + 1])))))), _subst_fun_body=And(Var(2) >= 0,     Var(0)[0] == Var(3),     Var(0)[Var(2)] == Var(4),     ForAll(i,            Implies(i >= 0,                    Implies(i < Var(3),                            And(Var(1)[i] <= Var(2)[i],                                Var(2)[i] <= Var(1)[i + 1])))))), iterate: Unfolding(name='iterate', decl=iterate, args=[f!1350, x!1351], body=Lambda(i,        If(i <= 0,           x!1351,           f!1350[iterate(f!1350, x!1351)[ToReal(i - 1)]])), ax=|= ForAll([f, x],        iterate(f, x) ==        (Lambda(i,                If(i <= 0,                   x,                   f[iterate(f, x)[ToReal(i - 1)]])))), _subst_fun_body=Lambda(i,        If(i <= 0,           Var(2),           Var(1)[iterate(Var(1), Var(2))[ToReal(i - 1)]]))), join: Unfolding(name='join', decl=join, args=[i!2843, j!2844], body=Interval(min(lo(i!2843), lo(j!2844)),          R.max(hi(i!2843), hi(j!2844))), ax=|= ForAll([i, j],        join(i, j) ==        Interval(min(lo(i), lo(j)), R.max(hi(i), hi(j)))), _subst_fun_body=Interval(min(lo(Var(0)), lo(Var(1))),          R.max(hi(Var(0)), hi(Var(1))))), krondelta: Unfolding(name='krondelta', decl=krondelta, args=[n!1355], body=Lambda(i, If(i == n!1355, 1, 0)), ax=|= ForAll(n, krondelta(n) == (Lambda(i, If(i == n, 1, 0)))), _subst_fun_body=Lambda(i, If(i == Var(1), 1, 0))), lim: Unfolding(name='lim', decl=lim, args=[A!1619], body=f!1618(A!1619), ax=|= ForAll(A!1334, lim(A!1334) == f!1618(A!1334)), _subst_fun_body=f!1618(Var(0))), line: Unfolding(name='line', decl=line, args=[p!2749, q!2750], body=Lambda(a,        Vec2.cross(Vec2.sub(a, p!2749),                   Vec2.sub(q!2750, p!2749)) ==        0), ax=|= ForAll([p, q],        line(p, q) ==        (Lambda(a,                Vec2.cross(Vec2.sub(a, p), Vec2.sub(q, p)) ==                0))), _subst_fun_body=Lambda(a,        Vec2.cross(Vec2.sub(a, Var(1)),                   Vec2.sub(Var(2), Var(1))) ==        0)), max: Unfolding(name='max', decl=max, args=[a!1460], body=Lambda(i,        If(i == 0,           a!1460[0],           If(i > 0,              R.max(max(a!1460)[i - 1], a!1460[i]),              R.max(max(a!1460)[i + 1], a!1460[i])))), ax=|= ForAll(a,        max(a) ==        (Lambda(i,                If(i == 0,                   a[0],                   If(i > 0,                      R.max(max(a)[i - 1], a[i]),                      R.max(max(a)[i + 1], a[i])))))), _subst_fun_body=Lambda(i,        If(i == 0,           Var(1)[0],           If(i > 0,              R.max(max(Var(1))[i - 1], Var(1)[i]),              R.max(max(Var(1))[i + 1], Var(1)[i]))))), meet: Unfolding(name='meet', decl=meet, args=[i!2837, j!2838], body=Interval(R.max(lo(i!2837), lo(j!2838)),          min(hi(i!2837), hi(j!2838))), ax=|= ForAll([i, j],        meet(i, j) ==        Interval(R.max(lo(i), lo(j)), min(hi(i), hi(j)))), _subst_fun_body=Interval(R.max(lo(Var(0)), lo(Var(1))),          min(hi(Var(0)), hi(Var(1))))), mid: Unfolding(name='mid', decl=mid, args=[i!2851], body=(lo(i!2851) + hi(i!2851))/2, ax=|= ForAll(i, mid(i) == (lo(i) + hi(i))/2), _subst_fun_body=(lo(Var(0)) + hi(Var(0)))/2), midp: Unfolding(name='midp', decl=midp, args=[p!2794, q!2795], body=Vec2.smul(1/2, Vec2.add(p!2794, q!2795)), ax=|= ForAll([p, q], midp(p, q) == Vec2.smul(1/2, Vec2.add(p, q))), _subst_fun_body=Vec2.smul(1/2, Vec2.add(Var(0), Var(1)))), min: Unfolding(name='min', decl=min, args=[x!631, y!632], body=If(x!631 <= y!632, x!631, y!632), ax=|= ForAll([x, y], min(x, y) == If(x <= y, x, y)), _subst_fun_body=If(Var(0) <= Var(1), Var(0), Var(1))), mu: Unfolding(name='mu', decl=mu, args=[A!2363], body=mu_iter(A!2363, 0), ax=|= ForAll(A, mu(A) == mu_iter(A, 0)), _subst_fun_body=mu_iter(Var(0), 0)), mu_iter: Unfolding(name='mu_iter', decl=mu_iter, args=[A!2361, n!2362], body=If(A!2361[n!2362], n!2362, mu_iter(A!2361, n!2362 + 1)), ax=|= ForAll([A, n],        mu_iter(A, n) == If(A[n], n, mu_iter(A, n + 1))), _subst_fun_body=If(Var(0)[Var(1)], Var(1), mu_iter(Var(0), Var(1) + 1))), mul: Unfolding(name='mul', decl=mul, args=[x!533, y!534], body=x!533*y!534, ax=|= ForAll([x, y], mul(x, y) == x*y), _subst_fun_body=Var(0)*Var(1)), nand1: Unfolding(name='nand1', decl=nand1, args=[x!4865, y!4866], body=~(x!4865 & y!4866), ax=|= ForAll([x, y], nand1(x, y) == ~(x & y)), _subst_fun_body=~(Var(0) & Var(1))), nand2: Unfolding(name='nand2', decl=nand2, args=[x!4880, y!4881], body=Concat(nand1(Extract(1, 1, x!4880), Extract(1, 1, y!4881)),        nand1(Extract(0, 0, x!4880), Extract(0, 0, y!4881))), ax=|= ForAll([x, y],        nand2(x, y) ==        Concat(nand1(Extract(1, 1, x), Extract(1, 1, y)),               nand1(Extract(0, 0, x), Extract(0, 0, y)))), _subst_fun_body=Concat(nand1(Extract(1, 1, Var(0)), Extract(1, 1, Var(1))),        nand1(Extract(0, 0, Var(0)), Extract(0, 0, Var(1))))), nand2step: Unfolding(name='nand2step', decl=nand2step, args=[st!1999], body=If(rom(st!1999)[pc(st!1999)] >> 15 == 0,    Nand2State(pc(st!1999) + 1,               rom(st!1999),               ram(st!1999),               D(st!1999),               rom(st!1999)[pc(st!1999)]),    Nand2State(If(If(rom(st!1999)[pc(st!1999)] & 7 == 0,                     False,                     If(rom(st!1999)[pc(st!1999)] & 7 == 1,                        If(rom(st!1999)[pc(st!1999)] >> 6 &                           127 ==                           42,                           0,                           If(rom(st!1999)[pc(st!1999)] >> 6 &                              127 ==                              63,                              1,                              If(rom(st!1999)[pc(st!1999)] >>                                 6 &                                 127 ==                                 58,                                 65535,                                 If(rom(st!1999)[pc(st!1999)] >>                                    6 &                                    127 ==                                    12,                                    D(st!1999),                                    If(rom(st!1999)[pc(st!1999)] >>                                       6 &                                       127 ==                                       48,                                       A(st!1999),                                       If(rom(st!1999)[pc(st!1999)] >>                                         6 &                                         127 ==                                         112,                                         rom(st!1999)[A(st!1999)],                                         If(rom(st!1999)[pc(st!1999)] >>                                         6 &                                         127 ==                                         13,                                         ~D(st!1999),                                         If(rom(st!1999)[pc(st!1999)] >>                                         6 &                                         127 ==                                         49,                                         ~A(st!1999),                                         If(rom(st!1999)[pc(st!1999)] >>                                         6 &                                         127 ==                                         113,                                         ~rom(st!1999)[A(st!1999)],                                         If(rom(...)[pc(...)] >>                                         6 &                                         127 ==                                         15,                                         -D(st!1999),                                         If(...[...] >> 6 &                                         127 ==                                         51,                                         -A(st!1999),                                         If(... >> ... & 127 ==                                         115,                                         -rom(...)[A(...)],                                         If(... & ... == 31,                                         D(...) + 1,                                         If(... == ...,                                         ... + ...,                                         If(..., ..., ...))))))))))))))) >                        0,                        If(rom(st!1999)[pc(st!1999)] & 7 == 2,                           If(rom(st!1999)[pc(st!1999)] >> 6 &                              127 ==                              42,                              0,                              If(rom(st!1999)[pc(st!1999)] >>                                 6 &                                 127 ==                                 63,                                 1,                                 If(rom(st!1999)[pc(st!1999)] >>                                    6 &                                    127 ==                                    58,                                    65535,                                    If(rom(st!1999)[pc(st!1999)] >>                                       6 &                                       127 ==                                       12,                                       D(st!1999),                                       If(rom(st!1999)[pc(st!1999)] >>                                         6 &                                         127 ==                                         48,                                         A(st!1999),                                         If(rom(st!1999)[pc(st!1999)] >>                                         6 &                                         127 ==                                         112,                                         rom(st!1999)[A(st!1999)],                                         If(rom(st!1999)[pc(st!1999)] >>                                         6 &                                         127 ==                                         13,                                         ~D(st!1999),                                         If(rom(st!1999)[pc(st!1999)] >>                                         6 &                                         127 ==                                         49,                                         ~A(st!1999),                                         If(rom(...)[pc(...)] >>                                         6 &                                         127 ==                                         113,                                         ~rom(st!1999)[A(st!1999)],                                         If(...[...] >> 6 &                                         127 ==                                         15,                                         -D(st!1999),                                         If(... >> ... & 127 ==                                         51,                                         -A(st!1999),                                         If(... & ... == 115,                                         -...[...],                                         If(... == ...,                                         ... + ...,                                         If(..., ..., ...)))))))))))))) ==                           0,                           If(rom(st!1999)[pc(st!1999)] & 7 ==                              3,                              If(rom(st!1999)[pc(st!1999)] >>                                 6 &                                 127 ==                                 42,                                 0,                                 If(rom(st!1999)[pc(st!1999)] >>                                    6 &                                    127 ==                                    63,                                    1,                                    If(rom(st!1999)[pc(st!1999)] >>                                       6 &                                       127 ==                                       58,                                       65535,                                       If(rom(st!1999)[pc(st!1999)] >>                                         6 &                                         127 ==                                         12,                                         D(st!1999),                                         If(rom(st!1999)[pc(st!1999)] >>                                         6 &                                         127 ==                                         48,                                         A(st!1999),                                         If(rom(st!1999)[pc(st!1999)] >>                                         6 &                                         127 ==                                         112,                                         rom(st!1999)[A(st!1999)],                                         If(rom(st!1999)[pc(st!1999)] >>                                         6 &                                         127 ==                                         13,                                         ~D(st!1999),                                         If(rom(...)[pc(...)] >>                                         6 &                                         127 ==                                         49,                                         ~A(st!1999),                                         If(...[...] >> 6 &                                         127 ==                                         113,                                         ~rom(st!1999)[A(st!1999)],                                         If(... >> ... & 127 ==                                         15,                                         -D(st!1999),                                         If(... & ... == 51,                                         -A(...),                                         If(... == ...,                                         -...,                                         If(..., ..., ...))))))))))))) >=                              0,                              If(rom(st!1999)[pc(st!1999)] &                                 7 ==                                 4,                                 If(rom(st!1999)[pc(st!1999)] >>                                    6 &                                    127 ==                                    42,                                    0,                                    If(rom(st!1999)[pc(st!1999)] >>                                       6 &                                       127 ==                                       63,                                       1,                                       If(rom(st!1999)[pc(st!1999)] >>                                         6 &                                         127 ==                                         58, ..., ax=|= ForAll(st,        nand2step(st) ==        If(rom(st)[pc(st)] >> 15 == 0,           Nand2State(pc(st) + 1,                      rom(st),                      ram(st),                      D(st),                      rom(st)[pc(st)]),           Nand2State(If(If(rom(st)[pc(st)] & 7 == 0,                            False,                            If(rom(st)[pc(st)] & 7 == 1,                               If(rom(st)[pc(st)] >> 6 & 127 ==                                  42,                                  0,                                  If(rom(st)[pc(st)] >> 6 &                                     127 ==                                     63,                                     1,                                     If(rom(st)[pc(st)] >> 6 &                                        127 ==                                        58,                                        65535,                                        If(rom(st)[pc(st)] >>                                         6 &                                         127 ==                                         12,                                         D(st),                                         If(rom(st)[pc(st)] >>                                         6 &                                         127 ==                                         48,                                         A(st),                                         If(rom(st)[pc(st)] >>                                         6 &                                         127 ==                                         112,                                         rom(st)[A(st)],                                         If(rom(st)[pc(st)] >>                                         6 &                                         127 ==                                         13,                                         ~D(st),                                         If(rom(...)[pc(...)] >>                                         6 &                                         127 ==                                         49,                                         ~A(st),                                         If(...[...] >> 6 &                                         127 ==                                         113,                                         ~rom(st)[A(st)],                                         If(... >> ... & 127 ==                                         15,                                         -D(st),                                         If(... & ... == 51,                                         -A(...),                                         If(... == ...,                                         -...,                                         If(..., ..., ...))))))))))))) >                               0,                               If(rom(st)[pc(st)] & 7 == 2,                                  If(rom(st)[pc(st)] >> 6 &                                     127 ==                                     42,                                     0,                                     If(rom(st)[pc(st)] >> 6 &                                        127 ==                                        63,                                        1,                                        If(rom(st)[pc(st)] >>                                         6 &                                         127 ==                                         58,                                         65535,                                         If(rom(st)[pc(st)] >>                                         6 &                                         127 ==                                         12,                                         D(st),                                         If(rom(st)[pc(st)] >>                                         6 &                                         127 ==                                         48,                                         A(st),                                         If(rom(st)[pc(st)] >>                                         6 &                                         127 ==                                         112,                                         rom(st)[A(st)],                                         If(rom(...)[pc(...)] >>                                         6 &                                         127 ==                                         13,                                         ~D(st),                                         If(...[...] >> 6 &                                         127 ==                                         49,                                         ~A(st),                                         If(... >> ... & 127 ==                                         113,                                         ~rom(...)[A(...)],                                         If(... & ... == 15,                                         -D(...),                                         If(... == ...,                                         -...,                                         If(..., ..., ...)))))))))))) ==                                  0,                                  If(rom(st)[pc(st)] & 7 == 3,                                     If(rom(st)[pc(st)] >> 6 &                                        127 ==                                        42,                                        0,                                        If(rom(st)[pc(st)] >>                                         6 &                                         127 ==                                         63,                                         1,                                         If(rom(st)[pc(st)] >>                                         6 &                                         127 ==                                         58,                                         65535,                                         If(rom(st)[pc(st)] >>                                         6 &                                         127 ==                                         12,                                         D(st),                                         If(rom(st)[pc(st)] >>                                         6 &                                         127 ==                                         48,                                         A(st),                                         If(rom(...)[pc(...)] >>                                         6 &                                         127 ==                                         112,                                         rom(st)[A(st)],                                         If(...[...] >> 6 &                                         127 ==                                         13,                                         ~D(st),                                         If(... >> ... & 127 ==                                         49,                                         ~A(st),                                         If(... & ... == 113,                                         ~...[...],                                         If(... == ...,                                         -...,                                         If(..., ..., ...))))))))))) >=                                     0,                                     If(rom(st)[pc(st)] & 7 ==                                        4,                                        If(rom(st)[pc(st)] >>                                         6 &                                         127 ==                                         42,                                         0,                                         If(rom(st)[pc(st)] >>                                         6 &                                         127 ==                                         63,                                         1,                                         If(rom(st)[pc(st)] >>                                         6 &                                         127 ==                                         58,                                         65535,                                         If(rom(st)[pc(st)] >>                                         6 &                                         127 ==                                         12,                                         D(st),                                         If(rom(...)[pc(...)] >>                                         6 &                                         127 ==                                         48,                                         A(st),                                         If(...[...] >> 6 &                                         127 ==                                         112,                                         rom(st)[A(st)],                                         If(... >> ... & 127 ==                                         13,                                         ~D(st),                                         If(... & ... == 49,                                         ~A(...),                                         If(... == ...,                                         ~...,                                         If(..., ..., ...)))))))))) <                                        0,                                        If(rom(st)[pc(st)] &                                         7 ==                                         5,                                         If(rom(st)[pc(st)] >>                                         6 &                                         127 ==                                         42,                                         0,                                         If(rom(st)[pc(st)] >>                                         6 & ..., _subst_fun_body=If(rom(Var(0))[pc(Var(0))] >> 15 == 0,    Nand2State(pc(Var(0)) + 1,               rom(Var(0)),               ram(Var(0)),               D(Var(0)),               rom(Var(0))[pc(Var(0))]),    Nand2State(If(If(rom(Var(0))[pc(Var(0))] & 7 == 0,                     False,                     If(rom(Var(0))[pc(Var(0))] & 7 == 1,                        If(rom(Var(0))[pc(Var(0))] >> 6 & 127 ==                           42,                           0,                           If(rom(Var(0))[pc(Var(0))] >> 6 &                              127 ==                              63,                              1,                              If(rom(Var(0))[pc(Var(0))] >> 6 &                                 127 ==                                 58,                                 65535,                                 If(rom(Var(0))[pc(Var(0))] >>                                    6 &                                    127 ==                                    12,                                    D(Var(0)),                                    If(rom(Var(0))[pc(Var(0))] >>                                       6 &                                       127 ==                                       48,                                       A(Var(0)),                                       If(rom(Var(0))[pc(Var(0))] >>                                         6 &                                         127 ==                                         112,                                         rom(Var(0))[A(Var(0))],                                         If(rom(Var(0))[pc(Var(0))] >>                                         6 &                                         127 ==                                         13,                                         ~D(Var(0)),                                         If(rom(Var(0))[pc(Var(0))] >>                                         6 &                                         127 ==                                         49,                                         ~A(Var(0)),                                         If(rom(Var(0))[pc(Var(0))] >>                                         6 &                                         127 ==                                         113,                                         ~rom(Var(0))[A(Var(0))],                                         If(rom(...)[pc(...)] >>                                         6 &                                         127 ==                                         15,                                         -D(Var(0)),                                         If(...[...] >> 6 &                                         127 ==                                         51,                                         -A(Var(0)),                                         If(... >> ... & 127 ==                                         115,                                         -rom(...)[A(...)],                                         If(... & ... == 31,                                         D(...) + 1,                                         If(... == ...,                                         ... + ...,                                         If(..., ..., ...))))))))))))))) >                        0,                        If(rom(Var(0))[pc(Var(0))] & 7 == 2,                           If(rom(Var(0))[pc(Var(0))] >> 6 &                              127 ==                              42,                              0,                              If(rom(Var(0))[pc(Var(0))] >> 6 &                                 127 ==                                 63,                                 1,                                 If(rom(Var(0))[pc(Var(0))] >>                                    6 &                                    127 ==                                    58,                                    65535,                                    If(rom(Var(0))[pc(Var(0))] >>                                       6 &                                       127 ==                                       12,                                       D(Var(0)),                                       If(rom(Var(0))[pc(Var(0))] >>                                         6 &                                         127 ==                                         48,                                         A(Var(0)),                                         If(rom(Var(0))[pc(Var(0))] >>                                         6 &                                         127 ==                                         112,                                         rom(Var(0))[A(Var(0))],                                         If(rom(Var(0))[pc(Var(0))] >>                                         6 &                                         127 ==                                         13,                                         ~D(Var(0)),                                         If(rom(Var(0))[pc(Var(0))] >>                                         6 &                                         127 ==                                         49,                                         ~A(Var(0)),                                         If(rom(...)[pc(...)] >>                                         6 &                                         127 ==                                         113,                                         ~rom(Var(0))[A(Var(0))],                                         If(...[...] >> 6 &                                         127 ==                                         15,                                         -D(Var(0)),                                         If(... >> ... & 127 ==                                         51,                                         -A(Var(0)),                                         If(... & ... == 115,                                         -...[...],                                         If(... == ...,                                         ... + ...,                                         If(..., ..., ...)))))))))))))) ==                           0,                           If(rom(Var(0))[pc(Var(0))] & 7 ==                              3,                              If(rom(Var(0))[pc(Var(0))] >> 6 &                                 127 ==                                 42,                                 0,                                 If(rom(Var(0))[pc(Var(0))] >>                                    6 &                                    127 ==                                    63,                                    1,                                    If(rom(Var(0))[pc(Var(0))] >>                                       6 &                                       127 ==                                       58,                                       65535,                                       If(rom(Var(0))[pc(Var(0))] >>                                         6 &                                         127 ==                                         12,                                         D(Var(0)),                                         If(rom(Var(0))[pc(Var(0))] >>                                         6 &                                         127 ==                                         48,                                         A(Var(0)),                                         If(rom(Var(0))[pc(Var(0))] >>                                         6 &                                         127 ==                                         112,                                         rom(Var(0))[A(Var(0))],                                         If(rom(Var(0))[pc(Var(0))] >>                                         6 &                                         127 ==                                         13,                                         ~D(Var(0)),                                         If(rom(...)[pc(...)] >>                                         6 &                                         127 ==                                         49,                                         ~A(Var(0)),                                         If(...[...] >> 6 &                                         127 ==                                         113,                                         ~rom(Var(0))[A(Var(0))],                                         If(... >> ... & 127 ==                                         15,                                         -D(Var(0)),                                         If(... & ... == 51,                                         -A(...),                                         If(... == ...,                                         -...,                                         If(..., ..., ...))))))))))))) >=                              0,                              If(rom(Var(0))[pc(Var(0))] & 7 ==                                 4,                                 If(rom(Var(0))[pc(Var(0))] >>                                    6 &                                    127 ==                                    42,                                    0,                                    If(rom(Var(0))[pc(Var(0))] >>                                       6 &                                       127 ==                                       63,                                       1,                                       If(rom(Var(0))[pc(Var(0))] >>                                         6 &                                         127 ==                                         58,                                         65535,                                         If(rom(Var(0))[pc(Var(0))] >>                                         6 &                                         127 ==                                         12, ...), natpair: Unfolding(name='natpair', decl=natpair, args=[n!437, m!438], body=((n!437 + m!438)*(n!437 + m!438 + 1))/2 + m!438, ax=|= ForAll([n!381, m!398],        natpair(n!381, m!398) ==        ((n!381 + m!398)*(n!381 + m!398 + 1))/2 + m!398), _subst_fun_body=((Var(0) + Var(1))*(Var(0) + Var(1) + 1))/2 + Var(1)), natpair_to_tuple: Unfolding(name='natpair_to_tuple', decl=natpair_to_tuple, args=[k!447], body=If(k!447 < 0,    Tuple_Int_Int(-1, -1),    If(k!447 == 0,       Tuple_Int_Int(0, 0),       If(_0(natpair_to_tuple(k!447 - 1)) == 0,          Tuple_Int_Int(_1(natpair_to_tuple(k!447 - 1)) + 1,                        0),          Tuple_Int_Int(_0(natpair_to_tuple(k!447 - 1)) - 1,                        _1(natpair_to_tuple(k!447 - 1)) + 1)))), ax=|= ForAll(k!382,        natpair_to_tuple(k!382) ==        If(k!382 < 0,           Tuple_Int_Int(-1, -1),           If(k!382 == 0,              Tuple_Int_Int(0, 0),              If(_0(natpair_to_tuple(k!382 - 1)) == 0,                 Tuple_Int_Int(_1(natpair_to_tuple(k!382 - 1)) +                               1,                               0),                 Tuple_Int_Int(_0(natpair_to_tuple(k!382 - 1)) -                               1,                               _1(natpair_to_tuple(k!382 - 1)) +                               1))))), _subst_fun_body=If(Var(0) < 0,    Tuple_Int_Int(-1, -1),    If(Var(0) == 0,       Tuple_Int_Int(0, 0),       If(_0(natpair_to_tuple(Var(0) - 1)) == 0,          Tuple_Int_Int(_1(natpair_to_tuple(Var(0) - 1)) + 1,                        0),          Tuple_Int_Int(_0(natpair_to_tuple(Var(0) - 1)) - 1,                        _1(natpair_to_tuple(Var(0) - 1)) + 1))))), nested: Unfolding(name='nested', decl=nested, args=[An!1153], body=ForAll(n,        Implies(n >= 0, subset(An!1153[n + 1], An!1153[n]))), ax=|= ForAll(An,        nested(An) ==        (ForAll(n, Implies(n >= 0, subset(An[n + 1], An[n]))))), _subst_fun_body=ForAll(n, Implies(n >= 0, subset(Var(1)[n + 1], Var(1)[n])))), next: Unfolding(name='next', decl=next, args=[p!2431], body=T_Bool(Lambda(t!2430, val(p!2431)[t!2430 + 1])), ax=|= ForAll(p,        next(p) == T_Bool(Lambda(t!2430, val(p)[t!2430 + 1]))), _subst_fun_body=T_Bool(Lambda(t!2430, val(Var(1))[t!2430 + 1]))), nonneg: Unfolding(name='nonneg', decl=nonneg, args=[x!609], body=absR(x!609) == x!609, ax=|= ForAll(x, nonneg(x) == (absR(x) == x)), _subst_fun_body=absR(Var(0)) == Var(0)), not1: Unfolding(name='not1', decl=not1, args=[x!4867], body=nand1(x!4867, x!4867), ax=|= ForAll(x, not1(x) == nand1(x, x)), _subst_fun_body=nand1(Var(0), Var(0))), not2: Unfolding(name='not2', decl=not2, args=[x!4882], body=Concat(not1(Extract(1, 1, x!4882)),        not1(Extract(0, 0, x!4882))), ax=|= ForAll(x,        not2(x) ==        Concat(not1(Extract(1, 1, x)),               not1(Extract(0, 0, x)))), _subst_fun_body=Concat(not1(Extract(1, 1, Var(0))),        not1(Extract(0, 0, Var(0))))), odd: Unfolding(name='odd', decl=odd, args=[x!352], body=Exists(y, x!352 == 2*y + 1), ax=|= ForAll(x, odd(x) == (Exists(y, x == 2*y + 1))), _subst_fun_body=Exists(y, Var(1) == 2*y + 1)), one: Unfolding(name='one', decl=one, args=[], body=1, ax=|= one == 1, _subst_fun_body=1), ones: Unfolding(name='ones', decl=ones, args=[n!2924], body=NDArray(Unit(n!2924), K(Int, 1)), ax=|= ForAll(n, ones(n) == NDArray(Unit(n), K(Int, 1))), _subst_fun_body=NDArray(Unit(Var(0)), K(Int, 1))), or1: Unfolding(name='or1', decl=or1, args=[x!4875, y!4876], body=nand1(not1(x!4875), not1(y!4876)), ax=|= ForAll([x, y], or1(x, y) == nand1(not1(x), not1(y))), _subst_fun_body=nand1(not1(Var(0)), not1(Var(1)))), or2: Unfolding(name='or2', decl=or2, args=[x!4890, y!4891], body=Concat(or1(Extract(1, 1, x!4890), Extract(1, 1, y!4891)),        or1(Extract(0, 0, x!4890), Extract(0, 0, y!4891))), ax=|= ForAll([x, y],        or2(x, y) ==        Concat(or1(Extract(1, 1, x), Extract(1, 1, y)),               or1(Extract(0, 0, x), Extract(0, 0, y)))), _subst_fun_body=Concat(or1(Extract(1, 1, Var(0)), Extract(1, 1, Var(1))),        or1(Extract(0, 0, Var(0)), Extract(0, 0, Var(1))))), pair: Unfolding(name='pair', decl=pair, args=[n!459], body=from_nat(natpair(to_nat(n!459), to_nat(m!398))), ax=|= ForAll(n!381,        pair(n!381) ==        from_nat(natpair(to_nat(n!381), to_nat(m!398)))), _subst_fun_body=from_nat(natpair(to_nat(Var(0)), to_nat(m!398)))), pair: Unfolding(name='pair', decl=pair, args=[a!3378, b!3379], body=upair(ZF.sing(a!3378), upair(a!3378, b!3379)), ax=|= ForAll([a!2993, b!2994],        pair(a!2993, b!2994) ==        upair(ZF.sing(a!2993), upair(a!2993, b!2994))), _subst_fun_body=upair(ZF.sing(Var(0)), upair(Var(0), Var(1)))), perp: Unfolding(name='perp', decl=perp, args=[u!2969, v!2970], body=Vec3.dot(u!2969, v!2970) == 0, ax=|= ForAll([u, v], perp(u, v) == (Vec3.dot(u, v) == 0)), _subst_fun_body=Vec3.dot(Var(0), Var(1)) == 0), pick: Unfolding(name='pick', decl=pick, args=[a!3016], body=f!3015(a!3016), ax=|= ForAll(a!2993, pick(a!2993) == f!3015(a!2993)), _subst_fun_body=f!3015(Var(0))), point: Unfolding(name='point', decl=point, args=[p!2747], body=Store(K(Vec2, False), p!2747, True), ax=|= ForAll(p, point(p) == Store(K(Vec2, False), p, True)), _subst_fun_body=Store(K(Vec2, False), Var(0), True)), pos: Unfolding(name='pos', decl=pos, args=[a!1358], body=Lambda(i, If(i >= 0, a!1358[i], 0)), ax=|= ForAll(a, pos(a) == (Lambda(i, If(i >= 0, a[i], 0)))), _subst_fun_body=Lambda(i, If(i >= 0, Var(1)[i], 0))), pow: Unfolding(name='pow', decl=pow, args=[x!683, y!684], body=x!683**y!684, ax=|= ForAll([x, y], pow(x, y) == x**y), _subst_fun_body=Var(0)**Var(1)), powers: Unfolding(name='powers', decl=powers, args=[x!1846], body=Lambda(i,        If(i == 0,           1,           If(i < 0,              powers(x!1846)[i + 1]/x!1846,              x!1846*powers(x!1846)[i - 1]))), ax=|= ForAll(x,        powers(x) ==        (Lambda(i,                If(i == 0,                   1,                   If(i < 0,                      powers(x)[i + 1]/x,                      x*powers(x)[i - 1]))))), _subst_fun_body=Lambda(i,        If(i == 0,           1,           If(i < 0,              powers(Var(1))[i + 1]/Var(1),              Var(1)*powers(Var(1))[i - 1])))), pownat: Unfolding(name='pownat', decl=pownat, args=[x!692, n!693], body=If(n!693 == 0,    1,    If(n!693 > 0,       x!692*pownat(x!692, n!693 - 1),       pownat(x!692, n!693 + 1)/x!692)), ax=|= ForAll([x, n],        pownat(x, n) ==        If(n == 0,           1,           If(n > 0, x*pownat(x, n - 1), pownat(x, n + 1)/x))), _subst_fun_body=If(Var(1) == 0,    1,    If(Var(1) > 0,       Var(0)*pownat(Var(0), Var(1) - 1),       pownat(Var(0), Var(1) + 1)/Var(0)))), prime: Unfolding(name='prime', decl=prime, args=[n!377], body=And(n!377 > 1,     Not(Exists([p, q], And(p > 1, q > 1, n!377 == p*q)))), ax=|= ForAll(n,        prime(n) ==        And(n > 1,            Not(Exists([p, q], And(p > 1, q > 1, n == p*q))))), _subst_fun_body=And(Var(0) > 1,     Not(Exists([p, q], And(p > 1, q > 1, Var(2) == p*q))))), prod: Unfolding(name='prod', decl=prod, args=[A!3434, B!3435], body=sep(pow(pow(union(A!3434, B!3435))),     Lambda(p!2997,            Exists([x, y],                   And(And(∈(x, A!3434), ∈(y, B!3435)),                       p!2997 == pair(x, y))))), ax=|= ForAll([A, B],        prod(A, B) ==        sep(pow(pow(union(A, B))),            Lambda(p!2997,                   Exists([x, y],                          And(And(∈(x, A), ∈(y, B)),                              p!2997 == pair(x, y)))))), _subst_fun_body=sep(pow(pow(union(Var(0), Var(1)))),     Lambda(p!2997,            Exists([x, y],                   And(And(∈(x, Var(3)), ∈(y, Var(4))),                       p!2997 == pair(x, y)))))), ran: Unfolding(name='ran', decl=ran, args=[R!3504], body=sep(bigunion(bigunion(R!3504)),     Lambda(y, Exists(x, ∈(pair(x, y), R!3504)))), ax=|= ForAll(R,        ran(R) ==        sep(bigunion(bigunion(R)),            Lambda(y, Exists(x, ∈(pair(x, y), R))))), _subst_fun_body=sep(bigunion(bigunion(Var(0))),     Lambda(y, Exists(x, ∈(pair(x, y), Var(2)))))), ray: Unfolding(name='ray', decl=ray, args=[p!2815, q!2816], body=Lambda(a,        And(collinear(p!2815, q!2816, a),            Vec2.dot(Vec2.sub(q!2816, p!2815),                     Vec2.sub(a, p!2815)) >=            0)), ax=|= ForAll([p, q],        ray(p, q) ==        (Lambda(a,                And(collinear(p, q, a),                    Vec2.dot(Vec2.sub(q, p), Vec2.sub(a, p)) >=                    0)))), _subst_fun_body=Lambda(a,        And(collinear(Var(1), Var(2), a),            Vec2.dot(Vec2.sub(Var(2), Var(1)),                     Vec2.sub(a, Var(1))) >=            0))), reflects: Unfolding(name='reflects', decl=reflects, args=[P!2999, A!3000], body=ForAll(x, ∈(x, A!3000) == P!2999[x]), ax=|= ForAll([P, A],        reflects(P, A) == (ForAll(x, ∈(x, A) == P[x]))), _subst_fun_body=ForAll(x, ∈(x, Var(2)) == Var(1)[x])), riemann_sum: Unfolding(name='riemann_sum', decl=riemann_sum, args=[f!4130, xs!4131, ts!4132, n!4133], body=finsum(Lambda(i,               f!4130[ts!4132[i]]*               (xs!4131[i + 1] - xs!4131[i])),        n!4133), ax=|= ForAll([f, xs, ts, n],        riemann_sum(f, xs, ts, n) ==        finsum(Lambda(i, f[ts[i]]*(xs[i + 1] - xs[i])), n)), _subst_fun_body=finsum(Lambda(i,               Var(1)[Var(3)[i]]*(Var(2)[i + 1] - Var(2)[i])),        Var(3))), rseq.abs: Unfolding(name='rseq.abs', decl=rseq.abs, args=[a!1555], body=Map(absR, a!1555), ax=|= ForAll(a, rseq.abs(a) == Map(absR, a)), _subst_fun_body=Map(absR, Var(0))), rseq.cos: Unfolding(name='rseq.cos', decl=rseq.cos, args=[a!1554], body=Map(Real.cos, a!1554), ax=|= ForAll(a, rseq.cos(a) == Map(Real.cos, a)), _subst_fun_body=Map(Real.cos, Var(0))), rseq.dot: Unfolding(name='rseq.dot', decl=rseq.dot, args=[n!1520, a!1521, b!1522], body=finsum((Array Int Real).mul(a!1521, b!1522), n!1520), ax=|= ForAll([n, a, b],        rseq.dot(n, a, b) ==        finsum((Array Int Real).mul(a, b), n)), _subst_fun_body=finsum((Array Int Real).mul(Var(1), Var(2)), Var(0))), rseq.outer: Unfolding(name='rseq.outer', decl=rseq.outer, args=[a!1550, b!1551], body=Lambda([i, j], a!1550[i]*b!1551[j]), ax=|= ForAll([a, b],        rseq.outer(a, b) == (Lambda([i, j], a[i]*b[j]))), _subst_fun_body=Lambda([i, j], Var(2)[i]*Var(3)[j])), rseq.sin: Unfolding(name='rseq.sin', decl=rseq.sin, args=[a!1553], body=Map(Real.sin, a!1553), ax=|= ForAll(a, rseq.sin(a) == Map(Real.sin, a)), _subst_fun_body=Map(Real.sin, Var(0))), safe_pred: Unfolding(name='safe_pred', decl=safe_pred, args=[n!460], body=If(is(Z, n!460), Z, pred(n!460)), ax=|= ForAll(n, safe_pred(n) == If(is(Z, n), Z, pred(n))), _subst_fun_body=If(is(Z, Var(0)), Z, pred(Var(0)))), search: Unfolding(name='search', decl=search, args=[P!413, n!414], body=If(P!413[n!414],    n!414,    If(P!413[-n!414], -n!414, If(P!413[n!414 + 1], 1, 0))), ax=|= ForAll([P, n!381],        search(P, n!381) ==        If(P[n!381],           n!381,           If(P[-n!381], -n!381, If(P[n!381 + 1], 1, 0)))), _subst_fun_body=If(Var(0)[Var(1)],    Var(1),    If(Var(0)[-Var(1)],       -Var(1),       If(Var(0)[Var(1) + 1], 1, 0)))), sgn: Unfolding(name='sgn', decl=sgn, args=[x!546], body=If(x!546 > 0, 1, If(x!546 < 0, -1, 0)), ax=|= ForAll(x, sgn(x) == If(x > 0, 1, If(x < 0, -1, 0))), _subst_fun_body=If(Var(0) > 0, 1, If(Var(0) < 0, -1, 0))), shift: Unfolding(name='shift', decl=shift, args=[A!1149, c!1150], body=Lambda(x, A!1149[x - c!1150]), ax=|= ForAll([A, c], shift(A, c) == (Lambda(x, A[x - c]))), _subst_fun_body=Lambda(x, Var(1)[x - Var(2)])), snd: Unfolding(name='snd', decl=snd, args=[p!3382], body=If(ZF.sing(ZF.sing(fst(p!3382))) == p!3382,    fst(p!3382),    pick(ZFSet.sub(bigunion(p!3382), ZF.sing(fst(p!3382))))), ax=|= ForAll(p!2997,        snd(p!2997) ==        If(ZF.sing(ZF.sing(fst(p!2997))) == p!2997,           fst(p!2997),           pick(ZFSet.sub(bigunion(p!2997),                          ZF.sing(fst(p!2997)))))), _subst_fun_body=If(ZF.sing(ZF.sing(fst(Var(0)))) == Var(0),    fst(Var(0)),    pick(ZFSet.sub(bigunion(Var(0)), ZF.sing(fst(Var(0))))))), sub: Unfolding(name='sub', decl=sub, args=[x!529, y!530], body=x!529 - y!530, ax=|= ForAll([x, y], sub(x, y) == x - y), _subst_fun_body=Var(0) - Var(1)), tan: Unfolding(name='tan', decl=tan, args=[x!756], body=Real.sin(x!756)/Real.cos(x!756), ax=|= ForAll(x, tan(x) == Real.sin(x)/Real.cos(x)), _subst_fun_body=Real.sin(Var(0))/Real.cos(Var(0))), tand: Unfolding(name='tand', decl=tand, args=[p!2416, q!2417], body=T_Bool(Lambda(t!2415,               And(val(p!2416)[t!2415], val(q!2417)[t!2415]))), ax=|= ForAll([p, q],        tand(p, q) ==        T_Bool(Lambda(t!2415,                      And(val(p)[t!2415], val(q)[t!2415])))), _subst_fun_body=T_Bool(Lambda(t!2415,               And(val(Var(1))[t!2415], val(Var(2))[t!2415])))), temp.valid: Unfolding(name='temp.valid', decl=temp.valid, args=[p!2435], body=val(p!2435)[0], ax=|= ForAll(p, temp.valid(p) == val(p)[0]), _subst_fun_body=val(Var(0))[0]), timpl: Unfolding(name='timpl', decl=timpl, args=[p!2422, q!2423], body=T_Bool(Lambda(t!2421,               Implies(val(p!2422)[t!2421],                       val(q!2423)[t!2421]))), ax=|= ForAll([p, q],        timpl(p, q) ==        T_Bool(Lambda(t!2421,                      Implies(val(p)[t!2421], val(q)[t!2421])))), _subst_fun_body=T_Bool(Lambda(t!2421,               Implies(val(Var(1))[t!2421],                       val(Var(2))[t!2421])))), tint: Unfolding(name='tint', decl=tint, args=[x!2467], body=T_Int(K(Int, x!2467)), ax=|= ForAll(x, tint(x) == T_Int(K(Int, x))), _subst_fun_body=T_Int(K(Int, Var(0)))), tnot: Unfolding(name='tnot', decl=tnot, args=[p!2414], body=T_Bool(Lambda(t!2413, Not(val(p!2414)[t!2413]))), ax=|= ForAll(p,        tnot(p) ==        T_Bool(Lambda(t!2413, Not(val(p)[t!2413])))), _subst_fun_body=T_Bool(Lambda(t!2413, Not(val(Var(1))[t!2413])))), to_int: Unfolding(name='to_int', decl=to_int, args=[n!462], body=If(is(Z, n!462), 0, 1 + to_int(pred(n!462))), ax=|= ForAll(n, to_int(n) == If(is(Z, n), 0, 1 + to_int(pred(n)))), _subst_fun_body=If(is(Z, Var(0)), 0, 1 + to_int(pred(Var(0))))), to_nat: Unfolding(name='to_nat', decl=to_nat, args=[n!429], body=If(n!429 >= 0, n!429*2, n!429*-2 - 1), ax=|= ForAll(n!381,        to_nat(n!381) ==        If(n!381 >= 0, n!381*2, n!381*-2 - 1)), _subst_fun_body=If(Var(0) >= 0, Var(0)*2, Var(0)*-2 - 1)), tor: Unfolding(name='tor', decl=tor, args=[p!2419, q!2420], body=T_Bool(Lambda(t!2418,               Or(val(p!2419)[t!2418], val(q!2420)[t!2418]))), ax=|= ForAll([p, q],        tor(p, q) ==        T_Bool(Lambda(t!2418,                      Or(val(p)[t!2418], val(q)[t!2418])))), _subst_fun_body=T_Bool(Lambda(t!2418,               Or(val(Var(1))[t!2418], val(Var(2))[t!2418])))), union: Unfolding(name='union', decl=union, args=[A!3090, B!3091], body=bigunion(upair(A!3090, B!3091)), ax=|= ForAll([A, B], union(A, B) == bigunion(upair(A, B))), _subst_fun_body=bigunion(upair(Var(0), Var(1)))), upper_bound: Unfolding(name='upper_bound', decl=upper_bound, args=[A!2634, x!2635], body=ForAll(y, Implies(A!2634[y], EReal.le(y, x!2635))), ax=|= ForAll([A, x],        upper_bound(A, x) ==        (ForAll(y, Implies(A[y], EReal.le(y, x))))), _subst_fun_body=ForAll(y, Implies(Var(1)[y], EReal.le(y, Var(2))))), valid: Unfolding(name='valid', decl=valid, args=[a!2371], body=ForAll(w, val(a!2371)[w]), ax=|= ForAll(a, valid(a) == (ForAll(w, val(a)[w]))), _subst_fun_body=ForAll(w, val(Var(1))[w])), where: Unfolding(name='where', decl=where, args=[mask!1352, a!1353, b!1354], body=Lambda(i, If(mask!1352[i], a!1353[i], b!1354[i])), ax=|= ForAll([mask, a, b],        where(mask, a, b) ==        (Lambda(i, If(mask[i], a[i], b[i])))), _subst_fun_body=Lambda(i, If(Var(1)[i], Var(2)[i], Var(3)[i]))), width: Unfolding(name='width', decl=width, args=[i!2850], body=hi(i!2850) - lo(i!2850), ax=|= ForAll(i, width(i) == hi(i) - lo(i)), _subst_fun_body=hi(Var(0)) - lo(Var(0))), zero: Unfolding(name='zero', decl=zero, args=[n!2923], body=NDArray(Unit(n!2923), K(Int, 0)), ax=|= ForAll(n, zero(n) == NDArray(Unit(n), K(Int, 0))), _subst_fun_body=NDArray(Unit(Var(0)), K(Int, 0))), zf.false: Unfolding(name='zf.false', decl=zf.false, args=[], body=∅, ax=|= zf.false == ∅, _subst_fun_body=∅), zf.succ: Unfolding(name='zf.succ', decl=zf.succ, args=[x!3505], body=union(x!3505, ZF.sing(x!3505)), ax=|= ForAll(x, zf.succ(x) == union(x, ZF.sing(x))), _subst_fun_body=union(Var(0), ZF.sing(Var(0)))), zf.true: Unfolding(name='zf.true', decl=zf.true, args=[], body=ZF.sing(∅), ax=|= zf.true == ZF.sing(∅), _subst_fun_body=ZF.sing(∅)), zf.zero: Unfolding(name='zf.zero', decl=zf.zero, args=[], body=∅, ax=|= zf.zero == ∅, _subst_fun_body=∅)}

defn holds definitional axioms for function symbols.

kdrag.kernel.ext(domain: Sequence[SortRef], range_: SortRef) → Proof
>>> ext([smt.IntSort()], smt.IntSort())
|= ForAll([f, g], (f == g) == (ForAll(x0, f[x0] == g[x0])))
>>> ext([smt.IntSort(), smt.RealSort()], smt.IntSort())
|= ForAll([f, g],
       (f == g) ==
       (ForAll([x0, x1],
               Select(f, x0, x1) == Select(g, x0, x1))))
Parameters:
  • domain (Sequence[SortRef])

  • range_ (SortRef)

Return type:

Proof

kdrag.kernel.forget(ts: Sequence[ExprRef], thm: QuantifierRef) → Proof

“Forget” a term using existentials. This is existential introduction. P(ts) -> exists xs, P(xs) thm is an existential formula, and ts are terms to substitute those variables with. forget easily follows. https://en.wikipedia.org/wiki/Existential_generalization

Parameters:
  • ts (Sequence[ExprRef])

  • thm (QuantifierRef)

Return type:

Proof

kdrag.kernel.free_vars(e: ExprRef) → set[ExprRef]

Get an overapproximation of free variables in a term. This is used for skolemization.

>>> x,y = smt.Ints("x y")
>>> z = FreshVar("z", smt.IntSort())
>>> assert z in free_vars(x + y + z)
Parameters:

e (ExprRef)

Return type:

set[ExprRef]

kdrag.kernel.fresh_const(q: QuantifierRef, prefixes=None) → list[ExprRef]

Generate fresh constants of same sort as quantifier.

Parameters:

q (QuantifierRef)

Return type:

list[ExprRef]

kdrag.kernel.generalize(vs: list[ExprRef], pf: Proof) → Proof

Generalize a theorem with respect to a list of schema variables. This introduces a universal quantifier for schema variables.

>>> x = FreshVar("x", smt.IntSort())
>>> y = FreshVar("y", smt.IntSort())
>>> generalize([x, y], prove(x == x))
|= ForAll([x!..., y!...], x!... == x!...)
Parameters:
  • vs (list[ExprRef])

  • pf (Proof)

Return type:

Proof

kdrag.kernel.herb(thm: QuantifierRef, prefixes=None) → tuple[list[ExprRef], Proof]

Herbrandize a theorem. It is sufficient to prove a theorem for fresh consts to prove a universal. Note: Perhaps lambdaized form is better? Return vars and lamda that could receive |= P[vars]

>>> x = smt.Int("x")
>>> herb(smt.ForAll([x], x >= x))
([x!...], |=  Implies(x!... >= x!..., ForAll(x, x >= x)))
Parameters:

thm (QuantifierRef)

Return type:

tuple[list[ExprRef], Proof]

kdrag.kernel.induct_inductive(x: DatatypeRef, P: QuantifierRef) → Proof

Build a basic induction principle for an algebraic datatype

Parameters:
  • x (DatatypeRef)

  • P (QuantifierRef)

Return type:

Proof

kdrag.kernel.instan(ts: Sequence[ExprRef], pf: Proof) → Proof

Instantiate a universally quantified formula. This is forall elimination

Parameters:
  • ts (Sequence[ExprRef])

  • pf (Proof)

Return type:

Proof

kdrag.kernel.is_declared(e: ExprRef | FuncDeclRef) → bool
Parameters:

e (ExprRef | FuncDeclRef)

Return type:

bool

kdrag.kernel.is_defined(x: ExprRef) → bool

Determined if expression head is in definitions.

Parameters:

x (ExprRef)

Return type:

bool

kdrag.kernel.is_fresh_var(v: ExprRef) → bool

Check if a variable is a schema variable. Schema variables are generated by FreshVar and have a _FreshVarEvidence attribute.

>>> is_fresh_var(FreshVar("x", smt.IntSort()))
True
Parameters:

v (ExprRef)

Return type:

bool

kdrag.kernel.is_proof(p: Proof) → bool
Parameters:

p (Proof)

Return type:

bool

kdrag.kernel.make_unfolding(pf: Proof) → Unfolding

Take an axiom of the form |= forall x0 x1 …, xn, f(x0, x1, …, xn) = body and return a Defn object for f. Unfolding judgments can be used with unfold_defns.

>>> x,y,z = smt.Ints("x y z")
>>> pf = kd.prove(smt.ForAll([x,y], x + y == y + x + 0)) # has shape of definition, but not "definitional"
>>> defn = make_unfolding(pf)
>>> unfold_defns(z + 42, [defn])
(42 + z + 0, |= z + 42 == 42 + z + 0)
Parameters:

pf (Proof)

Return type:

Unfolding

kdrag.kernel.modus(ab: Proof, a: Proof) → Proof

Modus ponens for implies and equality.

>>> a,b = smt.Bools("a b")
>>> ab = axiom(smt.Implies(a, b))
>>> a = axiom(a)
>>> modus(ab, a)
|= b
>>> ab1 = axiom(smt.Eq(a.thm, b))
>>> modus(ab1, a)
|= b
Parameters:
Return type:

Proof

kdrag.kernel.obtain(thm: QuantifierRef) → tuple[list[ExprRef], Proof]

Skolemize an existential quantifier. exists xs, P(xs) -> P(cs) for fresh cs https://en.wikipedia.org/wiki/Existential_instantiation

>>> x = smt.Int("x")
>>> obtain(smt.Exists([x], x >= 0))
([x!...], |=  Implies(Exists(x, x >= 0), x!... >= 0))
>>> y = FreshVar("y", smt.IntSort())
>>> obtain(smt.Exists([x], x >= y))
([f!...(y!...)], |=  Implies(Exists(x, x >= y!...), f!...(y!...) >= y!...))
Parameters:

thm (QuantifierRef)

Return type:

tuple[list[ExprRef], Proof]

kdrag.kernel.open_binder(lam: QuantifierRef) → tuple[list[ExprRef], ExprRef]

Open a quantifier with fresh variables. This achieves the locally nameless representation https://chargueraud.org/research/2009/ln/main.pdf where it is harder to go wrong.

The variables are schema variables which when used in a proof may be generalized

>>> x = smt.Int("x")
>>> open_binder(smt.ForAll([x], x > 0))
([x!...], x!... > 0)
Parameters:

lam (QuantifierRef)

Return type:

tuple[list[ExprRef], ExprRef]

kdrag.kernel.prove(thm: BoolRef, by: Proof | Iterable[Proof] = [], admit=False, timeout=1000, dump=False, solver: str | Callable[[], Any] | None = None, fvs=frozenset({})) → Proof

Prove a theorem using a list of previously proved lemmas.

In essence prove(Implies(by, thm)).

Parameters:
  • thm (smt.BoolRef) – The theorem to prove.

  • thm – The theorem to prove.

  • by (list[Proof]) – A list of previously proved lemmas.

  • admit (bool) – If True, admit the theorem without proof.

  • solver (str | Callable[[], Any] | None) – A solver factory or “z3”, “cvc5”, “vampire”, “eprover”. None uses the configured default.

Returns:

A proof object of thm

Return type:

Proof

>>> prove(smt.BoolVal(True))
|= True
>>> prove(smt.RealVal(1) >= smt.RealVal(0))
|= 1 >= 0
kdrag.kernel.register_definition(defn: Unfolding)

Can register other unfoldings besides those generated by define. This may be useful to get unfolding for objects constructed in roundabout ays.

Parameters:

defn (Unfolding)

kdrag.kernel.rename_vars2(pf: Proof, vs: list[ExprRef], patterns=[], no_patterns=[]) → Proof

Rename bound variables and also attach triggers

>>> x,y = smt.Ints("x y")
>>> f = smt.Function("f", smt.IntSort(), smt.IntSort())
>>> rename_vars2(kd.prove(smt.ForAll([x, y], x + 1 > x)), [y,x], patterns=[x+y])
|= ForAll([y, x], y + 1 > y)
>>> rename_vars2(kd.prove(smt.Exists([x], x + 1 > y)), [y])
Traceback (most recent call last):
    ...
ValueError: ('Cannot rename vars to ones that already occur in term', [y], Exists(x, x + 1 > y))
Parameters:
  • pf (Proof)

  • vs (list[ExprRef])

Return type:

Proof

kdrag.kernel.specialize(ts: Sequence[ExprRef], thm: BoolRef) → Proof

Instantiate a universally quantified formula forall xs, P(xs) -> P(ts) This is forall elimination

Parameters:
  • ts (Sequence[ExprRef])

  • thm (BoolRef)

Return type:

Proof

kdrag.kernel.subst(t: ExprRef, eqs: Sequence[Proof]) → tuple[ExprRef, Proof]

Substitute using equality proofs

>>> x, y = smt.Ints("x y")
>>> eq = kd.prove(x == ((x + 1) - 1))
>>> subst(x + 3, [eq])
(x + 1 - 1 + 3, |= x + 3 == x + 1 - 1 + 3)
Parameters:
  • t (ExprRef)

  • eqs (Sequence[Proof])

Return type:

tuple[ExprRef, Proof]

kdrag.kernel.trigger(pf: Proof, patterns: list[ExprRef] = [], no_patterns: list[ExprRef] = []) → Proof

Add e-matching triggers to a quantified proof. Logically speaking, does nothing.

>>> x,y = smt.Ints("x y")
>>> p = kd.prove(smt.ForAll([x,y], y > 0, x + y > x))
>>> p.thm.num_patterns()
0
>>> p2 = trigger(p, patterns=[x + y])
>>> p2
|= ForAll([x, y], Implies(y > 0, x + y > x))
>>> p2.thm.pattern(0)
Var(1) + Var(0)
Parameters:
  • pf (Proof)

  • patterns (list[ExprRef])

  • no_patterns (list[ExprRef])

Return type:

Proof

kdrag.kernel.unfold(e: ExprRef, decls: Sequence[FuncDeclRef]) → tuple[ExprRef, Proof]

Unfold function definitions in an expression.

>>> x,y = smt.Ints("x y")
>>> f = define("f", [x,y], x + 2*y)
>>> g = define("g", [x,y], f(x,y) + 1)
>>> unfold(f(42,13) + g(7,8), [f])
(42 + 2*13 + g(7, 8), |= f(42, 13) + g(7, 8) == 42 + 2*13 + g(7, 8))
>>> unfold(f(42,13) + g(7,8), [f,g])
(42 + 2*13 + f(7, 8) + 1, |= f(42, 13) + g(7, 8) == 42 + 2*13 + f(7, 8) + 1)
Parameters:
  • e (ExprRef)

  • decls (Sequence[FuncDeclRef])

Return type:

tuple[ExprRef, Proof]

kdrag.kernel.unfold_defns(e: ExprRef, defns: Sequence[Unfolding]) → tuple[ExprRef, Proof]

Unfold definitions in an expression.

Parameters:
Return type:

tuple[ExprRef, Proof]

kdrag.kernel.weaken(pf: Proof, fvs: Sequence[ExprRef]) → Proof
Parameters:
  • pf (Proof)

  • fvs (Sequence[ExprRef])

Return type:

Proof