elif(n.name=='ᑌ'and((n.left.name=='σ'andn.left.child==n.right)or(n.right.name=='σ'andn.right.child==n.left))):#Union of two equal things, but one has a selection
changes=1
ifn.left!='σ':#Selection on left. replacing self with right.
ifn.left=='σ':#Selection on left. replacing self with right.
replace_node(n,n.right)
else:#Selection on left. replacing self with right.
replace_node(n,n.left)
elif(n.name=='ᑎ'and((n.left.name=='σ'andn.left.child==n.right)or(n.right.name=='σ'andn.right.child==n.left))):#Intersection of two equal things, but one has a selection