Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Next revision
Previous revision
aa:lab:sol:9 [2025/12/08 10:44]
dmihai created
aa:lab:sol:9 [2025/12/08 22:35] (current)
dmihai
Line 54: Line 54:
  
 \( \(
-t' = \mathrm{rotate-right}(t) = \mathrm{Node}(y,​ t1, \mathrm{Node}(x,​t2,​t3))+t' = \mathrm{rotate\text{-}right}(t) = \mathrm{Node}(y,​ t1, \mathrm{Node}(x,​t2,​t3))
 \) \)
  
Line 71: Line 71:
 P2. \forall a \in \mathrm{elems}(t1),​\ a < y \\ P2. \forall a \in \mathrm{elems}(t1),​\ a < y \\
  
-P3. \forall a \in \mathrm{Node}(x,​t2,​t3),​\ a \ge y \\+P3. \forall a \in \mathrm{elems}(\mathrm{Node}(x,​t2,​t3)),\ a \ge y \\
  
 \) \)
Line 112: Line 112:
  
 \( \(
-\mathrm{rotate-left}(\mathrm{Node}(x,​t1,​\mathrm{Node}(y,​t2,​t3))) ​ \\+\mathrm{rotate\text{-}left}(\mathrm{Node}(x,​t1,​\mathrm{Node}(y,​t2,​t3))) ​ \\
 \quad\quad ​     = \mathrm{Node}(y,​ \mathrm{Node}(x,​ t1, t2), t3) \quad\quad ​     = \mathrm{Node}(y,​ \mathrm{Node}(x,​ t1, t2), t3)
 \) \)
Line 118: Line 118:
  
 \( \(
-\mathrm{rotate-right-left}(\mathrm{Node}(x,​ t1, \mathrm{Node}(y,​ \mathrm{Node}(z,​ t2, t3), t4))) \\+\mathrm{rotate\text{-}right\text{-}left}(\mathrm{Node}(x,​ t1, \mathrm{Node}(y,​ \mathrm{Node}(z,​ t2, t3), t4))) \\
 \quad\quad ​     = \mathrm{Node}(z,​ \mathrm{Node}(x,​ t1, t2), \mathrm{Node}(y,​ t3, t4)) \quad\quad ​     = \mathrm{Node}(z,​ \mathrm{Node}(x,​ t1, t2), \mathrm{Node}(y,​ t3, t4))
 \) \)