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

Method test_constant_array

tests/test_z3_ported.py:949–954  ·  view source on GitHub ↗

K(IntSort(), 0) creates an array where every element is 0.

(self, kernel)

Source from the content-addressed store, hash-verified

947 assert prove(claim)
948
949 def test_constant_array(self, kernel):
950 """K(IntSort(), 0) creates an array where every element is 0."""
951 c = K(IntSort(), IntVal(0))
952 i = Int("i")
953 claim = ForAll([i], Select(c, i) == IntVal(0))
954 assert prove(claim)
955
956 def test_array_getitem_syntax(self):
957 """a[i] is shorthand for Select(a, i)."""

Callers

nothing calls this directly

Calls 7

KFunction · 0.90
IntSortFunction · 0.90
IntValFunction · 0.90
IntFunction · 0.90
ForAllFunction · 0.90
SelectFunction · 0.90
proveFunction · 0.90

Tested by

no test coverage detected