Code
Hub
Workspaces
Following
Trending
Connect
MCP
copy
Create free account
hub
/
github.com/BasisResearch/lean.py
/ functions
Functions
2,559 in github.com/BasisResearch/lean.py
⨍
Functions
2,559
◇
Types & classes
336
↓ 3 callers
Function
lean_ptr_tag
(self, o)
lean_py/_runtime.py:343
↓ 3 callers
Function
mk_eq
(lhs, rhs)
examples/05_knuckledragger/python/main.py:53
↓ 3 callers
Function
mk_eq
(lhs, rhs)
examples/04_sympy_tactic/python/main.py:58
↓ 3 callers
Method
model
(self)
lean_py/z3/solver.py:596
↓ 3 callers
Function
name_to_str
Walk a ``Lean.Name`` ADT (anonymous / str / num) to a dot-separated string.
examples/04_sympy_tactic/python/lean_to_sympy.py:32
↓ 3 callers
Method
numerator
(self)
lean_py/z3/core.py:582
↓ 3 callers
Method
params
Return parameters of this expression (e.g. bit-width for Extract).
lean_py/z3/core.py:361
↓ 3 callers
Method
reset
(self)
lean_py/z3/solver.py:637
↓ 3 callers
Method
resolve_expr
Convert an S-expression to an ExprRef.
lean_py/z3/smt2.py:188
↓ 3 callers
Method
sexpr
S-expression representation of this sort.
lean_py/z3/core.py:169
↓ 3 callers
Function
shared_lib_extension
()
lean_py/utils.py:58
↓ 3 callers
Function
sympy_eq_check
Check if ``simplify(lhs - rhs) == 0``.
examples/04_sympy_tactic/python/lean_to_sympy.py:192
↓ 3 callers
Method
var_name
Return the name of the i-th bound variable.
lean_py/z3/core.py:839
↓ 3 callers
Function
verify
(fn)
examples/06_effectful_verifier/python/main.py:31
↓ 2 callers
Function
AllChar
Regex matching any single character.
lean_py/z3/core.py:2444
↓ 2 callers
Function
At
Character at index i as a single-char string.
lean_py/z3/core.py:4256
↓ 2 callers
Function
AtLeast
At least k of the boolean args are true.
lean_py/z3/core.py:2107
↓ 2 callers
Function
BVMulNoOverflow
Check that a * b does not overflow.
lean_py/z3/core.py:2037
↓ 2 callers
Function
BVSubNoUnderflow
Check that a - b does not underflow.
lean_py/z3/core.py:2021
↓ 2 callers
Function
Empty
Empty sequence / set.
lean_py/z3/core.py:3923
↓ 2 callers
Function
FreshReal
Create a fresh real constant.
lean_py/z3/core.py:2172
↓ 2 callers
Function
InRe
String membership in regex.
lean_py/z3/core.py:2439
↓ 2 callers
Function
IsSubset
Check if a is a subset of b.
lean_py/z3/core.py:3686
↓ 2 callers
Function
Loop
Bounded repetition.
lean_py/z3/core.py:2434
↓ 2 callers
Function
MultiPattern
Quantifier multi-pattern.
lean_py/z3/core.py:4072
↓ 2 callers
Function
Option
Zero or one.
lean_py/z3/core.py:2399
↓ 2 callers
Function
OrElse
Try first, fall back to subsequent tactics on failure.
lean_py/z3/tactic.py:185
↓ 2 callers
Function
ParOr
Parallel-or — try all tactics in parallel, return first success. Since we run sequentially, this is equivalent to OrElse.
lean_py/z3/tactic.py:209
↓ 2 callers
Function
ParThen
Parallel-then — apply t1, then t2 to each subgoal in parallel. Since we run sequentially, this is equivalent to Then.
lean_py/z3/tactic.py:217
↓ 2 callers
Function
RealVector
Create a vector of ``sz`` real variables.
lean_py/z3/core.py:1737
↓ 2 callers
Function
RecFunction
Declare a recursive function.
lean_py/z3/core.py:4035
↓ 2 callers
Function
Repeat
Apply tactic repeatedly until fixed point.
lean_py/z3/tactic.py:190
↓ 2 callers
Function
RoundNearestTiesToAway
(ctx: Context | None = None)
lean_py/z3/core.py:3309
↓ 2 callers
Function
RoundTowardNegative
(ctx: Context | None = None)
lean_py/z3/core.py:3325
↓ 2 callers
Function
RoundTowardPositive
(ctx: Context | None = None)
lean_py/z3/core.py:3317
↓ 2 callers
Function
RoundTowardZero
(ctx: Context | None = None)
lean_py/z3/core.py:3333
↓ 2 callers
Function
SetDifference
Set difference: a \\ b.
lean_py/z3/core.py:3681
↓ 2 callers
Function
SetUnion
Set union via lambda.
lean_py/z3/core.py:3638
↓ 2 callers
Function
Sqrt
Square root (represented as a^(1/2)).
lean_py/z3/core.py:1908
↓ 2 callers
Function
Then
Sequential composition — apply each tactic in order.
lean_py/z3/tactic.py:180
↓ 2 callers
Function
Var
Create a de Bruijn indexed variable. Since lean.py uses named variables, this creates a variable named ``__db_<idx>`` with the given sort.
lean_py/z3/core.py:4050
↓ 2 callers
Method
__add__
(self, other: Any)
lean_py/z3/core.py:3161
↓ 2 callers
Method
__mul__
(self, other: Any)
lean_py/z3/core.py:3170
↓ 2 callers
Method
_abstract
Wrap *expr* in ForAll over declared vars that appear in it.
lean_py/z3/solver.py:896
↓ 2 callers
Method
_build_io_exception
Decode an `IO.Error` ctor pointer into a typed exception. For `userError` — the most common, used by every `LeanPy.Python.*` bridge f
lean_py/marshal.py:1142
↓ 2 callers
Method
_call_string_export
(self, name: str)
lean_py/library.py:525
↓ 2 callers
Function
_child_expr
Wrap a child AST node as an ExprRef with best-effort sort inference.
lean_py/z3/core.py:2848
↓ 2 callers
Method
_ctor_field_layout
Compute the ABI memory layout for a constructor's fields. Uses each field wrapper's ``ctor_scalar_size`` to classify fields as pointe
lean_py/marshal.py:479
↓ 2 callers
Function
_ctype_for_call
(ct)
lean_py/library.py:217
↓ 2 callers
Method
_decode_inductive
(self, ti: TypeInfo, ptr: Any)
lean_py/marshal.py:525
↓ 2 callers
Function
_extract_func_params
(func_decl: c_ast.FuncDecl)
lean_py/_parse.py:235
↓ 2 callers
Function
_is_literal
True for ground literal AST nodes (no variables/operations).
lean_py/z3/core.py:108
↓ 2 callers
Method
_lean_string_to_py
Decode a Lean string object pointer into a Python str.
lean_py/marshal.py:442
↓ 2 callers
Function
_leanpy_git_rev
Git rev for the LeanPy Lake dependency when pip-installed. Resolution order: LEANPY_GIT_REV env var, then the commit hash from direct_url.jso
lean_py/project.py:78
↓ 2 callers
Function
_make_expr_handler
Build an effectful handler that maps Term ops → Lean.Expr builders. *depth* is the number of forallE binders above the expression scope. Vari
examples/06_effectful_verifier/python/refine.py:123
↓ 2 callers
Function
_make_struct
Create a ctypes Structure subclass dynamically.
lean_py/_runtime.py:180
↓ 2 callers
Function
_marshal_expr
Convert a Python ASTNode to a Lean Z3Expr value.
lean_py/z3/solver.py:223
↓ 2 callers
Method
_opaque_wrapper
A wrapper for any Lean type that we can't introspect (Py, kernel `GoalState`, anything not in the `derive_python` registry). Python s
lean_py/marshal.py:1071
↓ 2 callers
Function
_unop
(op)
examples/05_knuckledragger/python/lean_to_z3.py:94
↓ 2 callers
Function
_unop
Return a builder for a unary operation (last 1 arg).
examples/04_sympy_tactic/python/lean_to_sympy.py:89
↓ 2 callers
Function
_unwrap_toreal
Unwrap a ToRealNode wrapper, if present.
lean_py/z3/core.py:2571
↓ 2 callers
Function
_wrap_free_vars
Wrap the expression AST in ForAll nodes for its free variables. Sorts free vars: Type vars first, arrows (functions) second, values last.
lean_py/z3/solver.py:461
↓ 2 callers
Method
accessor
(self, i: int, j: int)
lean_py/z3/core.py:211
↓ 2 callers
Method
add
(self, *args: BoolRef)
lean_py/z3/solver.py:813
↓ 2 callers
Method
body
Return the body of the quantifier.
lean_py/z3/core.py:825
↓ 2 callers
Method
children
Return list of all children of this expression.
lean_py/z3/core.py:348
↓ 2 callers
Method
collect_sorrys
Extract all `sorry` placeholders in ``source`` as a draftable :class:`GoalState`. Returns ``(state, message)`` — state is ``None`` if
lean_py/kernel.py:388
↓ 2 callers
Method
constructor
(self, i: int)
lean_py/z3/core.py:205
↓ 2 callers
Method
decide
Returns ``"true"`` / ``"false"`` / ``"<undecided>"`` / ``"<elab: ...>"`` etc.
lean_py/kernel.py:334
↓ 2 callers
Method
decode_lean_obj
Decode a ``LeanObj`` (raw ``lean_object*``) as a registered inductive. This is the entry point for Path B (tactic): Lean wraps an ``Expr``
lean_py/marshal.py:621
↓ 2 callers
Method
find_type
(self, name: str)
lean_py/registry.py:224
↓ 2 callers
Function
fpIsNegative
(a: FPRef, ctx: Context | None = None)
lean_py/z3/core.py:3449
↓ 2 callers
Function
fpIsPositive
(a: FPRef, ctx: Context | None = None)
lean_py/z3/core.py:3453
↓ 2 callers
Function
fpMax
(a: FPRef, b: FPRef, ctx: Context | None = None)
lean_py/z3/core.py:3403
↓ 2 callers
Function
fpMin
(a: FPRef, b: FPRef, ctx: Context | None = None)
lean_py/z3/core.py:3399
↓ 2 callers
Function
fpUnsignedToFP
(rm: FPRMRef, a: ExprRef, sort: FPSortRef, ctx: Context | None = None)
lean_py/z3/core.py:3510
↓ 2 callers
Function
get_ctx
Return ctx if not None, else main context.
lean_py/z3/core.py:3035
↓ 2 callers
Function
get_ffi_class
Get the dynamically created LeanFFI class.
lean_py/_runtime.py:757
↓ 2 callers
Function
get_main_globals
LeanPy/native/python_bridge.c:733
↓ 2 callers
Function
get_var_index
Get de Bruijn index of a bound variable.
lean_py/z3/core.py:4059
↓ 2 callers
Function
get_version_string
Return version string.
lean_py/z3/core.py:4350
↓ 2 callers
Method
goal_create_expr
Create a new goal state from a ``Lean.Expr`` object. Raises ``LeanError`` on type-check failure.
lean_py/kernel.py:347
↓ 2 callers
Method
instantiate_all
(self, src: str)
lean_py/kernel.py:403
↓ 2 callers
Method
isInf
(self)
lean_py/z3/core.py:3211
↓ 2 callers
Method
isNaN
(self)
lean_py/z3/core.py:3206
↓ 2 callers
Function
is_add
(a: ExprRef)
lean_py/z3/core.py:2522
↓ 2 callers
Function
is_bv_value
True if a is a concrete bitvector literal.
lean_py/z3/core.py:2592
↓ 2 callers
Function
is_div
(a: ExprRef)
lean_py/z3/core.py:2534
↓ 2 callers
Method
is_exists
(self)
lean_py/z3/core.py:832
↓ 2 callers
Method
is_forall
(self)
lean_py/z3/core.py:829
↓ 2 callers
Function
is_fp
(a: object)
lean_py/z3/core.py:4102
↓ 2 callers
Function
is_fp_value
(a: object)
lean_py/z3/core.py:4110
↓ 2 callers
Function
is_fprm
(a: object)
lean_py/z3/core.py:4106
↓ 2 callers
Function
is_func_decl
True if a is a function declaration.
lean_py/z3/core.py:2561
↓ 2 callers
Function
is_idiv
True for integer division.
lean_py/z3/core.py:2617
↓ 2 callers
Method
is_int
(self)
lean_py/z3/core.py:512
↓ 2 callers
Function
is_le
(a: ExprRef)
lean_py/z3/core.py:2597
↓ 2 callers
Function
is_mod
(a: ExprRef)
lean_py/z3/core.py:2613
↓ 2 callers
Function
is_mul
(a: ExprRef)
lean_py/z3/core.py:2526
↓ 2 callers
Method
is_ok
Check if result is Ok.
lean_py/lean_types.py:92
← previous
next →
301–400 of 2,559, ranked by callers