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.Group

1 declarations. Mathlib docs · Source

group tactic

Normalizes expressions in the language of groups. The basic idea is to use the simplifier to put everything into a product of group powers (zpow which takes a group element and an integer), then simplify the exponents using the ring_nf tactic. The process needs to be repeated since ring_nf can normalize an exponent to zero, leading to a factor that can be removed before collecting exponents again. The simplifier step also uses some extra lemmas to avoid some ring_nf invocations.

TODO

  • Surface non-progress-related errors from repeat.
  • Allow groups ifUnchanged behavior to be configurable.

Tags

group theory

We register group with the hint tactic.

def Mathlib.Tactic.Group.group E1 #

Lean.ParserDescr

group normalizes expressions in multiplicative groups that occur in the goal. group does not assume commutativity, instead using only the group axioms without any information about which group is manipulated. If the goal is an equality, and after normalization the two sides are equal, group closes the goal.

For additive commutative groups, use the abel tactic instead.

  • group at l1 l2 ... normalizes at the given locations.

Example:

example {G : Type} [Group G] (a b c d : G) (h : c = (a*b^2)*((b*b)⁻¹*a⁻¹)*d) : a*c*d⁻¹ = a := by
  group at h -- normalizes `h` which becomes `h : c = d`
  rw [h]     -- the goal is now `a*d*d⁻¹ = a`
  group      -- which then normalized and closed