Documentation

LeanPool.LatinQuarter.Basic

Latin squares and defining sets #

Coordinates and symbols are labelled. A defining set specifies the symbols of a fixed Latin square on a finite set of cells. No unproved mathematical hypotheses are incorporated into these definitions.

@[reducible, inline]
abbrev LatinQuarter.Cell (n : ℕ) :

A labelled row-column position in an order-n square.

Equations
Instances For
    @[reducible, inline]

    A symbol assignment to every labelled cell, before imposing the Latin condition.

    Equations
    Instances For
      def LatinQuarter.IsLatin {n : ℕ} (L : Square n) :

      Every row and column contains every symbol exactly once.

      Equations
      Instances For
        def LatinQuarter.Agrees {n : ℕ} (P : Finset (Cell n)) (L M : Square n) :

        The square M retains the clues that L gives on P.

        Equations
        Instances For
          def LatinQuarter.IsDefining {n : ℕ} (P : Finset (Cell n)) (L : Square n) :

          The Latin square L is uniquely determined by its entries on P.

          Equations
          Instances For
            noncomputable def LatinQuarter.completions {n : ℕ} (P : Finset (Cell n)) (L : Square n) :

            All labelled Latin squares extending the specified clues from L.

            Equations
            Instances For
              @[simp]
              theorem LatinQuarter.mem_completions {n : ℕ} {P : Finset (Cell n)} {L M : Square n} :