infix operators, type 2: ==
== :
description:
seq1 == seq2
test whether seq1 is equal to seq2
note that the order of kets in superpositions is not significant
so you can shuffle a superposition and it will still be equal
on the other hand, you can't sshuffle the sequences, that will break the equality
examples:
-- learn a couple of superpositions:
sp |one> => split |abcde>
sp |two> => shuffle sp |one>
-- see what we know:
sa: dump
------------------------------------------
|context> => |Global context>
sp |one> => |a> + |b> + |c> + |d> + |e>
sp |two> => |e> + |a> + |d> + |c> + |b>
------------------------------------------
-- now test for equality:
sa: sp |one> == sp |two>
|yes>
see also:
is-equal, != , >= , > , <= , <
Home