FormalConjecturesForMathlib/Combinatorics/LatinSquare.lean
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
- structure
LatinSquareA latin square of ordernis ann × nmatrix with entries inFin nsuch that each symbol appears exactly once in every row and exactly once in every column line 30 sourceSource documentation
A latin square of order
nis ann × nmatrix with entries inFin nsuch that each symbol appears exactly once in every row and exactly once in every column.standard axioms: Quot.sound what this means
Statement uses:
Natstructure LatinSquare (n : ℕ) where …
- instance
(instance at line 43)line 43 sourceSource documentation
There are finitely many latin squares of order
n, since each is determined by a matrix in the finite typeMatrix (Fin n) (Fin n) (Fin n). This is useful for defining the maximum number of transversals over all latin squares of ordern.instance : Fintype (LatinSquare n) := …
Mentions: LatinSquare
- abbrev
IsTransversalDocumented declaration: IsTransversal line 57 sourceSource documentation
A transversal of a latin square
Lis 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,FinProof uses:
And,Function.Injective,LatinSquare.matabbrev IsTransversal (L : LatinSquare n) (σ : Fin n → Fin n) : Prop := …
Mentions: LatinSquare
- abbrev
IsNearTransversalDocumented declaration: IsNearTransversal line 66 sourceSource documentation
A near-transversal of a latin square
Lof ordernis a selection ofn - 1cells, given by a row-selectorρand a column-selectorσ(bothFin (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.ofNatProof uses:
And,Function.Injective,LatinSquare.mat6 instances, coercions and auxiliary constants left out.
abbrev IsNearTransversal (L : LatinSquare n) (ρ σ : Fin (n - 1) → Fin n) : Prop := …
Mentions: LatinSquare
- def
numTransversalsThe number of transversals of a latin squareL, defined as the cardinality of the type of column-selectorsσ : Fin n → Fin nsatisfyingIsTransversal L σline 73 sourceSource documentation
The number of transversals of a latin square
L, defined as the cardinality of the type of column-selectorsσ : Fin n → Fin nsatisfyingIsTransversal L σ.standard axioms: Classical.choice, Quot.sound, propext what this means
Statement uses:
Nat, LatinSquareProof uses:
Fintype.card,Subtype,Fin, IsTransversal,Function.Injective,LatinSquare.mat6 instances, coercions and auxiliary constants left out.
def numTransversals (L : LatinSquare n) : ℕ := Fintype.card {σ : Fin n → Fin n // IsTransversal L σ}Mentions: LatinSquare, IsTransversal