Documentation

HexRootsMathlib.Glue

The exact edge relation used by the executable gluer.

Equations
Instances For

    Undirected executable edge adjacency.

    Equations
    Instances For

      Undirected adjacency is symmetric.

      Executable adjacency is reflexive: a square is adjacent to itself.

      The outer connected-component list produced by the gluer has no duplicate component values.

      Every predicate invariant across internal adjacency edges is constant on the component. This induced-graph formulation records that paths stay inside the component, which is exactly what downstream semantic propagation needs.

      Equations
      • One or more equations did not get rendered due to their size.
      Instances For

        Distinct components have no executable adjacency edge in either direction. Together with coverage and connectedness this is maximality.

        Equations
        Instances For
          theorem HexRootsMathlib.Glue.touches_iff {s : Hex.DyadicSquare} {component : List Hex.DyadicSquare} :
          s.touches component = true tcomponent, Linked s t

          The executable touches test is adjacency to some member.

          theorem HexRootsMathlib.Glue.not_touches_iff {s : Hex.DyadicSquare} {component : List Hex.DyadicSquare} :
          s.touches component = false tcomponent, ¬Edge s t ¬Edge t s

          A failed touches test is two-sided non-adjacency to every member.

          theorem HexRootsMathlib.Glue.connected_glueInsert {s : Hex.DyadicSquare} {components : List (List Hex.DyadicSquare)} (hconnected : ccomponents, Connected c) (c : List Hex.DyadicSquare) :
          c Hex.glueInsert s componentsConnected c

          Inserting a square preserves connectedness of every component.

          Every component returned by glueList is edge-connected.

          theorem HexRootsMathlib.Glue.separated_glueInsert {s : Hex.DyadicSquare} {components : List (List Hex.DyadicSquare)} (hseparated : Separated components) :
          Separated (Hex.glueInsert s components)

          Inserting a square preserves the absence of cross-component edges.

          Distinct components returned by glueList have no edge between them.

          Inserting one square into a partial component partition preserves the flattened multiset, up to order.

          glueList is a partition of the input list at the multiset level.

          The executable array gluer preserves its input multiset exactly.

          theorem HexRootsMathlib.mem_glue {squares : Array Hex.DyadicSquare} {s : Hex.DyadicSquare} (hs : s squares.toList) :
          c(Hex.glue squares).toList, s c.toList

          Every input square occurs in an output component of glue.

          The defensive branch of glueCovered is unreachable: the structurally recursive gluer already preserves every input member.

          The guarded array gluer has no duplicate outer components.

          The guarded gluer preserves the input multiset exactly.

          theorem HexRootsMathlib.mem_of_mem_glueCovered {squares component : Array Hex.DyadicSquare} {s : Hex.DyadicSquare} (hc : component (Hex.glueCovered squares).toList) (hs : s component.toList) :
          s squares.toList

          Every member of an output component came from the input array.

          Duplicate-free input gives duplicate-free, pairwise-disjoint output components.

          Every guarded output component is edge-connected.

          theorem HexRootsMathlib.glueCovered_separated (squares c : Array Hex.DyadicSquare) :
          c (Hex.glueCovered squares).toListd(Hex.glueCovered squares).toList, c dsc.toList, td.toList, ¬Glue.Edge s t ¬Glue.Edge t s

          Distinct guarded output components have no adjacency edge between any pair of their members, the maximality half of the gluing contract.