The Mathlib Handbook

The volumes of the handbook are not written yet. This site shows the map of Mathlib that they will follow, at Mathlib 4472534b60.

The areas / V34. The tactics of Mathlib

Mathlib.Tactic.Matrix.Parsing

1 declarations. Mathlib docs · Source

Parsing matrix literals

Parsers matching !![…] matrix literal expressions into their dimensions, element type, and entry expressions, for tactics evaluating functions of a concrete matrix.

TODO: !![…] elaborates to Matrix.of applied to Matrix.vecCons chains, which is the shape matched here. Once it elaborates through Matrix.ofArray instead, adapt this parser, or remove it if the array form can be read directly.

Main definitions

  • matchMatrixLit?: match a matrix literal, closed by default.

def Mathlib.Tactic.Matrix.matchMatrixLit? E3 #

Lean.Expr → optParam Bool true → Lean.MetaM (Option (ℕ × ℕ × Lean.Expr × Array (Array Lean.Expr)))

Match a Fin-indexed matrix literal: its dimensions, element type, and rows of entries; with closed := true, only a literal without free variables or metavariables.