FormalConjecturesForMathlib/Combinatorics/LatinSquare.lean

GitHub source file

Explanation legend Lean4 Domain Explanation Language (L4DEL)

L4DEL explanations are a separate layer. They do not change the Lean source. Intuition is explanatory prose; numbered items are a reading path; sources link the wording back to evidence.

L4DEL
Lean4 Domain Explanation Language

Credit: The upstream authors and contributors retain credit for the project and mathematics. lean4-explainer only renders their pinned source and adds the separately disclosed explanation layer.

Project sources: Pinned project documentation, Formal Conjectures paper, arXiv v1

5 declarations, 0 contain sorry, 0 declared as axioms

Imports (1)
Imported by 2 files
  1. structure LatinSquare A latin square of order n is an n × n matrix with entries in Fin n such that each symbol appears exactly once in every row and exactly once in every column line 30 source

    Source documentation

    A latin square of order n is an n × n matrix with entries in Fin n such that each symbol appears exactly once in every row and exactly once in every column.

    standard axioms: Quot.sound what this means

    Statement uses: Nat

    structure LatinSquare (n : ℕ) where
    …
  2. instance (instance at line 43) line 43 source

    Source documentation

    There are finitely many latin squares of order n, since each is determined by a matrix in the finite type Matrix (Fin n) (Fin n) (Fin n). This is useful for defining the maximum number of transversals over all latin squares of order n.

    instance : Fintype (LatinSquare n) :=
    …

    Mentions: LatinSquare

  3. abbrev IsTransversal Documented declaration: IsTransversal line 57 source

    Source documentation

    A transversal of a latin square L is a selection of one cell per row, given by a column-selector σ, such that the selected columns are all distinct and the symbols at the selected cells are all distinct.

    standard axioms: Quot.sound what this means

    Statement uses: Nat, LatinSquare, Fin

    Proof uses: And, Function.Injective, LatinSquare.mat

    abbrev IsTransversal (L : LatinSquare n) (σ : Fin n → Fin n) : Prop :=
    …

    Mentions: LatinSquare

  4. abbrev IsNearTransversal Documented declaration: IsNearTransversal line 66 source

    Source documentation

    A near-transversal of a latin square L of order n is a selection of n - 1 cells, given by a row-selector ρ and a column-selector σ (both Fin (n - 1) → Fin n), such that the selected rows are all distinct, the selected columns are all distinct, and the symbols at the selected cells are all distinct.

    standard axioms: Quot.sound what this means

    Statement uses: Nat, LatinSquare, Fin, HSub.hSub, OfNat.ofNat

    Proof uses: And, Function.Injective, LatinSquare.mat

    6 instances, coercions and auxiliary constants left out.

    abbrev IsNearTransversal (L : LatinSquare n) (ρ σ : Fin (n - 1) → Fin n) : Prop :=
    …

    Mentions: LatinSquare

  5. def numTransversals The number of transversals of a latin square L, defined as the cardinality of the type of column-selectors σ : Fin n → Fin n satisfying IsTransversal L σ line 73 source

    Source documentation

    The number of transversals of a latin square L, defined as the cardinality of the type of column-selectors σ : Fin n → Fin n satisfying IsTransversal L σ.

    standard axioms: Classical.choice, Quot.sound, propext what this means

    Statement uses: Nat, LatinSquare

    Proof uses: Fintype.card, Subtype, Fin, IsTransversal, Function.Injective, LatinSquare.mat

    6 instances, coercions and auxiliary constants left out.

    def numTransversals (L : LatinSquare n) : ℕ := Fintype.card {σ : Fin n → Fin n // IsTransversal L σ}

    Mentions: LatinSquare, IsTransversal