MCPcopy Create free account
hub / github.com/BasisResearch/lean.py / Unit

Function Unit

lean_py/z3/core.py:3941–3947  ·  view source on GitHub ↗

Single-element sequence.

(e: ExprRef)

Source from the content-addressed store, hash-verified

3939
3940
3941def Unit(e: ExprRef) -> ExprRef:
3942 """Single-element sequence."""
3943 if isinstance(e, StringRef):
3944 return e
3945 if isinstance(e, CharRef):
3946 return e
3947 return SeqRef(SeqUnitNode(e._ast), SeqSortRef(e._sort), e._vars)
3948
3949
3950def SubSeq(s: StringRef, lo: ArithRef | int, length: ArithRef | int) -> StringRef:

Callers 8

test_unitMethod · 0.90
test_unit_seqMethod · 0.90
test_seq_concatMethod · 0.90
test_seq_lengthMethod · 0.90
test_seq_containsMethod · 0.90
test_seq_prefix_ofMethod · 0.90
test_seq_suffix_ofMethod · 0.90
atMethod · 0.85

Calls 3

SeqUnitNodeClass · 0.90
SeqRefClass · 0.85
SeqSortRefClass · 0.85

Tested by 7

test_unitMethod · 0.72
test_unit_seqMethod · 0.72
test_seq_concatMethod · 0.72
test_seq_lengthMethod · 0.72
test_seq_containsMethod · 0.72
test_seq_prefix_ofMethod · 0.72
test_seq_suffix_ofMethod · 0.72