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
↓ 10 callers
Function
PrefixOf
Check if pre is a prefix of s.
lean_py/z3/core.py:2301
↓ 10 callers
Function
RealVal
(n: int | float | str)
lean_py/z3/core.py:1143
↓ 10 callers
Function
RotateLeft
Rotate left.
lean_py/z3/core.py:1624
↓ 10 callers
Method
_binop
(self, op: str, other: BitVecRef | int)
lean_py/z3/core.py:634
↓ 10 callers
Function
_bool_to_int
Convert BoolRef to ArithRef via If(b, coeff, 0).
lean_py/z3/core.py:1443
↓ 10 callers
Function
get_lean_ffi
Get a singleton LeanFFI instance.
lean_py/_runtime.py:770
↓ 10 callers
Function
lean_string_cstr
(self, o)
lean_py/_runtime.py:548
↓ 10 callers
Method
parse
Parse the multi-line encoding produced by Lean's ``encodeTacticResult``.
lean_py/kernel.py:56
↓ 10 callers
Method
pop
(self, n: int = 1)
lean_py/z3/solver.py:571
↓ 9 callers
Function
ArraySort
(domain: SortRef, range_sort: SortRef)
lean_py/z3/core.py:273
↓ 9 callers
Function
Contains
Check if s contains t.
lean_py/z3/core.py:2294
↓ 9 callers
Function
StringSort
()
lean_py/z3/core.py:2269
↓ 9 callers
Function
Xor
(a: BoolRef, b: BoolRef)
lean_py/z3/core.py:1345
↓ 9 callers
Function
_ctor_get
The i-th ctor field as a raw lean_object pointer.
lean_py/marshal.py:112
↓ 9 callers
Function
fpLT
(a: FPRef, b: FPRef, ctx: Context | None = None)
lean_py/z3/core.py:3412
↓ 9 callers
Method
from_lake
Load a Lean library from a Lake project directory. Looks for `<lake_dir>/.lake/build/lib/lib<library_name>.<ext>` (or, when `library_
lean_py/library.py:281
↓ 9 callers
Function
lean_dec
(self, o)
lean_py/_runtime.py:410
↓ 9 callers
Method
load
(self, modules: Iterable[str])
lean_py/kernel.py:268
↓ 8 callers
Function
Concat
Concatenate two or more bit-vectors (left-fold).
lean_py/z3/core.py:1556
↓ 8 callers
Function
LShR
Logical (unsigned) shift right.
lean_py/z3/core.py:1495
↓ 8 callers
Function
SuffixOf
Check if suf is a suffix of s.
lean_py/z3/core.py:2308
↓ 8 callers
Function
ULE
Unsigned less-than-or-equal.
lean_py/z3/core.py:1500
↓ 8 callers
Method
assertions
(self)
lean_py/z3/solver.py:601
↓ 8 callers
Function
fpMul
(rm: FPRMRef, a: FPRef, b: FPRef, ctx: Context | None = None)
lean_py/z3/core.py:3371
↓ 8 callers
Function
fpNaN
(sort: FPSortRef, ctx: Context | None = None)
lean_py/z3/core.py:3275
↓ 8 callers
Method
goal_create
Create a new goal state from a type expression string. Raises ``LeanError`` on parse / elaboration failure.
lean_py/kernel.py:341
↓ 8 callers
Method
init_search
(self, sp: str = "")
lean_py/kernel.py:265
↓ 8 callers
Function
is_array
(a: ExprRef)
lean_py/z3/core.py:2482
↓ 8 callers
Function
is_expr
(a: object)
lean_py/z3/core.py:2454
↓ 8 callers
Function
is_true
(a: ExprRef)
lean_py/z3/core.py:2458
↓ 8 callers
Method
mk_const
(self, name: str, levels=None)
examples/06_effectful_verifier/python/expr_builder.py:37
↓ 8 callers
Method
push
(self, v: Any)
lean_py/z3/core.py:3053
↓ 7 callers
Function
FPSort
(ebits: int, sbits: int, ctx: Context | None = None)
lean_py/z3/core.py:3235
↓ 7 callers
Function
FreshConst
Create a fresh constant with a unique name.
lean_py/z3/core.py:2151
↓ 7 callers
Function
FullSet
Full set — constant array of True.
lean_py/z3/core.py:3617
↓ 7 callers
Function
Product
Left-fold product.
lean_py/z3/core.py:1693
↓ 7 callers
Function
RotateRight
Rotate right.
lean_py/z3/core.py:1629
↓ 7 callers
Function
_marshal_sort
Convert a Python ASTSort to a Lean Z3Sort value.
lean_py/z3/solver.py:174
↓ 7 callers
Function
_var
(name: str)
examples/05_knuckledragger/python/lean_to_z3.py:76
↓ 7 callers
Method
arity
Return the number of arguments.
lean_py/z3/core.py:940
↓ 7 callers
Function
is_quantifier
(a: ExprRef)
lean_py/z3/core.py:2494
↓ 7 callers
Method
is_solved
(self)
lean_py/kernel.py:84
↓ 7 callers
Method
kind
Return sort kind as integer (z3py compat). Values match z3 Z3_sort_kind: UNINTERPRETED=0, BOOL=1, INT=2, REAL=3, BV=4, ARRAY=5, DATAT
lean_py/z3/core.py:142
↓ 7 callers
Function
mk_const
(s: str)
examples/05_knuckledragger/python/main.py:35
↓ 7 callers
Function
mk_const
(s: str)
examples/04_sympy_tactic/python/main.py:37
↓ 7 callers
Function
raise_io_error
LeanPy/native/python_bridge.c:264
↓ 7 callers
Method
range
Return the range (return) sort.
lean_py/z3/core.py:948
↓ 7 callers
Method
resolve_sort
Convert an S-expression to a SortRef.
lean_py/z3/smt2.py:161
↓ 7 callers
Function
run_command
Run a command and return the trimmed stdout.
lean_py/utils.py:12
↓ 7 callers
Function
simplify
Simplify an expression (placeholder — returns input unchanged).
lean_py/z3/solver.py:751
↓ 7 callers
Function
substitute
Substitute expressions: substitute(t, (old1, new1), (old2, new2), ...). Each pair (old, new) replaces occurrences of old with new in t. old m
lean_py/z3/core.py:1867
↓ 6 callers
Function
FreshInt
Create a fresh integer constant.
lean_py/z3/core.py:2158
↓ 6 callers
Function
ULT
Unsigned less-than.
lean_py/z3/core.py:1509
↓ 6 callers
Function
_ctor_tag
Tag of a Lean object — works for both scalar (enum) and pointer (ctor) forms.
lean_py/marshal.py:105
↓ 6 callers
Function
_decl_type_to_str
(decl)
lean_py/_parse.py:210
↓ 6 callers
Function
_ptr_as_int
Convert any ctypes pointer-like value to a raw integer. macOS ctypes has a long-standing quirk: passing a `POINTER(struct)` instance directly
lean_py/_runtime.py:40
↓ 6 callers
Function
fpAdd
(rm: FPRMRef, a: FPRef, b: FPRef, ctx: Context | None = None)
lean_py/z3/core.py:3363
↓ 6 callers
Function
fpNeg
(a: FPRef, ctx: Context | None = None)
lean_py/z3/core.py:3379
↓ 6 callers
Method
from_json
(cls, data: dict[str, Any])
lean_py/registry.py:45
↓ 6 callers
Function
lean_array_get_core
(self, o, i)
lean_py/_runtime.py:530
↓ 6 callers
Function
lean_array_size
(self, o)
lean_py/_runtime.py:525
↓ 6 callers
Function
lean_ctor_get
(self, o, i)
lean_py/_runtime.py:467
↓ 6 callers
Function
lean_is_scalar
(self, o)
lean_py/_runtime.py:330
↓ 6 callers
Function
mk_nat
(n: int)
examples/05_knuckledragger/python/main.py:38
↓ 5 callers
Function
CharSort
(ctx: Context | None = None)
lean_py/z3/core.py:3824
↓ 5 callers
Function
IndexOf
Find index of substr in s starting at offset.
lean_py/z3/core.py:2331
↓ 5 callers
Function
NatSort
()
lean_py/z3/core.py:226
↓ 5 callers
Function
SDiv
Signed division.
lean_py/z3/core.py:1634
↓ 5 callers
Function
SeqSort
General sequence sort. For Char, returns StringSort.
lean_py/z3/core.py:3916
↓ 5 callers
Function
Star
Kleene star.
lean_py/z3/core.py:2389
↓ 5 callers
Function
SubString
Extract substring.
lean_py/z3/core.py:2321
↓ 5 callers
Function
TupleSort
Create a tuple sort. Returns (sort, constructor, list_of_accessor_FuncDeclRefs). z3py compat: ctor name = sort name, accessors named project0
lean_py/z3/core.py:1290
↓ 5 callers
Function
_ast_repr
Human-readable string for an ASTNode (for debugging).
lean_py/z3/core.py:2900
↓ 5 callers
Function
_binop
(op)
examples/05_knuckledragger/python/lean_to_z3.py:87
↓ 5 callers
Function
_binop
Return a builder for a binary operation (last 2 args).
examples/04_sympy_tactic/python/lean_to_sympy.py:78
↓ 5 callers
Function
assert_refined
Declare that *value* satisfies *refinement*. During symbolic execution, the handler intercepts this and collects the verification condition a
examples/06_effectful_verifier/python/refine.py:57
↓ 5 callers
Function
fpPlusInfinity
(sort: FPSortRef, ctx: Context | None = None)
lean_py/z3/core.py:3280
↓ 5 callers
Method
get
(self, idx: int)
lean_py/z3/core.py:4733
↓ 5 callers
Function
is_and
(a: ExprRef)
lean_py/z3/core.py:2506
↓ 5 callers
Function
is_arith
True if a is an arithmetic expression (Int, Nat, or Real).
lean_py/z3/core.py:2546
↓ 5 callers
Function
is_const
(a: ExprRef)
lean_py/z3/core.py:2486
↓ 5 callers
Function
is_eq
(a: ExprRef)
lean_py/z3/core.py:2498
↓ 5 callers
Function
is_false
(a: ExprRef)
lean_py/z3/core.py:2462
↓ 5 callers
Function
is_sort
True if a is a sort reference.
lean_py/z3/core.py:2551
↓ 5 callers
Function
is_string
(a: ExprRef)
lean_py/z3/core.py:2538
↓ 5 callers
Function
is_string_value
(a: ExprRef)
lean_py/z3/core.py:2542
↓ 5 callers
Function
lean_lib_dir
Where Lean's own shared libraries live.
lean_py/utils.py:47
↓ 5 callers
Method
mk_apps
(self, fn, *args)
examples/06_effectful_verifier/python/expr_builder.py:43
↓ 5 callers
Function
mk_binop
(op_name: str, a, b)
examples/04_sympy_tactic/python/main.py:51
↓ 5 callers
Function
set_kernel
Set the global kernel used by solvers and ``prove()``.
lean_py/z3/solver.py:154
↓ 4 callers
Function
AShr
Arithmetic shift right (sign-extending).
lean_py/z3/core.py:1644
↓ 4 callers
Function
BoolVector
Create a vector of ``sz`` boolean variables.
lean_py/z3/core.py:1732
↓ 4 callers
Function
CharToInt
(ch: ExprRef, ctx: Context | None = None)
lean_py/z3/core.py:3842
↓ 4 callers
Function
EnumSort
Create an enumeration sort. Returns (sort, list_of_enum_constants).
lean_py/z3/core.py:1277
↓ 4 callers
Function
Int2BV
Convert an integer to a bit-vector of width n.
lean_py/z3/core.py:1615
↓ 4 callers
Function
IntToStr
Convert integer to string.
lean_py/z3/core.py:2344
↓ 4 callers
Function
IntVector
Create a vector of ``sz`` integer variables named prefix__0, ..., prefix__sz-1.
lean_py/z3/core.py:1727
↓ 4 callers
Function
Map
Apply f element-wise over arrays, producing a new array.
lean_py/z3/core.py:2209
↓ 4 callers
Function
Reals
(names: str)
lean_py/z3/core.py:1072
↓ 4 callers
Function
RepeatBitVec
Repeat a bit-vector n times by concatenation.
lean_py/z3/core.py:1919
← previous
next →
101–200 of 2,559, ranked by callers