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
↓ 318 callers
Function
IntVal
(n: int)
lean_py/z3/core.py:1135
↓ 300 callers
Function
_try_prove
Compile AST to Lean.Expr, create goal, try tactics. Returns True if proved.
lean_py/z3/solver.py:473
↓ 231 callers
Function
IntSort
()
lean_py/z3/core.py:222
↓ 230 callers
Function
Int
(name: str)
lean_py/z3/core.py:1053
↓ 171 callers
Function
BitVecVal
(val: int, width: int)
lean_py/z3/core.py:1160
↓ 137 callers
Function
StringVal
Create a string literal.
lean_py/z3/core.py:2282
↓ 106 callers
Function
Ints
(names: str)
lean_py/z3/core.py:1058
↓ 101 callers
Function
ForAll
( vars: ExprRef | Sequence[ExprRef], body: BoolRef, )
lean_py/z3/core.py:1378
↓ 96 callers
Function
BoolVal
(b: bool)
lean_py/z3/core.py:1156
↓ 93 callers
Function
BitVec
(name: str, width: int)
lean_py/z3/core.py:1084
↓ 91 callers
Function
Implies
(a: BoolRef, b: BoolRef)
lean_py/z3/core.py:1341
↓ 85 callers
Function
prove
Prove a claim directly (no double-negation). Returns ``True`` if proved, ``False`` otherwise. Prints "proved" or "failed to prove" to match k
lean_py/z3/solver.py:730
↓ 80 callers
Function
Bool
(name: str)
lean_py/z3/core.py:1076
↓ 79 callers
Method
add
(self, *args: BoolRef)
lean_py/z3/solver.py:556
↓ 77 callers
Function
And
(*args: BoolRef)
lean_py/z3/core.py:1308
↓ 77 callers
Function
FPVal
( val: float | int | str, sort: FPSortRef | None = None, ctx: Context | None = None, )
lean_py/z3/core.py:3263
↓ 61 callers
Method
check
(self, *assumptions: BoolRef)
lean_py/z3/solver.py:581
↓ 59 callers
Function
Not
(a: BoolRef)
lean_py/z3/core.py:1337
↓ 58 callers
Method
get
Get element at index.
lean_py/lean_types.py:68
↓ 52 callers
Function
_merge
( a: frozenset[tuple[str, ASTSort]], b: frozenset[tuple[str, ASTSort]], )
lean_py/z3/core.py:1399
↓ 45 callers
Function
Function
Declare an uninterpreted function. ``Function('f', IntSort(), IntSort(), BoolSort())`` declares ``f : Int -> Int -> Prop``.
lean_py/z3/core.py:1037
↓ 41 callers
Function
Const
(name: str, sort: SortRef)
lean_py/z3/core.py:1098
↓ 39 callers
Function
BoolSort
()
lean_py/z3/core.py:218
↓ 39 callers
Function
Or
(*args: BoolRef)
lean_py/z3/core.py:1323
↓ 37 callers
Method
declare
(self, ctor_name: str, *fields: tuple[str, SortRef | _DatatypeBuilder])
lean_py/z3/core.py:1223
↓ 37 callers
Function
unwrap_pyobject
LeanPy/native/python_bridge.c:239
↓ 34 callers
Function
Select
Read from array or apply lambda. Maps to function application in Lean.
lean_py/z3/core.py:1171
↓ 33 callers
Function
BitVecs
(names: str, width: int)
lean_py/z3/core.py:1089
↓ 32 callers
Function
String
Create a string variable.
lean_py/z3/core.py:2273
↓ 31 callers
Function
Float32
(ctx: Context | None = None)
lean_py/z3/core.py:3243
↓ 31 callers
Function
RNE
(ctx: Context | None = None)
lean_py/z3/core.py:3305
↓ 28 callers
Function
Float64
(ctx: Context | None = None)
lean_py/z3/core.py:3247
↓ 28 callers
Function
Re
Regex matching exactly the string s.
lean_py/z3/core.py:2383
↓ 28 callers
Method
_binop
(self, op: str, other: ArithRef | int | float)
lean_py/z3/core.py:446
↓ 27 callers
Function
Array
(name: str, domain: SortRef, range_sort: SortRef)
lean_py/z3/core.py:1093
↓ 27 callers
Method
name
Return sort name as string (z3py compat).
lean_py/z3/core.py:138
↓ 27 callers
Method
size
(self)
lean_py/z3/core.py:715
↓ 25 callers
Function
Bools
(names: str)
lean_py/z3/core.py:1080
↓ 25 callers
Function
EmptySet
Empty set — constant array of False.
lean_py/z3/core.py:3612
↓ 24 callers
Function
Store
Write to array.
lean_py/z3/core.py:1188
↓ 24 callers
Function
raise_py_error
If a Python exception is set, fetch a string for it, clear, and return * a Lean IO error result. Caller transfers ownership. */
LeanPy/native/python_bridge.c:271
↓ 23 callers
Function
BitVecSort
(n: int)
lean_py/z3/core.py:252
↓ 23 callers
Function
DeclareSort
(name: str)
lean_py/z3/core.py:234
↓ 23 callers
Function
RealSort
()
lean_py/z3/core.py:230
↓ 23 callers
Function
fpEQ
(a: FPRef, b: FPRef, ctx: Context | None = None)
lean_py/z3/core.py:3424
↓ 22 callers
Function
is_int
(a: ExprRef)
lean_py/z3/core.py:2466
↓ 21 callers
Function
expr_to_sympy
Convert a ``Lean.Expr`` (as ``LeanInductiveValue``) to a SymPy expression. Handles the elaborated forms that Lean's kernel produces (with type an
examples/04_sympy_tactic/python/lean_to_sympy.py:122
↓ 20 callers
Function
If
(c: BoolRef, t: ExprRef, e: ExprRef)
lean_py/z3/core.py:1349
↓ 20 callers
Function
Real
(name: str)
lean_py/z3/core.py:1067
↓ 20 callers
Method
__init__
( self, ast: ASTNode, vars: frozenset[tuple[str, ASTSort]] = frozenset(), )
lean_py/z3/core.py:2375
↓ 20 callers
Method
create
(self)
lean_py/z3/core.py:1226
↓ 19 callers
Function
Distinct
(*args: ExprRef)
lean_py/z3/core.py:1363
↓ 19 callers
Method
add
(self, *args: BoolRef)
lean_py/z3/tactic.py:24
↓ 19 callers
Function
lean_box
(self, n)
lean_py/_runtime.py:333
↓ 18 callers
Function
Datatype
(name: str)
lean_py/z3/core.py:1266
↓ 18 callers
Method
domain
Return the sort of the i-th argument.
lean_py/z3/core.py:944
↓ 17 callers
Function
Lambda
Build a lambda expression (maps to Lean lambda).
lean_py/z3/core.py:2184
↓ 17 callers
Function
SignExt
Sign-extend a bit-vector by n bits.
lean_py/z3/core.py:1588
↓ 17 callers
Function
_coerce_bv
(v: BitVecRef | int, sort: SortRef)
lean_py/z3/core.py:1424
↓ 16 callers
Function
ToReal
Convert Int to Real.
lean_py/z3/core.py:1659
↓ 16 callers
Function
is_real
(a: ExprRef)
lean_py/z3/core.py:2470
↓ 16 callers
Method
sort
(self)
lean_py/z3/core.py:3149
↓ 15 callers
Function
FP
(name: str, fpsort: FPSortRef, ctx: Context | None = None)
lean_py/z3/core.py:3255
↓ 15 callers
Function
RatVal
Rational value a/b as Real division.
lean_py/z3/core.py:1714
↓ 15 callers
Function
Sum
Left-fold sum.
lean_py/z3/core.py:1677
↓ 15 callers
Function
_sym
(name)
lean_py/marshal.py:322
↓ 15 callers
Method
ebits
(self)
lean_py/z3/core.py:3155
↓ 15 callers
Function
expr_to_z3
Convert a ``Lean.Expr`` (as ``LeanInductiveValue``) to a Z3 expression.
examples/05_knuckledragger/python/lean_to_z3.py:123
↓ 15 callers
Function
mk_nat
(n: int)
examples/04_sympy_tactic/python/main.py:41
↓ 14 callers
Function
_wrap
(x)
examples/06_effectful_verifier/python/refine.py:89
↓ 14 callers
Method
as_long
(self)
lean_py/z3/core.py:4474
↓ 14 callers
Function
coerce
(x)
examples/06_effectful_verifier/python/refine.py:136
↓ 14 callers
Method
decl
Return the function declaration for this expression.
lean_py/z3/core.py:352
↓ 14 callers
Method
num_args
Number of arguments (children) of this expression.
lean_py/z3/core.py:337
↓ 14 callers
Function
parse_smt2_string
Parse a string in SMT-LIB2 format. The arguments ``sorts`` and ``decls`` are Python dictionaries used to initialize the symbol table for the
lean_py/z3/smt2.py:550
↓ 14 callers
Method
sbits
(self)
lean_py/z3/core.py:3158
↓ 14 callers
Method
wrapper_for
(self, t: TypeRepr)
lean_py/marshal.py:636
↓ 13 callers
Function
Abs
Absolute value via ITE.
lean_py/z3/core.py:1654
↓ 13 callers
Function
Length
String or sequence length.
lean_py/z3/core.py:2287
↓ 13 callers
Function
Nat
(name: str)
lean_py/z3/core.py:1062
↓ 13 callers
Function
NatVal
(n: int)
lean_py/z3/core.py:1139
↓ 13 callers
Function
StrConcat
Concatenate strings.
lean_py/z3/core.py:2349
↓ 13 callers
Function
_coerce_arith
(v: ArithRef | int | float, sort: SortRef)
lean_py/z3/core.py:1406
↓ 13 callers
Method
apply
Apply this tactic to a goal via Pantograph.
lean_py/z3/tactic.py:85
↓ 13 callers
Function
ok_owned_or_err
Wrap an owned PyObject as IO Py; if NULL, propagate any pending Py error. */
LeanPy/native/python_bridge.c:306
↓ 12 callers
Function
Exists
( vars: ExprRef | Sequence[ExprRef], body: BoolRef, )
lean_py/z3/core.py:1386
↓ 12 callers
Function
Extract
Extract bits [hi:lo] from a bit-vector.
lean_py/z3/core.py:1546
↓ 12 callers
Function
Unit
Single-element sequence.
lean_py/z3/core.py:3941
↓ 12 callers
Function
_fp_op
(name: str, *args: ExprRef)
lean_py/z3/core.py:3341
↓ 12 callers
Function
_fp_pred
(name: str, *args: ExprRef)
lean_py/z3/core.py:3353
↓ 11 callers
Function
BV2Int
Convert a bit-vector to an integer. If is_signed is False (default, matching z3), uses unsigned (toNat). If is_signed is True, uses signed (t
lean_py/z3/core.py:1601
↓ 11 callers
Function
FPs
(names: str, fpsort: FPSortRef, ctx: Context | None = None)
lean_py/z3/core.py:3259
↓ 11 callers
Function
K
Constant array (all indices map to ``val``).
lean_py/z3/core.py:1201
↓ 11 callers
Function
SetAdd
Add element to set.
lean_py/z3/core.py:3628
↓ 11 callers
Function
ZeroExt
Zero-extend a bit-vector by n bits.
lean_py/z3/core.py:1575
↓ 11 callers
Method
arg
Return the i-th argument of this expression.
lean_py/z3/core.py:341
↓ 11 callers
Function
is_bool
(a: ExprRef)
lean_py/z3/core.py:2474
↓ 11 callers
Method
push
(self)
lean_py/z3/solver.py:568
↓ 11 callers
Function
wrap_pyobject
LeanPy/native/python_bridge.c:235
↓ 10 callers
Function
CharVal
(ch: str | int, ctx: Context | None = None)
lean_py/z3/core.py:3828
next →
1–100 of 2,559, ranked by callers