Lean2Js.HelperSem
The semantics of the fragment the runtime helpers are written in #
The semantics of the fragment the runtime helpers are written in.
What this model assumes about JavaScript #
Everything the helpers borrow from the platform is in prim, method, binOp, field and index
below, and nowhere else. Each is defined only where a helper actually reaches for it and is stuck
elsewhere, so an assumption that is never used cannot be smuggled in.
Three of them are worth stating out loud.
- An iterator is the array of its elements.
d.keys()yields the keys andArray.fromon an array is the identity, soArray.from(d.keys())is the list of keys. The model does not distinguish an iterator from the array it produces, because nothing in the fragment can observe the difference. - A number prints in decimal.
String(n)falls back to exponent notation at 1e21, so the model answers only inside the Int53 range, which is below it. - A quotient is truncated before anything looks at it.
/on two numbers yieldsquot a b, which onlyMath.truncaccepts. Real JavaScript computes a double there; the truncation agrees with exact integer division whenever the numerator is below 2^53, which the one caller (__u32div) guarantees.__i53divgoes throughBigIntprecisely because it cannot.
=== on objects, arrays and maps is false, matching JsSem.arith: this model has no references. The
one helper that compares non-scalars with === is __eq, whose structural path returns the same answer
the reference path would. Functions are the exception: a value of a function type is a reference to a
top-level function, so === on two of them is decided by the name, and __eq has no structural path to
fall back on.
Lean2Js.HelperSem.Val
sourceThe values the fragment computes with: the ones JsSem has, plus the ones only hand-written code
meets — null and undefined reach __ck from the caller, and a function value reaches __map.
Instances For
Used by
Lean2Js.HelperSem.instInhabitedVal
sourceEquations
Used by
Lean2Js.HelperSem.Env
sourceEquations
Instances For
Used by
Lean2Js.HelperSem.Res
sourcestuck is the model declining to answer: a shape no helper produces. It is not an error the
generated code can observe, and a theorem about a helper has to rule it out rather than accept it.
Instances For
Used by
Lean2Js.HelperSem.instInhabitedRes
sourceEquations
Used by
Lean2Js.HelperSem.Res.bind
sourceEquations
Instances For
Used by
Lean2Js.HelperSem.instMonadRes
sourceEquations
- One or more equations did not get rendered due to their size.
Used by
Values #
Lean2Js.HelperSem.ofJs
sourceEquations
- Lean2Js.HelperSem.ofJs (Lean2Js.Js.JsValue.num i) = Lean2Js.HelperSem.Val.num i
- Lean2Js.HelperSem.ofJs (Lean2Js.Js.JsValue.bigint i) = Lean2Js.HelperSem.Val.bigint i
- Lean2Js.HelperSem.ofJs (Lean2Js.Js.JsValue.str s) = Lean2Js.HelperSem.Val.str s
- Lean2Js.HelperSem.ofJs (Lean2Js.Js.JsValue.bool b) = Lean2Js.HelperSem.Val.bool b
- Lean2Js.HelperSem.ofJs (Lean2Js.Js.JsValue.obj fields) = Lean2Js.HelperSem.Val.obj (Lean2Js.HelperSem.ofJsFields fields)
- Lean2Js.HelperSem.ofJs (Lean2Js.Js.JsValue.arr xs) = Lean2Js.HelperSem.Val.arr (Lean2Js.HelperSem.ofJsList xs)
- Lean2Js.HelperSem.ofJs (Lean2Js.Js.JsValue.dict entries) = Lean2Js.HelperSem.Val.dict (Lean2Js.HelperSem.ofJsFields entries)
- Lean2Js.HelperSem.ofJs (Lean2Js.Js.JsValue.fn name) = Lean2Js.HelperSem.Val.fnRef name
Instances For
Used by
Lean2Js.HelperSem.ofJsList
sourceEquations
Instances For
Used by
Lean2Js.HelperSem.ofJsFields
sourceEquations
Instances For
Used by
Lean2Js.HelperSem.typeOf
sourceEquations
- Lean2Js.HelperSem.typeOf (Lean2Js.HelperSem.Val.num i) = "number"
- Lean2Js.HelperSem.typeOf (Lean2Js.HelperSem.Val.quot num den) = "number"
- Lean2Js.HelperSem.typeOf (Lean2Js.HelperSem.Val.bigint i) = "bigint"
- Lean2Js.HelperSem.typeOf (Lean2Js.HelperSem.Val.str s) = "string"
- Lean2Js.HelperSem.typeOf (Lean2Js.HelperSem.Val.bool b) = "boolean"
- Lean2Js.HelperSem.typeOf (Lean2Js.HelperSem.Val.obj fields) = "object"
- Lean2Js.HelperSem.typeOf (Lean2Js.HelperSem.Val.arr xs) = "object"
- Lean2Js.HelperSem.typeOf (Lean2Js.HelperSem.Val.dict entries) = "object"
- Lean2Js.HelperSem.typeOf Lean2Js.HelperSem.Val.null = "object"
- Lean2Js.HelperSem.typeOf (Lean2Js.HelperSem.Val.fnRef name) = "function"
- Lean2Js.HelperSem.typeOf (Lean2Js.HelperSem.Val.lam params body env) = "function"
- Lean2Js.HelperSem.typeOf (Lean2Js.HelperSem.Val.ext i) = "function"
- Lean2Js.HelperSem.typeOf Lean2Js.HelperSem.Val.undef = "undefined"
Instances For
Used by
Lean2Js.HelperSem.strictEq
source===. Across two types it is always false, so a number never equals a bigint. Two references to
the same top-level function are the same object, so those compare by name; the model has no other
references, and the values that carry one compare as unequal here.
Equations
- Lean2Js.HelperSem.strictEq (Lean2Js.HelperSem.Val.num a) (Lean2Js.HelperSem.Val.num b) = (a == b)
- Lean2Js.HelperSem.strictEq (Lean2Js.HelperSem.Val.bigint a) (Lean2Js.HelperSem.Val.bigint b) = (a == b)
- Lean2Js.HelperSem.strictEq (Lean2Js.HelperSem.Val.str a) (Lean2Js.HelperSem.Val.str b) = (a == b)
- Lean2Js.HelperSem.strictEq (Lean2Js.HelperSem.Val.bool a) (Lean2Js.HelperSem.Val.bool b) = (a == b)
- Lean2Js.HelperSem.strictEq Lean2Js.HelperSem.Val.null Lean2Js.HelperSem.Val.null = true
- Lean2Js.HelperSem.strictEq Lean2Js.HelperSem.Val.undef Lean2Js.HelperSem.Val.undef = true
- Lean2Js.HelperSem.strictEq (Lean2Js.HelperSem.Val.fnRef a) (Lean2Js.HelperSem.Val.fnRef b) = (a == b)
- Lean2Js.HelperSem.strictEq x✝¹ x✝ = false
Instances For
Used by
What the fragment borrows from JavaScript #
Lean2Js.HelperSem.toInt32
sourceEquations
Instances For
Used by
Lean2Js.HelperSem.imul
sourceMath.imul: both arguments truncated to int32, multiplied, truncated again.
Equations
Instances For
Used by
Lean2Js.HelperSem.keep
sourceEquations
- Lean2Js.HelperSem.keep "<" x✝ = some (x✝ == Ordering.lt)
- Lean2Js.HelperSem.keep "<=" x✝ = some (x✝ != Ordering.gt)
- Lean2Js.HelperSem.keep ">" x✝ = some (x✝ == Ordering.gt)
- Lean2Js.HelperSem.keep ">=" x✝ = some (x✝ != Ordering.lt)
- Lean2Js.HelperSem.keep x✝¹ x✝ = none
Instances For
Used by
Lean2Js.HelperSem.numOf
sourceEquations
Instances For
Used by
Lean2Js.HelperSem.compareOp
sourceComparison. Mixing a number and a bigint is mathematical, the way JS defines it; strings compare by
code point, the assumption JsSem.arith already makes.
Equations
- One or more equations did not get rendered due to their size.
Instances For
Used by
Lean2Js.HelperSem.binOp
sourceEquations
- One or more equations did not get rendered due to their size.
- Lean2Js.HelperSem.binOp "===" a b = Lean2Js.HelperSem.Res.ok (Lean2Js.HelperSem.Val.bool (Lean2Js.HelperSem.strictEq a b))
- Lean2Js.HelperSem.binOp "!==" a b = Lean2Js.HelperSem.Res.ok (Lean2Js.HelperSem.Val.bool !Lean2Js.HelperSem.strictEq a b)
- Lean2Js.HelperSem.binOp "<" a b = Lean2Js.HelperSem.compareOp "<" a b
- Lean2Js.HelperSem.binOp "<=" a b = Lean2Js.HelperSem.compareOp "<=" a b
- Lean2Js.HelperSem.binOp ">" a b = Lean2Js.HelperSem.compareOp ">" a b
- Lean2Js.HelperSem.binOp ">=" a b = Lean2Js.HelperSem.compareOp ">=" a b
- Lean2Js.HelperSem.binOp "+" (Lean2Js.HelperSem.Val.num x) (Lean2Js.HelperSem.Val.num y) = Lean2Js.HelperSem.Res.ok (Lean2Js.HelperSem.Val.num (x + y))
- Lean2Js.HelperSem.binOp "+" (Lean2Js.HelperSem.Val.str x) (Lean2Js.HelperSem.Val.str y) = Lean2Js.HelperSem.Res.ok (Lean2Js.HelperSem.Val.str (x ++ y))
- Lean2Js.HelperSem.binOp "+" (Lean2Js.HelperSem.Val.bigint x) (Lean2Js.HelperSem.Val.bigint y) = Lean2Js.HelperSem.Res.ok (Lean2Js.HelperSem.Val.bigint (x + y))
- Lean2Js.HelperSem.binOp "-" (Lean2Js.HelperSem.Val.num x) (Lean2Js.HelperSem.Val.num y) = Lean2Js.HelperSem.Res.ok (Lean2Js.HelperSem.Val.num (x - y))
- Lean2Js.HelperSem.binOp "*" (Lean2Js.HelperSem.Val.bigint x) (Lean2Js.HelperSem.Val.bigint y) = Lean2Js.HelperSem.Res.ok (Lean2Js.HelperSem.Val.bigint (x * y))
- Lean2Js.HelperSem.binOp "/" (Lean2Js.HelperSem.Val.num x) (Lean2Js.HelperSem.Val.num y) = Lean2Js.HelperSem.Res.ok (Lean2Js.HelperSem.Val.quot x y)
- Lean2Js.HelperSem.binOp ">>>" (Lean2Js.HelperSem.Val.num x) (Lean2Js.HelperSem.Val.num 0) = Lean2Js.HelperSem.Res.ok (Lean2Js.HelperSem.Val.num (Lean2Js.Js.Runtime.u32 x))
- Lean2Js.HelperSem.binOp op a b = Lean2Js.HelperSem.Res.stuck
Instances For
Used by
Lean2Js.HelperSem.mapSet
sourceEquations
- One or more equations did not get rendered due to their size.
Instances For
Used by
Lean2Js.HelperSem.mapSetAll
sourceWhat a Map filled from a list of entries holds: each one set in the order the list carries them.
A later entry under a key an earlier one already took replaces it, at the place the earlier one had.
Equations
- Lean2Js.HelperSem.mapSetAll x✝ [] = x✝
- Lean2Js.HelperSem.mapSetAll x✝ ((k, v) :: rest) = Lean2Js.HelperSem.mapSetAll (Lean2Js.HelperSem.mapSet x✝ k v) rest
Instances For
Used by
Lean2Js.HelperSem.fromPairs
sourceWhat Object.fromEntries builds: the pairs written in order, a later one replacing an earlier one
that carries the same key, which is where it parts company with a plain List.
Equations
- Lean2Js.HelperSem.fromPairs acc [] = some acc
- Lean2Js.HelperSem.fromPairs acc (Lean2Js.HelperSem.Val.arr [Lean2Js.HelperSem.Val.str k, v] :: rest) = Lean2Js.HelperSem.fromPairs (Lean2Js.HelperSem.mapSet acc k v) rest
- Lean2Js.HelperSem.fromPairs acc (head :: tail) = none
Instances For
Used by
Lean2Js.HelperSem.prim
sourceEquations
- One or more equations did not get rendered due to their size.
- Lean2Js.HelperSem.prim "Number.isSafeInteger" [head] = Lean2Js.HelperSem.Res.ok (Lean2Js.HelperSem.Val.bool false)
- Lean2Js.HelperSem.prim "Number.isInteger" [Lean2Js.HelperSem.Val.num i] = Lean2Js.HelperSem.Res.ok (Lean2Js.HelperSem.Val.bool true)
- Lean2Js.HelperSem.prim "Number.isInteger" [head] = Lean2Js.HelperSem.Res.ok (Lean2Js.HelperSem.Val.bool false)
- Lean2Js.HelperSem.prim "Number" [Lean2Js.HelperSem.Val.bigint i] = Lean2Js.HelperSem.Res.ok (Lean2Js.HelperSem.Val.num i)
- Lean2Js.HelperSem.prim "BigInt" [Lean2Js.HelperSem.Val.num i] = Lean2Js.HelperSem.Res.ok (Lean2Js.HelperSem.Val.bigint i)
- Lean2Js.HelperSem.prim "Math.imul" [Lean2Js.HelperSem.Val.num a, Lean2Js.HelperSem.Val.num b] = Lean2Js.HelperSem.Res.ok (Lean2Js.HelperSem.Val.num (Lean2Js.HelperSem.imul a b))
- Lean2Js.HelperSem.prim "Math.trunc" [Lean2Js.HelperSem.Val.quot a b] = if (b == 0) = true then Lean2Js.HelperSem.Res.stuck else Lean2Js.HelperSem.Res.ok (Lean2Js.HelperSem.Val.num (a.tdiv b))
- Lean2Js.HelperSem.prim "Math.trunc" [Lean2Js.HelperSem.Val.num a] = Lean2Js.HelperSem.Res.ok (Lean2Js.HelperSem.Val.num a)
- Lean2Js.HelperSem.prim "Array.from" [Lean2Js.HelperSem.Val.arr xs] = Lean2Js.HelperSem.Res.ok (Lean2Js.HelperSem.Val.arr xs)
- Lean2Js.HelperSem.prim "Array.isArray" [Lean2Js.HelperSem.Val.arr xs] = Lean2Js.HelperSem.Res.ok (Lean2Js.HelperSem.Val.bool true)
- Lean2Js.HelperSem.prim "Array.isArray" [head] = Lean2Js.HelperSem.Res.ok (Lean2Js.HelperSem.Val.bool false)
- Lean2Js.HelperSem.prim name args = Lean2Js.HelperSem.Res.stuck
Instances For
Used by
Lean2Js.HelperSem.lookupV
sourceLooking a key up in an object or a dictionary: the first entry that carries it, undefined when
none does. Duplicate keys are the caller's problem, not this model's — Object.keys and Map both
answer from the first match.
Equations
- One or more equations did not get rendered due to their size.
Instances For
Used by
Lean2Js.HelperSem.joinStrs
sourceEquations
- Lean2Js.HelperSem.joinStrs [] = some ""
- Lean2Js.HelperSem.joinStrs (Lean2Js.HelperSem.Val.str s :: rest) = Option.map (fun (x : String) => s ++ x) (Lean2Js.HelperSem.joinStrs rest)
- Lean2Js.HelperSem.joinStrs x✝ = none
Instances For
Used by
Lean2Js.HelperSem.upperOne
sourceEquations
Instances For
Used by
Lean2Js.HelperSem.lowerOne
sourceEquations
Instances For
Used by
Lean2Js.HelperSem.method
sourceThe methods the helpers call. toUpperCase and toLowerCase are defined only on the single ASCII
letters the callers guard for: the full Unicode mappings are what the helpers exist to avoid.
Equations
- One or more equations did not get rendered due to their size.
- Lean2Js.HelperSem.method (Lean2Js.HelperSem.Val.str s) "startsWith" [Lean2Js.HelperSem.Val.str t] = Lean2Js.HelperSem.Res.ok (Lean2Js.HelperSem.Val.bool (t.toList.isPrefixOf s.toList))
- Lean2Js.HelperSem.method (Lean2Js.HelperSem.Val.dict es) "get" [Lean2Js.HelperSem.Val.str key] = Lean2Js.HelperSem.Res.ok (Lean2Js.HelperSem.lookupV es key)
- Lean2Js.HelperSem.method (Lean2Js.HelperSem.Val.dict es) "values" [] = Lean2Js.HelperSem.Res.ok (Lean2Js.HelperSem.Val.arr (List.map (fun (x : String × Lean2Js.HelperSem.Val) => x.snd) es))
- Lean2Js.HelperSem.method recv name args = Lean2Js.HelperSem.Res.stuck
Instances For
Used by
Lean2Js.HelperSem.field
sourceEquations
- Lean2Js.HelperSem.field (Lean2Js.HelperSem.Val.arr xs) "length" = Lean2Js.HelperSem.Res.ok (Lean2Js.HelperSem.Val.num ↑xs.length)
- Lean2Js.HelperSem.field (Lean2Js.HelperSem.Val.dict es) "size" = Lean2Js.HelperSem.Res.ok (Lean2Js.HelperSem.Val.num ↑es.length)
- Lean2Js.HelperSem.field (Lean2Js.HelperSem.Val.obj fs) name = Lean2Js.HelperSem.Res.ok (Lean2Js.HelperSem.lookupV fs name)
- Lean2Js.HelperSem.field (Lean2Js.HelperSem.Val.arr xs) name = Lean2Js.HelperSem.Res.ok Lean2Js.HelperSem.Val.undef
- Lean2Js.HelperSem.field (Lean2Js.HelperSem.Val.dict entries) name = Lean2Js.HelperSem.Res.ok Lean2Js.HelperSem.Val.undef
- Lean2Js.HelperSem.field recv name = Lean2Js.HelperSem.Res.stuck
Instances For
Used by
Lean2Js.HelperSem.index
sourcex[k] for a string k is x.k, so it reads the same way field does: the helpers index an object
with a key the descriptor carries, and a Map answers such a read out of its prototype rather than out
of its entries.
Equations
- One or more equations did not get rendered due to their size.
- Lean2Js.HelperSem.index recv (Lean2Js.HelperSem.Val.str key) = Lean2Js.HelperSem.field recv key
- Lean2Js.HelperSem.index recv i = Lean2Js.HelperSem.Res.stuck
Instances For
Used by
The evaluator #
Lean2Js.HelperSem.Outcome
sourceWhat a statement list did. A block's own declarations do not escape it, but an assignment to a
binding the block did not make does — restore is what tells the two apart.
Instances For
Used by
Lean2Js.HelperSem.lookup
sourceEquations
- Lean2Js.HelperSem.lookup env name = Option.map (fun (x : String × Lean2Js.HelperSem.Val) => x.snd) (List.find? (fun (x : String × Lean2Js.HelperSem.Val) => x.fst == name) env)
Instances For
Used by
Lean2Js.HelperSem.update
sourceEquations
Instances For
Used by
Lean2Js.HelperSem.restore
sourceEquations
- Lean2Js.HelperSem.restore outer inner = List.map (fun (e : String × Lean2Js.HelperSem.Val) => (e.fst, (Lean2Js.HelperSem.lookup inner e.fst).getD e.snd)) outer
Instances For
Used by
Lean2Js.HelperSem.bindAll
sourceEquations
- Lean2Js.HelperSem.bindAll (n :: ns) (v :: vs) = (n, v) :: Lean2Js.HelperSem.bindAll ns vs
- Lean2Js.HelperSem.bindAll x✝¹ x✝ = []
Instances For
Used by
Lean2Js.HelperSem.Ext
sourceext is how a function the generated code passed in gets called: __map is handed one, and the
model of the generated code decides what it does.
Equations
Instances For
Used by
Lean2Js.HelperSem.evalExpr
sourceEquations
- One or more equations did not get rendered due to their size.
- Lean2Js.HelperSem.evalExpr ext 0 env e = Lean2Js.HelperSem.Res.stuck
- Lean2Js.HelperSem.evalExpr ext f.succ env (Lean2Js.Helper.Expr.num i) = Lean2Js.HelperSem.Res.ok (Lean2Js.HelperSem.Val.num i)
- Lean2Js.HelperSem.evalExpr ext f.succ env (Lean2Js.Helper.Expr.big i) = Lean2Js.HelperSem.Res.ok (Lean2Js.HelperSem.Val.bigint i)
- Lean2Js.HelperSem.evalExpr ext f.succ env (Lean2Js.Helper.Expr.str s) = Lean2Js.HelperSem.Res.ok (Lean2Js.HelperSem.Val.str s)
- Lean2Js.HelperSem.evalExpr ext f.succ env (Lean2Js.Helper.Expr.bool b) = Lean2Js.HelperSem.Res.ok (Lean2Js.HelperSem.Val.bool b)
- Lean2Js.HelperSem.evalExpr ext f.succ env Lean2Js.Helper.Expr.null = Lean2Js.HelperSem.Res.ok Lean2Js.HelperSem.Val.null
- Lean2Js.HelperSem.evalExpr ext f.succ env Lean2Js.Helper.Expr.undef = Lean2Js.HelperSem.Res.ok Lean2Js.HelperSem.Val.undef
- Lean2Js.HelperSem.evalExpr ext f.succ env (Lean2Js.Helper.Expr.call name args) = do let __do_lift ← Lean2Js.HelperSem.evalArgs ext f env args Lean2Js.HelperSem.callDef ext f name __do_lift
- Lean2Js.HelperSem.evalExpr ext f.succ env (Lean2Js.Helper.Expr.prim name args) = do let __do_lift ← Lean2Js.HelperSem.evalArgs ext f env args Lean2Js.HelperSem.prim name __do_lift
- Lean2Js.HelperSem.evalExpr ext f.succ env (Lean2Js.Helper.Expr.new_ "Map" []) = Lean2Js.HelperSem.Res.ok (Lean2Js.HelperSem.Val.dict [])
- Lean2Js.HelperSem.evalExpr ext f.succ env (Lean2Js.Helper.Expr.new_ cls args) = Lean2Js.HelperSem.Res.stuck
- Lean2Js.HelperSem.evalExpr ext f.succ env (recv.field name) = do let __do_lift ← Lean2Js.HelperSem.evalExpr ext f env recv Lean2Js.HelperSem.field __do_lift name
- Lean2Js.HelperSem.evalExpr ext f.succ env (Lean2Js.Helper.Expr.lam params body) = Lean2Js.HelperSem.Res.ok (Lean2Js.HelperSem.Val.lam params body env)
Instances For
Used by
Lean2Js.HelperSem.evalArgs
sourceEquations
- Lean2Js.HelperSem.evalArgs ext 0 env es = Lean2Js.HelperSem.Res.stuck
- Lean2Js.HelperSem.evalArgs ext f.succ env [] = Lean2Js.HelperSem.Res.ok []
- Lean2Js.HelperSem.evalArgs ext f.succ env (e :: rest) = do let v ← Lean2Js.HelperSem.evalExpr ext f env e let vs ← Lean2Js.HelperSem.evalArgs ext f env rest Lean2Js.HelperSem.Res.ok (v :: vs)
Instances For
Used by
Lean2Js.HelperSem.evalStmts
sourceEquations
- One or more equations did not get rendered due to their size.
- Lean2Js.HelperSem.evalStmts ext 0 env ss = Lean2Js.HelperSem.Res.stuck
- Lean2Js.HelperSem.evalStmts ext f.succ env [] = Lean2Js.HelperSem.Res.ok (Lean2Js.HelperSem.Outcome.next env)
- Lean2Js.HelperSem.evalStmts ext f.succ env (Lean2Js.Helper.Stmt.brk :: tail) = Lean2Js.HelperSem.Res.ok (Lean2Js.HelperSem.Outcome.brk env)
Instances For
Used by
Lean2Js.HelperSem.evalFor
sourceEquations
- One or more equations did not get rendered due to their size.
- Lean2Js.HelperSem.evalFor ext 0 env binder xs body = Lean2Js.HelperSem.Res.stuck
- Lean2Js.HelperSem.evalFor ext f.succ env binder [] body = Lean2Js.HelperSem.Res.ok (Lean2Js.HelperSem.Outcome.next env)
Instances For
Used by
Lean2Js.HelperSem.callDef
sourceEquations
- One or more equations did not get rendered due to their size.
- Lean2Js.HelperSem.callDef ext 0 name args = Lean2Js.HelperSem.Res.stuck
Instances For
Used by
Lean2Js.HelperSem.applyVal
sourceEquations
- One or more equations did not get rendered due to their size.
- Lean2Js.HelperSem.applyVal ext 0 fn args = Lean2Js.HelperSem.Res.stuck
- Lean2Js.HelperSem.applyVal ext f.succ (Lean2Js.HelperSem.Val.ext i) args = ext i args
- Lean2Js.HelperSem.applyVal ext f.succ fn args = Lean2Js.HelperSem.Res.stuck
Instances For
Used by
Lean2Js.HelperSem.Eventually
source"With enough fuel". The fuel is the model's device for totality, so a claim about a helper is stated for every large enough amount, the way the claims about the generated code already are.
Instances For
Used by
Lean2Js.HelperSem.Helper.Calls
sourceWhat a helper call means: __name(args) settles on r once the fuel is large enough.
Equations
- Lean2Js.HelperSem.Helper.Calls ext name args r = Lean2Js.HelperSem.Eventually (fun (f : Nat) => Lean2Js.HelperSem.callDef ext f name args) r