Skip to main content
-3 byte, add description
Source Link
Surculose Sputum
  • 8.4k
  • 1
  • 13
  • 40

Python 3, 110110 107 bytes

Simply try to match A with all permutations of B.

Take input as 2 lists of sets, and output False if \$A \preceq B\$, and True otherwise. (Note that the truthiness is reversed).

lambda A,B:len(A)<=len>len(B)andor any(all(a<=bany(a-b for a,b in zip(A,P))for P in permutations(B))
from itertools import*

Try it online!Try it online!

Python 3, 110 bytes

lambda A,B:len(A)<=len(B)and any(all(a<=b for a,b in zip(A,P))for P in permutations(B))
from itertools import*

Try it online!

Python 3, 110 107 bytes

Simply try to match A with all permutations of B.

Take input as 2 lists of sets, and output False if \$A \preceq B\$, and True otherwise. (Note that the truthiness is reversed).

lambda A,B:len(A)>len(B)or all(any(a-b for a,b in zip(A,P))for P in permutations(B))
from itertools import*

Try it online!

Source Link
Surculose Sputum
  • 8.4k
  • 1
  • 13
  • 40

Python 3, 110 bytes

lambda A,B:len(A)<=len(B)and any(all(a<=b for a,b in zip(A,P))for P in permutations(B))
from itertools import*

Try it online!