 <p>This is described in the specification:</p> <blockquote> <p>by default, record, union, and struct type definitions called structural types implicitly include compiler-generated declarations for structural equality, hashing, and comparison. These implicit declarations consist of the following for structural equality and hashing</p> </blockquote> <p><strong>8.15.4 Behavior of the Generated CompareTo implementations</strong></p> <blockquote> <p>If T is a union type, invoke Microsoft.FSharp.Core.Operators.compare first on the index of the union cases for the two values, and then on each corresponding field pair of x and y for the data carried by the union case. Return the first non-zero result.</p> </blockquote>