Constraints
example_constraints
¶
Demonstrates constraints in CoSy.
empty() -> str
¶
zero(s: str) -> str
¶
Append the string "0" to the input string.
:param s: The input string to which "0" will be appended. :return: The input string with "0" appended.
one(s: str) -> str
¶
Append the string "1" to the input string.
:param s: The input string to which "1" will be appended. :return: The input string with "1" appended.
fin(_b: bool, s: str) -> str
¶
is_heavy(s: str) -> bool
¶
Check if the number of '1's in the string is greater than the number of '0's.
:param s: A string containing '0's and '1's. :return: True if the number of '1's is greater than the number of '0's, False otherwise.