The Heighway dragon curve is one of the most known fractal curves. There are two ways to construct the curve: repeatedly make a copy of the current curve, rotate it by 90 degrees, and connect them; or repeatedly replace each straight segment in the curve by two segments with a right angle. A natural question is how do we prove the equivalence of the two approaches? We generalise the construction of the curve to allow rotations to both sides. It then turns out that the two approaches are respectively a foldr and a foldl, and the key property for proving their equivalence, using the second duality theorem, is the distributivity of an "interleave" operator.
翻译:海威龙曲线是最著名的分形曲线之一。构造该曲线有两种方法:反复复制当前曲线,将其旋转90度后连接起来;或者反复将曲线中的每一段直线替换为夹角为直角的两条线段。一个自然的问题是:如何证明这两种方法的等价性?我们推广了曲线的构造方法,允许向两侧旋转。结果发现,这两种方法分别对应于foldr和foldl操作,而利用第二对偶定理证明二者等价的关键性质,在于一种“交错”运算符的可分配性。