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
↓ 1 callers
Method
minimize
Add minimization objective (returns handle index).
lean_py/z3/solver.py:822
↓ 1 callers
Method
mk_bvar
(self, idx: int)
examples/06_effectful_verifier/python/expr_builder.py:49
↓ 1 callers
Method
mk_int
(self, n: int)
examples/06_effectful_verifier/python/expr_builder.py:68
↓ 1 callers
Method
mk_int_add
(self, a, b)
examples/06_effectful_verifier/python/expr_builder.py:84
↓ 1 callers
Method
mk_int_ge
(self, a, b)
examples/06_effectful_verifier/python/expr_builder.py:96
↓ 1 callers
Method
mk_int_gt
(self, a, b)
examples/06_effectful_verifier/python/expr_builder.py:93
↓ 1 callers
Method
mk_int_le
(self, a, b)
examples/06_effectful_verifier/python/expr_builder.py:102
↓ 1 callers
Method
mk_int_lt
(self, a, b)
examples/06_effectful_verifier/python/expr_builder.py:99
↓ 1 callers
Method
mk_int_mul
(self, a, b)
examples/06_effectful_verifier/python/expr_builder.py:90
↓ 1 callers
Method
mk_int_sub
(self, a, b)
examples/06_effectful_verifier/python/expr_builder.py:87
↓ 1 callers
Function
mk_name
(s: str)
examples/05_knuckledragger/python/main.py:28
↓ 1 callers
Function
mk_name
(s: str)
examples/04_sympy_tactic/python/main.py:29
↓ 1 callers
Method
model
(self)
lean_py/z3/solver.py:831
↓ 1 callers
Method
module_of
(self, name: str)
lean_py/kernel.py:303
↓ 1 callers
Function
nat_arithmetic
Nat-specific reasoning.
examples/07_z3py_drop_in/prove_with_lean.py:106
↓ 1 callers
Method
no_pattern
Return the i-th no-pattern.
lean_py/z3/core.py:874
↓ 1 callers
Method
num_args
(self)
lean_py/z3/solver.py:993
↓ 1 callers
Method
num_entries
(self)
lean_py/z3/solver.py:1021
↓ 1 callers
Method
num_no_patterns
Return number of no-patterns (0).
lean_py/z3/core.py:870
↓ 1 callers
Method
num_patterns
Return number of patterns (0 — patterns not supported).
lean_py/z3/core.py:862
↓ 1 callers
Function
open_log
Open Z3 log file (no-op).
lean_py/z3/core.py:4340
↓ 1 callers
Method
param_descrs
Return parameter descriptions.
lean_py/z3/solver.py:684
↓ 1 callers
Function
parse_io_error_message
Parse a Lean `IO.userError` string produced by `raise_py_error`. The C bridge formats Python errors as `"<TypeName>: <message>"`. If `raw` ma
lean_py/exceptions.py:80
↓ 1 callers
Method
parse_string
(self, s: str)
lean_py/z3/solver.py:972
↓ 1 callers
Method
parse_type
(self, src: str)
lean_py/kernel.py:331
↓ 1 callers
Method
pattern
Return the i-th pattern.
lean_py/z3/core.py:866
↓ 1 callers
Method
pickle
Serialise the goal state to disk via Lean's ``saveModuleData``. Round-trips with :meth:`Kernel.goal_unpickle`. Raises on error.
lean_py/kernel.py:180
↓ 1 callers
Method
pop
(self)
lean_py/z3/solver.py:839
↓ 1 callers
Method
pretty
(self)
lean_py/kernel.py:96
↓ 1 callers
Function
probe_description
Return description of a probe.
lean_py/z3/tactic.py:381
↓ 1 callers
Method
process_command
Process a single SMT-LIB2 command.
lean_py/z3/smt2.py:474
↓ 1 callers
Method
proof
Return proof (not supported).
lean_py/z3/solver.py:704
↓ 1 callers
Function
propositional_logic
Simple tautologies — the bread and butter of knuckledragger.
examples/07_z3py_drop_in/prove_with_lean.py:70
↓ 1 callers
Method
push
(self)
lean_py/z3/solver.py:836
↓ 1 callers
Function
push_pop
Solver backtracking — incremental reasoning.
examples/07_z3py_drop_in/prove_with_lean.py:182
↓ 1 callers
Method
qid
Return quantifier identifier (empty string).
lean_py/z3/core.py:854
↓ 1 callers
Function
quantifiers_and_uninterpreted
Uninterpreted sorts + functions — the group theory / syllogism pattern. This is a core knuckledragger idiom: G = smt.DeclareSort("G")
examples/07_z3py_drop_in/prove_with_lean.py:118
↓ 1 callers
Method
query
(self, *query: Any)
lean_py/z3/solver.py:935
↓ 1 callers
Method
reason_unknown
Return reason for unknown result.
lean_py/z3/solver.py:614
↓ 1 callers
Method
register_relation
(self, *decls: Any)
lean_py/z3/solver.py:881
↓ 1 callers
Method
reset
(self)
lean_py/z3/core.py:3105
↓ 1 callers
Method
set
Set solver options (no-op — Lean solver has no tunable parameters).
lean_py/z3/solver.py:564
↓ 1 callers
Function
set_param
Set global Z3 parameters (no-op — Lean has no tunable Z3 parameters).
lean_py/z3/solver.py:756
↓ 1 callers
Function
setup_kernel
(managed: bool = False)
examples/07_z3py_drop_in/prove_with_lean.py:24
↓ 1 callers
Method
sexpr
(self)
lean_py/z3/solver.py:537
↓ 1 callers
Method
skolem_id
Return Skolem identifier (empty string).
lean_py/z3/core.py:858
↓ 1 callers
Function
solve_using
Solve using a specific solver instance.
lean_py/z3/solver.py:774
↓ 1 callers
Method
solver
Create a Solver that uses this tactic.
lean_py/z3/tactic.py:102
↓ 1 callers
Function
solver_unsat
Using the Solver to detect contradictions (unsat). In knuckledragger, you'd use z3.Solver() directly. Here the solver drives grind under the
examples/07_z3py_drop_in/prove_with_lean.py:152
↓ 1 callers
Method
statistics
Return solver statistics.
lean_py/z3/solver.py:618
↓ 1 callers
Function
tactic_description
Return description of a tactic.
lean_py/z3/tactic.py:365
↓ 1 callers
Function
textwrap_indent
(s: str, prefix: str)
examples/02_pantograph_kernel/python/main.py:80
↓ 1 callers
Method
to_smt2
Return SMT-LIB2 representation (approximate).
lean_py/z3/solver.py:629
↓ 1 callers
Method
translate
Translate solver to another context (no-op).
lean_py/z3/solver.py:708
↓ 1 callers
Method
translate
Translate expression to another context (no-op — single context).
lean_py/z3/core.py:376
↓ 1 callers
Method
translate
(self, ctx: Context)
lean_py/z3/core.py:3074
↓ 1 callers
Method
try_define
Equivalent to ``let <binder_name> := <expr_str>``.
lean_py/kernel.py:139
↓ 1 callers
Method
try_draft
Substitute the goal with an expression that may contain sorrys, leaving the sorrys as fresh subgoals.
lean_py/kernel.py:148
↓ 1 callers
Method
try_have
Equivalent to ``have <binder_name> : <type_str> := ?``.
lean_py/kernel.py:121
↓ 1 callers
Method
try_let
Equivalent to ``let <binder_name> : <type_str> := ?``.
lean_py/kernel.py:130
↓ 1 callers
Function
try_load_python
LeanPy/native/python_bridge.c:363
↓ 1 callers
Function
uncurry_app
Flatten nested ``Expr.app(f, x)`` into ``(head, [arg0, arg1, ...])``.
examples/05_knuckledragger/python/lean_to_z3.py:58
↓ 1 callers
Function
uncurry_app
Flatten nested ``Expr.app(f, x)`` into ``(head, [arg0, arg1, ...])``.
examples/04_sympy_tactic/python/lean_to_sympy.py:58
↓ 1 callers
Method
unsat_core
Return unsat core (not supported).
lean_py/z3/solver.py:608
↓ 1 callers
Method
value
(self)
lean_py/z3/solver.py:1001
↓ 1 callers
Method
var_sort
Return the sort of the i-th bound variable.
lean_py/z3/core.py:846
↓ 1 callers
Function
verify_function
Verify all ``assert_refined`` calls in *fn* hold given its refinements. 1. Inspect *fn*'s type annotations → create ``defop(int)`` per param +
examples/06_effectful_verifier/python/refine.py:183
↓ 1 callers
Method
weight
Return quantifier weight (default 0).
lean_py/z3/core.py:850
↓ 1 callers
Method
whnf
(self, src: str)
lean_py/kernel.py:321
Function
BVSNegNoOverflow
Check that signed negation does not overflow (i.e. a != MIN_INT).
lean_py/z3/core.py:2082
Function
Cbrt
Cube root (represented as application).
lean_py/z3/core.py:4316
Function
Cond
Conditional tactic: apply t1 if probe p is true, else t2.
lean_py/z3/tactic.py:355
Function
CreatePolymorphicDatatype
Create a polymorphic datatype builder. Returns a Datatype builder.
lean_py/z3/core.py:4403
Function
DatatypeSort
Create a datatype sort (alias for DeclareSort).
lean_py/z3/core.py:4398
Function
Default
Get the default value of a constant array. Otherwise build an AppNode.
lean_py/z3/core.py:4292
Function
E
Mathematical constant e (Euler's number).
lean_py/z3/core.py:4648
Function
Ext
Array extensionality: return an index where a and b differ.
lean_py/z3/core.py:4303
Function
FiniteSetFilter
Filter finite set s with predicate f.
lean_py/z3/core.py:3745
Function
FiniteSetMap
Map function f over finite set s.
lean_py/z3/core.py:3726
Function
FiniteSetRange
Finite set range (not supported).
lean_py/z3/core.py:3760
Function
FiniteSetSize
Set cardinality (not supported).
lean_py/z3/core.py:3721
Function
Full
Full sequence.
lean_py/z3/core.py:3934
Method
INT
(self)
examples/06_effectful_verifier/python/expr_builder.py:65
Function
LinearOrder
Declare a linear (total) order relation.
lean_py/z3/core.py:4370
Function
MkInfinitesimal
Create an infinitesimal value.
lean_py/z3/core.py:4653
Function
MkRoots
Return roots of polynomial (not supported).
lean_py/z3/core.py:4658
Function
Model
Create a new (empty) model.
lean_py/z3/solver.py:1071
Function
PartialOrder
Declare a partial order relation.
lean_py/z3/core.py:4364
Function
Pi
Mathematical constant pi.
lean_py/z3/core.py:4643
Function
PiecewiseLinearOrder
Declare a piecewise linear order relation.
lean_py/z3/core.py:4382
Function
PropagateFunction
Create a propagation function.
lean_py/z3/core.py:4737
Function
SeqFoldLeft
Left fold over sequence.
lean_py/z3/core.py:3973
Function
SeqFoldLeftI
Indexed left fold over sequence.
lean_py/z3/core.py:3983
Function
SeqMap
Map function over sequence.
lean_py/z3/core.py:3955
Function
SeqMapI
Map indexed function over sequence.
lean_py/z3/core.py:3964
Function
Singleton
Create a singleton set containing e.
lean_py/z3/core.py:3714
Function
SubSeq
Extract subsequence (alias for SubString).
lean_py/z3/core.py:3950
Function
TransitiveClosure
Compute the transitive closure of a binary relation.
lean_py/z3/core.py:4388
Function
TreeOrder
Declare a tree order relation.
lean_py/z3/core.py:4376
Function
When
Conditional tactic: apply t when probe p is true.
lean_py/z3/tactic.py:350
← previous
next →
601–700 of 2,559, ranked by callers