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
↓ 2 callers
Function
is_re
(a: object)
lean_py/z3/core.py:4118
↓ 2 callers
Method
is_real
(self)
lean_py/z3/core.py:515
↓ 2 callers
Function
is_select
(a: object)
lean_py/z3/core.py:4134
↓ 2 callers
Function
is_seq
(a: object)
lean_py/z3/core.py:4114
↓ 2 callers
Function
is_store
(a: object)
lean_py/z3/core.py:4138
↓ 2 callers
Function
is_sub
(a: ExprRef)
lean_py/z3/core.py:2530
↓ 2 callers
Function
is_to_int
(a: object)
lean_py/z3/core.py:4146
↓ 2 callers
Function
is_to_real
(a: object)
lean_py/z3/core.py:4142
↓ 2 callers
Method
kernel
Build and return a :class:`Kernel` backed by this project.
lean_py/project.py:138
↓ 2 callers
Method
keys
(self)
lean_py/z3/core.py:3108
↓ 2 callers
Function
lean_box_float
(self, v)
lean_py/_runtime.py:600
↓ 2 callers
Function
lean_prefix
Return the path printed by `lean --print-prefix`.
lean_py/utils.py:42
↓ 2 callers
Function
lean_unbox
(self, o)
lean_py/_runtime.py:340
↓ 2 callers
Method
main_goal_name
(self)
lean_py/kernel.py:90
↓ 2 callers
Function
make_callable_obj
Allocate a LeanCallableObject of the given variant and bind the closure * (transferring ownership). Wraps the resulting Python object as a Lean * `P
LeanPy/native/python_bridge.c:1023
↓ 2 callers
Function
make_callable_type
Build the heap type. Returns a NEW reference owned by the global * pointer; subsequent calls return the cached value. */
LeanPy/native/python_bridge.c:877
↓ 2 callers
Method
maximize
Add maximization objective (returns handle index).
lean_py/z3/solver.py:817
↓ 2 callers
Function
mk_binop
(op_name: str, a, b)
examples/05_knuckledragger/python/main.py:47
↓ 2 callers
Method
mk_forall
(self, name: str, ty, body, binder_info=None)
examples/06_effectful_verifier/python/expr_builder.py:52
↓ 2 callers
Method
mk_name
``"HAdd.hAdd"`` -> nested ``Name.str``.
examples/06_effectful_verifier/python/expr_builder.py:28
↓ 2 callers
Method
mk_nat_lit
(self, n: int)
examples/06_effectful_verifier/python/expr_builder.py:56
↓ 2 callers
Method
num_vars
Return the number of bound variables.
lean_py/z3/core.py:835
↓ 2 callers
Function
parse_smt2_file
Parse an SMT-LIB2 file. This function is similar to :func:`parse_smt2_string`.
lean_py/z3/smt2.py:571
↓ 2 callers
Method
process
Process Lean source code against the current environment. Returns a multi-line string of new constants per command, separated by ``\\
lean_py/kernel.py:381
↓ 2 callers
Method
serialize
Serialize expression to string.
lean_py/z3/core.py:384
↓ 2 callers
Method
set
Set a parameter value.
lean_py/z3/core.py:4571
↓ 2 callers
Method
sexpr
Return S-expression representation of assertions.
lean_py/z3/solver.py:622
↓ 2 callers
Method
size
Get the size of the array.
lean_py/lean_types.py:63
↓ 2 callers
Function
solve
Shorthand: create solver, add args, check.
lean_py/z3/solver.py:744
↓ 2 callers
Method
to_python_string
Convert to Python string.
lean_py/lean_types.py:40
↓ 2 callers
Function
try_python_subprocess
Ask `python3` (or `python`) on PATH where its own libpython lives. * This handles pyenv / uv-managed / framework Pythons whose libdir * isn't on the
LeanPy/native/python_bridge.c:339
↓ 2 callers
Method
unfold_aux_lemmas
(self, src: str)
lean_py/kernel.py:397
↓ 2 callers
Method
unfold_matchers
(self, src: str)
lean_py/kernel.py:400
↓ 1 callers
Function
BVAddNoUnderflow
Check that signed a + b does not underflow.
lean_py/z3/core.py:1995
↓ 1 callers
Function
BVMulNoUnderflow
Check that signed a * b does not underflow.
lean_py/z3/core.py:2057
↓ 1 callers
Function
BVRedAnd
Reduction AND: 1-bit result, all bits ANDed.
lean_py/z3/core.py:1929
↓ 1 callers
Function
BVRedOr
Reduction OR: 1-bit result, all bits ORed.
lean_py/z3/core.py:1942
↓ 1 callers
Function
BVSDivNoOverflow
Check that signed a / b does not overflow (MIN_INT / -1).
lean_py/z3/core.py:2070
↓ 1 callers
Function
BVSubNoOverflow
Check that signed a - b does not overflow.
lean_py/z3/core.py:2008
↓ 1 callers
Function
BvNand
Bitwise NAND.
lean_py/z3/core.py:1954
↓ 1 callers
Function
BvNor
Bitwise NOR.
lean_py/z3/core.py:1959
↓ 1 callers
Function
BvXnor
Bitwise XNOR.
lean_py/z3/core.py:1964
↓ 1 callers
Function
CharFromBv
(bv: BitVecRef, ctx: Context | None = None)
lean_py/z3/core.py:3834
↓ 1 callers
Function
CreateDatatypes
Create multiple (possibly mutually recursive) datatypes.
lean_py/z3/core.py:1270
↓ 1 callers
Function
Diff
Regex difference.
lean_py/z3/core.py:4263
↓ 1 callers
Function
DisjointSum
Create a disjoint sum datatype. z3py compat: sorts is list[SortRef], ctors named inject0/inject1/..., accessors named project0/project1/...
lean_py/z3/core.py:4079
↓ 1 callers
Function
FailIf
Tactic that fails if probe is true.
lean_py/z3/tactic.py:272
↓ 1 callers
Function
FiniteDomainSize
Return size of finite domain sort.
lean_py/z3/core.py:4021
↓ 1 callers
Function
FiniteDomainVal
(val: int, sort: SortRef, ctx: Context | None = None)
lean_py/z3/core.py:4015
↓ 1 callers
Function
Float128
(ctx: Context | None = None)
lean_py/z3/core.py:3251
↓ 1 callers
Function
Float16
(ctx: Context | None = None)
lean_py/z3/core.py:3239
↓ 1 callers
Function
IsInt
Check if a real value is an integer.
lean_py/z3/core.py:1900
↓ 1 callers
Function
LastIndexOf
Find last index of substr in s.
lean_py/z3/core.py:4230
↓ 1 callers
Function
PbEq
Pseudo-boolean equality: sum of (coeff * bool) == k.
lean_py/z3/core.py:2117
↓ 1 callers
Function
PbGe
Pseudo-boolean >=: sum of (coeff * bool) >= k.
lean_py/z3/core.py:2135
↓ 1 callers
Function
PbLe
Pseudo-boolean <=: sum of (coeff * bool) <= k.
lean_py/z3/core.py:2126
↓ 1 callers
Function
ProbeAnd
(p1: Probe, p2: Probe)
lean_py/z3/tactic.py:264
↓ 1 callers
Function
ProbeOr
(p1: Probe, p2: Probe)
lean_py/z3/tactic.py:268
↓ 1 callers
Function
RNA
(ctx: Context | None = None)
lean_py/z3/core.py:3313
↓ 1 callers
Function
RTN
(ctx: Context | None = None)
lean_py/z3/core.py:3329
↓ 1 callers
Function
RTP
(ctx: Context | None = None)
lean_py/z3/core.py:3321
↓ 1 callers
Function
RTZ
(ctx: Context | None = None)
lean_py/z3/core.py:3337
↓ 1 callers
Function
RecAddDefinition
Add definition to a recursive function.
lean_py/z3/core.py:4040
↓ 1 callers
Function
SetDel
Remove element from set.
lean_py/z3/core.py:3633
↓ 1 callers
Function
SetHasSize
Check if set has exactly n elements.
lean_py/z3/core.py:3698
↓ 1 callers
Function
SimpleSolver
Create a simple solver (returns standard Solver).
lean_py/z3/solver.py:769
↓ 1 callers
Function
SolverFor
Create a solver for a specific logic (returns standard Solver).
lean_py/z3/solver.py:764
↓ 1 callers
Function
StrFromCode
Convert character code to single-char string.
lean_py/z3/core.py:4248
↓ 1 callers
Function
StrToCode
Convert single-char string to character code.
lean_py/z3/core.py:4239
↓ 1 callers
Function
TryFor
Apply tactic with timeout (timeout ignored — Lean handles timeouts internally).
lean_py/z3/tactic.py:204
↓ 1 callers
Function
Update
Update array at index i with value v (alias for Store).
lean_py/z3/core.py:4287
↓ 1 callers
Function
With
Apply tactic with parameters (parameters ignored — Lean tactics have fixed behavior).
lean_py/z3/tactic.py:199
↓ 1 callers
Method
__init__
(self, kind: str, message: str, context: dict | None = None)
lean_py/exceptions.py:42
↓ 1 callers
Method
__init__
(self, dylib_path: str | os.PathLike, library_name: str)
lean_py/library.py:385
↓ 1 callers
Function
_add_helper_methods
Add convenience helper methods.
lean_py/_runtime.py:693
↓ 1 callers
Function
_add_inline_methods
Add Python implementations of key static inline functions.
lean_py/_runtime.py:320
↓ 1 callers
Method
_apply
Apply a function/operator to resolved args.
lean_py/z3/smt2.py:321
↓ 1 callers
Function
_ast_decl_name
Return the 'declaration name' for an AST node.
lean_py/z3/core.py:2712
↓ 1 callers
Function
_build_callable
Build a Python wrapper around an `@[export]`'d Lean function. Conventions for the C ABI of Lean-exported functions: * Most parameter types
lean_py/library.py:189
↓ 1 callers
Function
_build_ffi_class
Dynamically create the LeanFFI class with all bindings.
lean_py/_runtime.py:201
↓ 1 callers
Function
_build_lean_str
Convert an effectful Term to a Lean proposition string.
examples/06_effectful_verifier/python/refine.py:85
↓ 1 callers
Function
_build_smart_ctors
Register C smart constructors for Lean kernel types. ``Lean.Name``, ``Lean.Level``, and ``Lean.Expr`` constructors use ``@[extern]`` annotati
lean_py/marshal.py:297
↓ 1 callers
Function
_build_structs
Dynamically create ctypes Structure classes from the model.
lean_py/_runtime.py:153
↓ 1 callers
Function
_build_vc_expr
Convert an effectful VC Term to a ``Lean.Expr`` proposition. Builds ``∀ (x : Int) ..., preconds → body`` with correct de Bruijn indices at ea
examples/06_effectful_verifier/python/refine.py:149
↓ 1 callers
Method
_build_wrapper
(self, t: TypeRepr)
lean_py/marshal.py:644
↓ 1 callers
Function
_cache_key
(lean_version: str, deps: tuple[str, ...])
lean_py/project.py:100
↓ 1 callers
Function
_classify
(ast: c_ast.FileAST, defines: dict[str, int], header_path: Path)
lean_py/_parse.py:275
↓ 1 callers
Function
_collect_uninterp_sorts
Recursively collect uninterpreted sort names from an AST sort.
lean_py/z3/_inductive_reg.py:23
↓ 1 callers
Function
_create_project
Generate a minimal Lake project on disk.
lean_py/project.py:166
↓ 1 callers
Function
_dep_rev
Extract a tag like ``v4.29.1`` from the toolchain string.
lean_py/project.py:65
↓ 1 callers
Method
_encode_inductive
(self, ti: TypeInfo, value: Any)
lean_py/marshal.py:558
↓ 1 callers
Function
_ensure_rpath
On macOS, rewrite any `@rpath/libFoo.dylib` references to absolute paths under Lean's `lib/lean`. This lets `dlopen` succeed without a pre-set
lean_py/library.py:68
↓ 1 callers
Method
_ensure_task_manager
Initialise Lean's task manager once per process. `Lean.importModules` (and any kernel operation that allocates a `Task`) asserts on `
lean_py/library.py:434
↓ 1 callers
Function
_extract_export_names
(header_path: Path)
lean_py/_parse.py:258
↓ 1 callers
Function
_extract_inline_names
(header_path: Path)
lean_py/_parse.py:264
↓ 1 callers
Function
_extract_struct
(node: c_ast.Struct)
lean_py/_parse.py:220
↓ 1 callers
Method
_format
(self)
lean_py/exceptions.py:49
↓ 1 callers
Function
_generate_lakefile
( deps: tuple[str, ...], lean_version: str, )
lean_py/project.py:190
↓ 1 callers
Method
_initialize_lean_module
(self)
lean_py/library.py:498
↓ 1 callers
Function
_is_enum_tag_only
Constructors with no payload are encoded as boxed scalars (the tag).
lean_py/marshal.py:167
← previous
next →
401–500 of 2,559, ranked by callers