The areas / V34. The tactics of Mathlib
Mathlib.Tactic.Abel
103 declarations. Mathlib docs · Source
The abel tactic
Evaluate expressions in the language of additive, commutative monoids and groups.
TODO
- In mathlib 3,
abelaccepted additional optional arguments:
It is undecided whether these features should be restored eventually.syntax "abel" (&" raw" <|> &" term")? (location)? : tactic
We register abel with the hint tactic.
abbrev Mathlib.Tactic.Abel.NormalExpr.brecOn.go E1 #
{motive : Mathlib.Tactic.Abel.NormalExpr → Sort u} →
(t : Mathlib.Tactic.Abel.NormalExpr) →
((t : Mathlib.Tactic.Abel.NormalExpr) → Mathlib.Tactic.Abel.NormalExpr.below t → motive t) →
motive t ×' Mathlib.Tactic.Abel.NormalExpr.below t
theorem Mathlib.Tactic.Abel.AbelNF.Config.mk.inj E1 #
∀ {toConfig : Mathlib.Tactic.AtomM.Recurse.Config} {mode : Mathlib.Tactic.Abel.AbelMode}
{toConfig_1 : Mathlib.Tactic.AtomM.Recurse.Config} {mode_1 : Mathlib.Tactic.Abel.AbelMode},
{ toConfig := toConfig, mode := mode } = { toConfig := toConfig_1, mode := mode_1 } →
toConfig = toConfig_1 ∧ mode = mode_1
def Mathlib.Tactic.Abel.Context.ctorIdx E1 #
Mathlib.Tactic.Abel.Context → ℕ
theorem Mathlib.Tactic.Abel.NormalExpr.nterm.injEq E0 #
∀ (e : Lean.Expr) (n : Lean.Expr × ℤ) (x : ℕ × Lean.Expr) (a : Mathlib.Tactic.Abel.NormalExpr) (e_1 : Lean.Expr)
(n_1 : Lean.Expr × ℤ) (x_1 : ℕ × Lean.Expr) (a_1 : Mathlib.Tactic.Abel.NormalExpr),
(Mathlib.Tactic.Abel.NormalExpr.nterm e n x a = Mathlib.Tactic.Abel.NormalExpr.nterm e_1 n_1 x_1 a_1) =
(e = e_1 ∧ n = n_1 ∧ x = x_1 ∧ a = a_1)
def Mathlib.Tactic.Abel.AbelMode.ctorIdx E1 #
Mathlib.Tactic.Abel.AbelMode → ℕ
theorem Mathlib.Tactic.Abel.NormalExpr.zero.inj E1 #
∀ {e e_1 : Lean.Expr}, Mathlib.Tactic.Abel.NormalExpr.zero e = Mathlib.Tactic.Abel.NormalExpr.zero e_1 → e = e_1
theorem Mathlib.Tactic.Abel.Context.mk.injEq E0 #
∀ (α : Lean.Expr) (univ : Lean.Level) (α0 : Lean.Expr) (isGroup : Bool) (inst α_1 : Lean.Expr) (univ_1 : Lean.Level)
(α0_1 : Lean.Expr) (isGroup_1 : Bool) (inst_1 : Lean.Expr),
({ α := α, univ := univ, α0 := α0, isGroup := isGroup, inst := inst } =
{ α := α_1, univ := univ_1, α0 := α0_1, isGroup := isGroup_1, inst := inst_1 }) =
(α = α_1 ∧ univ = univ_1 ∧ α0 = α0_1 ∧ isGroup = isGroup_1 ∧ inst = inst_1)
theorem Mathlib.Tactic.Abel.NormalExpr.brecOn.eq E1 #
∀ {motive : Mathlib.Tactic.Abel.NormalExpr → Sort u} (t : Mathlib.Tactic.Abel.NormalExpr)
(F_1 : (t : Mathlib.Tactic.Abel.NormalExpr) → Mathlib.Tactic.Abel.NormalExpr.below t → motive t),
Mathlib.Tactic.Abel.NormalExpr.brecOn t F_1 = F_1 t (Mathlib.Tactic.Abel.NormalExpr.brecOn.go t F_1).2
theorem Mathlib.Tactic.Abel.NormalExpr.zero.injEq E0 #
∀ (e e_1 : Lean.Expr), (Mathlib.Tactic.Abel.NormalExpr.zero e = Mathlib.Tactic.Abel.NormalExpr.zero e_1) = (e = e_1)
def Mathlib.Tactic.Abel.NormalExpr.ctorIdx E1 #
Mathlib.Tactic.Abel.NormalExpr → ℕ
theorem Mathlib.Tactic.Abel.AbelNF.Config.mk.injEq E0 #
∀ (toConfig : Mathlib.Tactic.AtomM.Recurse.Config) (mode : Mathlib.Tactic.Abel.AbelMode)
(toConfig_1 : Mathlib.Tactic.AtomM.Recurse.Config) (mode_1 : Mathlib.Tactic.Abel.AbelMode),
({ toConfig := toConfig, mode := mode } = { toConfig := toConfig_1, mode := mode_1 }) =
(toConfig = toConfig_1 ∧ mode = mode_1)
abbrev Mathlib.Tactic.Abel.NormalExpr.ctorElimType E1 #
{motive : Mathlib.Tactic.Abel.NormalExpr → Sort u} → ℕ → Sort (max 1 u)
abbrev Mathlib.Tactic.Abel.AbelMode.ctorElimType E1 #
{motive : Mathlib.Tactic.Abel.AbelMode → Sort u} → ℕ → Sort (max 1 u)
theorem Mathlib.Tactic.Abel.NormalExpr.nterm.inj E1 #
∀ {e : Lean.Expr} {n : Lean.Expr × ℤ} {x : ℕ × Lean.Expr} {a : Mathlib.Tactic.Abel.NormalExpr} {e_1 : Lean.Expr}
{n_1 : Lean.Expr × ℤ} {x_1 : ℕ × Lean.Expr} {a_1 : Mathlib.Tactic.Abel.NormalExpr},
Mathlib.Tactic.Abel.NormalExpr.nterm e n x a = Mathlib.Tactic.Abel.NormalExpr.nterm e_1 n_1 x_1 a_1 →
e = e_1 ∧ n = n_1 ∧ x = x_1 ∧ a = a_1
def Mathlib.Tactic.Abel.instInhabitedNormalExpr.default E1 #
Mathlib.Tactic.Abel.NormalExpr
def Mathlib.Tactic.Abel.AbelNF.Config.ctorIdx E1 #
Mathlib.Tactic.Abel.AbelNF.Config → ℕ
theorem Mathlib.Tactic.Abel.Context.mk.inj E1 #
∀ {α : Lean.Expr} {univ : Lean.Level} {α0 : Lean.Expr} {isGroup : Bool} {inst α_1 : Lean.Expr} {univ_1 : Lean.Level}
{α0_1 : Lean.Expr} {isGroup_1 : Bool} {inst_1 : Lean.Expr},
{ α := α, univ := univ, α0 := α0, isGroup := isGroup, inst := inst } =
{ α := α_1, univ := univ_1, α0 := α0_1, isGroup := isGroup_1, inst := inst_1 } →
α = α_1 ∧ univ = univ_1 ∧ α0 = α0_1 ∧ isGroup = isGroup_1 ∧ inst = inst_1
def Mathlib.Tactic.Abel.term E1 #
{α : Type u_1} → [AddCommMonoid α] → ℕ → α → α → α
A type synonym used by abel to represent n • x + a in an additive commutative monoid.
def Mathlib.Tactic.Abel.termg E1 #
{α : Type u_1} → [AddCommGroup α] → ℤ → α → α → α
A type synonym used by abel to represent n • x + a in an additive commutative group.
def Mathlib.Tactic.Abel.smul E1 #
{α : Type u_1} → [AddCommMonoid α] → ℕ → α → α
A synonym for •, used internally in abel.
def Mathlib.Tactic.Abel.smulg E1 #
{α : Type u_1} → [AddCommGroup α] → ℤ → α → α
A synonym for •, used internally in abel.
opaque Mathlib.Tactic.Abel.warn.abelTransparency E1 #
Lean.Option Bool
Set this to false to disable warnings about the planned deprecation of the transparency
controls for abel.
def Mathlib.Tactic.Abel.abel E1 #
Lean.ParserDescr
abel solves equations in the language of additive, commutative monoids and groups.
abel and its variants work as both tactics and conv tactics.
abel1fails if the target is not an equality that is provable by the axioms of commutative monoids/groups.abel_nfrewrites all group expressions into a normal form.abel_nf at hrewrites in a hypothesis.abel_nf (config := cfg)allows for additional configuration:red: the reducibility setting (overridden by!).zetaDelta: if true, localletvariables can be unfolded (overridden by!).contextual: if true, implication hypotheses are added to the local context of the discharger.
abel!,abel1!,abel_nf!use a more aggressive reducibility setting to identify atoms.
The ! variants and the red configuration option will be deprecated soon. If you have a genuine
use case for either feature, please write in the
Zulip discussion. The warning can be
disabled with set_option warn.abelTransparency false.
Examples:
example [AddCommMonoid α] (a b : α) : a + (b + a) = a + a + b := by abel
example [AddCommGroup α] (a : α) : (3 : ℤ) • a = a + (2 : ℤ) • a := by abel
structure Mathlib.Tactic.Abel.Context E1 #
Type
The Context for a call to abel.
Stores a few options for this call, and caches some common subexpressions
such as typeclass instances and 0 : α.
ctor Mathlib.Tactic.Abel.Context.mk E0 #
Lean.Expr → Lean.Level → Lean.Expr → Bool → Lean.Expr → Mathlib.Tactic.Abel.Context
abbrev Mathlib.Tactic.Abel.Context.α E1 #
Mathlib.Tactic.Abel.Context → Lean.Expr
The type of the ambient additive commutative group or monoid.
abbrev Mathlib.Tactic.Abel.Context.univ E1 #
Mathlib.Tactic.Abel.Context → Lean.Level
The universe level for α.
abbrev Mathlib.Tactic.Abel.Context.α0 E1 #
Mathlib.Tactic.Abel.Context → Lean.Expr
The expression representing 0 : α.
abbrev Mathlib.Tactic.Abel.Context.isGroup E1 #
Mathlib.Tactic.Abel.Context → Bool
Specify whether we are in an additive commutative group or an additive commutative monoid.
abbrev Mathlib.Tactic.Abel.Context.inst E1 #
Mathlib.Tactic.Abel.Context → Lean.Expr
The AddCommGroup α or AddCommMonoid α expression.
def Mathlib.Tactic.Abel.mkContext E1 #
Lean.Expr → Lean.MetaM Mathlib.Tactic.Abel.Context
Populate a context object for evaluating e.
abbrev Mathlib.Tactic.Abel.M E1 #
Type → Type
The monad for Abel contains, in addition to the AtomM state,
some information about the current type we are working over, so that we can consistently
use group lemmas or monoid lemmas as appropriate.
def Mathlib.Tactic.Abel.Context.app E1 #
Mathlib.Tactic.Abel.Context → Lean.Name → Lean.Expr → Array Lean.Expr → Lean.Expr
Apply the function n : ∀ {α} [inst : AddWhatever α], _ to the
implicit parameters in the context, and the given list of arguments.
def Mathlib.Tactic.Abel.Context.mkApp E1 #
Mathlib.Tactic.Abel.Context → Lean.Name → Lean.Name → Array Lean.Expr → Lean.MetaM Lean.Expr
Apply the function n : ∀ {α} [inst α], _ to the implicit parameters in the
context, and the given list of arguments.
Compared to context.app, this takes the name of the typeclass, rather than an
inferred typeclass instance.
def Mathlib.Tactic.Abel.addG E1 #
Lean.Name → Lean.Name
Add the letter "g" to the end of the name, e.g. turning term into termg.
This is used to choose between declarations taking AddCommMonoid and those
taking AddCommGroup instances.
def Mathlib.Tactic.Abel.iapp E1 #
Lean.Name → Array Lean.Expr → Mathlib.Tactic.Abel.M Lean.Expr
Apply the function n : ∀ {α} [AddComm{Monoid,Group} α] to the given list of arguments.
Will use the AddComm{Monoid,Group} instance that has been cached in the context.
def Mathlib.Tactic.Abel.mkTerm E1 #
Lean.Expr → Lean.Expr → Lean.Expr → Mathlib.Tactic.Abel.M Lean.Expr
Evaluate a term with coefficient n, atom x and successor terms a.
def Mathlib.Tactic.Abel.intToExpr E1 #
ℤ → Mathlib.Tactic.Abel.M Lean.Expr
Interpret an integer as a coefficient to a term.
inductive Mathlib.Tactic.Abel.NormalExpr E1 #
Type
A normal form for abel.
Expressions are represented as a list of terms of the form e = n • x,
where n : ℤ and x is an arbitrary element of the additive commutative monoid or group.
We explicitly track the Expr forms of e and n, even though they could be reconstructed,
for efficiency.
ctor Mathlib.Tactic.Abel.NormalExpr.zero E0 #
Lean.Expr → Mathlib.Tactic.Abel.NormalExpr
ctor Mathlib.Tactic.Abel.NormalExpr.nterm E0 #
Lean.Expr → Lean.Expr × ℤ → ℕ × Lean.Expr → Mathlib.Tactic.Abel.NormalExpr → Mathlib.Tactic.Abel.NormalExpr
instance Mathlib.Tactic.Abel.instInhabitedNormalExpr E0 #
Inhabited Mathlib.Tactic.Abel.NormalExpr
def Mathlib.Tactic.Abel.NormalExpr.e E1 #
Mathlib.Tactic.Abel.NormalExpr → Lean.Expr
Extract the expression from a normal form.
instance Mathlib.Tactic.Abel.instCoeNormalExprExpr E0 #
Coe Mathlib.Tactic.Abel.NormalExpr Lean.Expr
def Mathlib.Tactic.Abel.NormalExpr.term' E1 #
Lean.Expr × ℤ → ℕ × Lean.Expr → Mathlib.Tactic.Abel.NormalExpr → Mathlib.Tactic.Abel.M Mathlib.Tactic.Abel.NormalExpr
Construct the normal form representing a single term.
def Mathlib.Tactic.Abel.NormalExpr.zero' E1 #
Mathlib.Tactic.Abel.M Mathlib.Tactic.Abel.NormalExpr
Construct the normal form representing zero.
theorem Mathlib.Tactic.Abel.const_add_term E1 #
∀ {α : Type u_1} [inst : AddCommMonoid α] (k : α) (n : ℕ) (x a a' : α),
k + a = a' → k + Mathlib.Tactic.Abel.term n x a = Mathlib.Tactic.Abel.term n x a'
theorem Mathlib.Tactic.Abel.const_add_termg E1 #
∀ {α : Type u_1} [inst : AddCommGroup α] (k : α) (n : ℤ) (x a a' : α),
k + a = a' → k + Mathlib.Tactic.Abel.termg n x a = Mathlib.Tactic.Abel.termg n x a'
theorem Mathlib.Tactic.Abel.term_add_const E1 #
∀ {α : Type u_1} [inst : AddCommMonoid α] (n : ℕ) (x a k a' : α),
a + k = a' → Mathlib.Tactic.Abel.term n x a + k = Mathlib.Tactic.Abel.term n x a'
theorem Mathlib.Tactic.Abel.term_add_constg E1 #
∀ {α : Type u_1} [inst : AddCommGroup α] (n : ℤ) (x a k a' : α),
a + k = a' → Mathlib.Tactic.Abel.termg n x a + k = Mathlib.Tactic.Abel.termg n x a'
theorem Mathlib.Tactic.Abel.term_add_term E1 #
∀ {α : Type u_1} [inst : AddCommMonoid α] (n₁ : ℕ) (x a₁ : α) (n₂ : ℕ) (a₂ : α) (n' : ℕ) (a' : α),
n₁ + n₂ = n' →
a₁ + a₂ = a' →
Mathlib.Tactic.Abel.term n₁ x a₁ + Mathlib.Tactic.Abel.term n₂ x a₂ = Mathlib.Tactic.Abel.term n' x a'
theorem Mathlib.Tactic.Abel.term_add_termg E1 #
∀ {α : Type u_1} [inst : AddCommGroup α] (n₁ : ℤ) (x a₁ : α) (n₂ : ℤ) (a₂ : α) (n' : ℤ) (a' : α),
n₁ + n₂ = n' →
a₁ + a₂ = a' →
Mathlib.Tactic.Abel.termg n₁ x a₁ + Mathlib.Tactic.Abel.termg n₂ x a₂ = Mathlib.Tactic.Abel.termg n' x a'
theorem Mathlib.Tactic.Abel.zero_term E1 #
∀ {α : Type u_1} [inst : AddCommMonoid α] (x a : α), Mathlib.Tactic.Abel.term 0 x a = a
theorem Mathlib.Tactic.Abel.zero_termg E1 #
∀ {α : Type u_1} [inst : AddCommGroup α] (x a : α), Mathlib.Tactic.Abel.termg 0 x a = a
opaque Mathlib.Tactic.Abel.evalAdd E1 #
Mathlib.Tactic.Abel.NormalExpr →
Mathlib.Tactic.Abel.NormalExpr → Mathlib.Tactic.Abel.M (Mathlib.Tactic.Abel.NormalExpr × Lean.Expr)
Interpret the sum of two expressions in abel's normal form.
theorem Mathlib.Tactic.Abel.term_neg E1 #
∀ {α : Type u_1} [inst : AddCommGroup α] (n : ℤ) (x a : α) (n' : ℤ) (a' : α),
-n = n' → -a = a' → -Mathlib.Tactic.Abel.termg n x a = Mathlib.Tactic.Abel.termg n' x a'
def Mathlib.Tactic.Abel.evalNeg E1 #
Mathlib.Tactic.Abel.NormalExpr → Mathlib.Tactic.Abel.M (Mathlib.Tactic.Abel.NormalExpr × Lean.Expr)
Interpret a negated expression in abel's normal form.
theorem Mathlib.Tactic.Abel.zero_smul E1 #
∀ {α : Type u_1} [inst : AddCommMonoid α] (c : ℕ), Mathlib.Tactic.Abel.smul c 0 = 0
theorem Mathlib.Tactic.Abel.zero_smulg E1 #
∀ {α : Type u_1} [inst : AddCommGroup α] (c : ℤ), Mathlib.Tactic.Abel.smulg c 0 = 0
theorem Mathlib.Tactic.Abel.term_smul E1 #
∀ {α : Type u_1} [inst : AddCommMonoid α] (c n : ℕ) (x a : α) (n' : ℕ) (a' : α),
c * n = n' →
Mathlib.Tactic.Abel.smul c a = a' →
Mathlib.Tactic.Abel.smul c (Mathlib.Tactic.Abel.term n x a) = Mathlib.Tactic.Abel.term n' x a'
theorem Mathlib.Tactic.Abel.term_smulg E1 #
∀ {α : Type u_1} [inst : AddCommGroup α] (c n : ℤ) (x a : α) (n' : ℤ) (a' : α),
c * n = n' →
Mathlib.Tactic.Abel.smulg c a = a' →
Mathlib.Tactic.Abel.smulg c (Mathlib.Tactic.Abel.termg n x a) = Mathlib.Tactic.Abel.termg n' x a'
def Mathlib.Tactic.Abel.evalSMul E1 #
Lean.Expr × ℤ → Mathlib.Tactic.Abel.NormalExpr → Mathlib.Tactic.Abel.M (Mathlib.Tactic.Abel.NormalExpr × Lean.Expr)
Auxiliary function for evalSMul'.
theorem Mathlib.Tactic.Abel.term_atom E1 #
∀ {α : Type u_1} [inst : AddCommMonoid α] (x : α), x = Mathlib.Tactic.Abel.term 1 x 0
theorem Mathlib.Tactic.Abel.term_atomg E1 #
∀ {α : Type u_1} [inst : AddCommGroup α] (x : α), x = Mathlib.Tactic.Abel.termg 1 x 0
theorem Mathlib.Tactic.Abel.term_atom_pf E1 #
∀ {α : Type u_1} [inst : AddCommMonoid α] (x x' : α), x = x' → x = Mathlib.Tactic.Abel.term 1 x' 0
theorem Mathlib.Tactic.Abel.term_atom_pfg E1 #
∀ {α : Type u_1} [inst : AddCommGroup α] (x x' : α), x = x' → x = Mathlib.Tactic.Abel.termg 1 x' 0
def Mathlib.Tactic.Abel.evalAtom E1 #
Lean.Expr → Mathlib.Tactic.Abel.M (Mathlib.Tactic.Abel.NormalExpr × Lean.Expr)
Interpret an expression as an atom for abel's normal form.
theorem Mathlib.Tactic.Abel.unfold_sub E1 #
∀ {α : Type u_1} [inst : SubtractionMonoid α] (a b c : α), a + -b = c → a - b = c
theorem Mathlib.Tactic.Abel.unfold_smul E1 #
∀ {α : Type u_1} [inst : AddCommMonoid α] (n : ℕ) (x y : α), Mathlib.Tactic.Abel.smul n x = y → n • x = y
theorem Mathlib.Tactic.Abel.unfold_smulg E1 #
∀ {α : Type u_1} [inst : AddCommGroup α] (n : ℕ) (x y : α), Mathlib.Tactic.Abel.smulg (Int.ofNat n) x = y → ↑n • x = y
theorem Mathlib.Tactic.Abel.unfold_zsmul E1 #
∀ {α : Type u_1} [inst : AddCommGroup α] (n : ℤ) (x y : α), Mathlib.Tactic.Abel.smulg n x = y → n • x = y
theorem Mathlib.Tactic.Abel.subst_into_smul E1 #
∀ {α : Type u_1} [inst : AddCommMonoid α] (l : ℕ) (r : α) (tl : ℕ) (tr t : α),
l = tl → r = tr → Mathlib.Tactic.Abel.smul tl tr = t → Mathlib.Tactic.Abel.smul l r = t
theorem Mathlib.Tactic.Abel.subst_into_smulg E1 #
∀ {α : Type u_1} [inst : AddCommGroup α] (l : ℤ) (r : α) (tl : ℤ) (tr t : α),
l = tl → r = tr → Mathlib.Tactic.Abel.smulg tl tr = t → Mathlib.Tactic.Abel.smulg l r = t
theorem Mathlib.Tactic.Abel.subst_into_smul_upcast E1 #
∀ {α : Type u_1} [inst : AddCommGroup α] (l : ℕ) (r : α) (tl : ℕ) (zl : ℤ) (tr t : α),
l = tl → ↑tl = zl → r = tr → Mathlib.Tactic.Abel.smulg zl tr = t → Mathlib.Tactic.Abel.smul l r = t
theorem Mathlib.Tactic.Abel.subst_into_add E1 #
∀ {α : Type u_1} [inst : AddCommMonoid α] (l r tl tr t : α), l = tl → r = tr → tl + tr = t → l + r = t
theorem Mathlib.Tactic.Abel.subst_into_addg E1 #
∀ {α : Type u_1} [inst : AddCommGroup α] (l r tl tr t : α), l = tl → r = tr → tl + tr = t → l + r = t
theorem Mathlib.Tactic.Abel.subst_into_negg E1 #
∀ {α : Type u_1} [inst : AddCommGroup α] (a ta t : α), a = ta → -ta = t → -a = t
def Mathlib.Tactic.Abel.evalSMul' E1 #
(Lean.Expr → Mathlib.Tactic.Abel.M (Mathlib.Tactic.Abel.NormalExpr × Lean.Expr)) →
Bool → Lean.Expr → Lean.Expr → Lean.Expr → Mathlib.Tactic.Abel.M (Mathlib.Tactic.Abel.NormalExpr × Lean.Expr)
Normalize a term orig of the form smul e₁ e₂ or smulg e₁ e₂.
Normalized terms use smul for monoids and smulg for groups,
so there are actually four cases to handle:
- Using
smulin a monoid just simplifies the pieces usingsubst_into_smul - Using
smulgin a group just simplifies the pieces usingsubst_into_smulg - Using
smul a bin a group requires convertingafrom a nat to an int and then simplifyingsmulg ↑a busingsubst_into_smul_upcast - Using
smulgin a monoid is impossible (or at least out of scope), because you need a group argument to write asmulgterm
opaque Mathlib.Tactic.Abel.eval E1 #
Lean.Expr → Mathlib.Tactic.Abel.M (Mathlib.Tactic.Abel.NormalExpr × Lean.Expr)
Evaluate an expression into its abel normal form, by recursing into subexpressions.
def Mathlib.Tactic.Abel.isAtom E1 #
Lean.Expr → Bool
Determine whether e will be handled as an atom by the abel tactic. The match in this
function should be preserved to be parallel in case-matching to that in the
Mathlib.Tactic.Abel.eval metaprogram.
def Mathlib.Tactic.Abel.abel1 E1 #
Lean.ParserDescr
abel solves equations in the language of additive, commutative monoids and groups.
abel and its variants work as both tactics and conv tactics.
abel1fails if the target is not an equality that is provable by the axioms of commutative monoids/groups.abel_nfrewrites all group expressions into a normal form.abel_nf at hrewrites in a hypothesis.abel_nf (config := cfg)allows for additional configuration:red: the reducibility setting (overridden by!).zetaDelta: if true, localletvariables can be unfolded (overridden by!).contextual: if true, implication hypotheses are added to the local context of the discharger.
abel!,abel1!,abel_nf!use a more aggressive reducibility setting to identify atoms.
The ! variants and the red configuration option will be deprecated soon. If you have a genuine
use case for either feature, please write in the
Zulip discussion. The warning can be
disabled with set_option warn.abelTransparency false.
Examples:
example [AddCommMonoid α] (a b : α) : a + (b + a) = a + a + b := by abel
example [AddCommGroup α] (a : α) : (3 : ℤ) • a = a + (2 : ℤ) • a := by abel
def Mathlib.Tactic.Abel.abel1! E1 #
Lean.ParserDescr
abel solves equations in the language of additive, commutative monoids and groups.
abel and its variants work as both tactics and conv tactics.
abel1fails if the target is not an equality that is provable by the axioms of commutative monoids/groups.abel_nfrewrites all group expressions into a normal form.abel_nf at hrewrites in a hypothesis.abel_nf (config := cfg)allows for additional configuration:red: the reducibility setting (overridden by!).zetaDelta: if true, localletvariables can be unfolded (overridden by!).contextual: if true, implication hypotheses are added to the local context of the discharger.
abel!,abel1!,abel_nf!use a more aggressive reducibility setting to identify atoms.
The ! variants and the red configuration option will be deprecated soon. If you have a genuine
use case for either feature, please write in the
Zulip discussion. The warning can be
disabled with set_option warn.abelTransparency false.
Examples:
example [AddCommMonoid α] (a b : α) : a + (b + a) = a + a + b := by abel
example [AddCommGroup α] (a : α) : (3 : ℤ) • a = a + (2 : ℤ) • a := by abel
theorem Mathlib.Tactic.Abel.term_eq E0 #
∀ {α : Type u_1} [inst : AddCommMonoid α] (n : ℕ) (x a : α), Mathlib.Tactic.Abel.term n x a = n • x + a
theorem Mathlib.Tactic.Abel.termg_eq E0 #
∀ {α : Type u_1} [inst : AddCommGroup α] (n : ℤ) (x a : α), Mathlib.Tactic.Abel.termg n x a = n • x + a
A type synonym used by abel to represent n • x + a in an additive commutative group.
def Mathlib.Tactic.Abel.NormalExpr.isAtom E1 #
Mathlib.Tactic.Abel.NormalExpr → Bool
True if this represents an atomic expression.
inductive Mathlib.Tactic.Abel.AbelMode E1 #
Type
The normalization style for abel_nf.
ctor Mathlib.Tactic.Abel.AbelMode.term E0 #
Mathlib.Tactic.Abel.AbelMode
The default form
ctor Mathlib.Tactic.Abel.AbelMode.raw E0 #
Mathlib.Tactic.Abel.AbelMode
Raw form: the representation abel uses internally.
structure Mathlib.Tactic.Abel.AbelNF.Config E1 #
Type
Configuration for abel_nf.
ctor Mathlib.Tactic.Abel.AbelNF.Config.mk E0 #
Mathlib.Tactic.AtomM.Recurse.Config → Mathlib.Tactic.Abel.AbelMode → Mathlib.Tactic.Abel.AbelNF.Config
abbrev Mathlib.Tactic.Abel.AbelNF.Config.toConfig E1 #
Mathlib.Tactic.Abel.AbelNF.Config → Mathlib.Tactic.AtomM.Recurse.Config
abbrev Mathlib.Tactic.Abel.AbelNF.Config.mode E1 #
Mathlib.Tactic.Abel.AbelNF.Config → Mathlib.Tactic.Abel.AbelMode
The normalization style.
def Mathlib.Tactic.Abel.elabAbelNFConfig E1 #
Lean.Syntax →
optParam Mathlib.Tactic.Abel.AbelNF.Config { } →
optParam Bool true → Lean.Elab.Tactic.TacticM Mathlib.Tactic.Abel.AbelNF.Config
Function elaborating AbelNF.Config.
def Mathlib.Tactic.Abel.cleanup E1 #
Mathlib.Tactic.Abel.AbelNF.Config → Lean.Meta.Simp.Result → Lean.MetaM Lean.Meta.Simp.Result
A cleanup routine, which simplifies expressions in abel normal form to a more human-friendly
format.
def Mathlib.Tactic.Abel.evalExpr E1 #
Lean.Expr → Mathlib.Tactic.AtomM Lean.Meta.Simp.Result
Evaluate an expression into its abel normal form.
This is a variant of Mathlib.Tactic.Abel.eval, the main driver of the abel tactic.
It differs in
- outputting a
Simp.Result, rather than aNormalExpr × Expr; - throwing an error if the expression
eis an atom for theabeltactic.
def Mathlib.Tactic.Abel.abelNF E1 #
Lean.ParserDescr
abel solves equations in the language of additive, commutative monoids and groups.
abel and its variants work as both tactics and conv tactics.
abel1fails if the target is not an equality that is provable by the axioms of commutative monoids/groups.abel_nfrewrites all group expressions into a normal form.abel_nf at hrewrites in a hypothesis.abel_nf (config := cfg)allows for additional configuration:red: the reducibility setting (overridden by!).zetaDelta: if true, localletvariables can be unfolded (overridden by!).contextual: if true, implication hypotheses are added to the local context of the discharger.
abel!,abel1!,abel_nf!use a more aggressive reducibility setting to identify atoms.
The ! variants and the red configuration option will be deprecated soon. If you have a genuine
use case for either feature, please write in the
Zulip discussion. The warning can be
disabled with set_option warn.abelTransparency false.
Examples:
example [AddCommMonoid α] (a b : α) : a + (b + a) = a + a + b := by abel
example [AddCommGroup α] (a : α) : (3 : ℤ) • a = a + (2 : ℤ) • a := by abel
def Mathlib.Tactic.Abel.tacticAbel_nf!__ E1 #
Lean.ParserDescr
abel solves equations in the language of additive, commutative monoids and groups.
abel and its variants work as both tactics and conv tactics.
abel1fails if the target is not an equality that is provable by the axioms of commutative monoids/groups.abel_nfrewrites all group expressions into a normal form.abel_nf at hrewrites in a hypothesis.abel_nf (config := cfg)allows for additional configuration:red: the reducibility setting (overridden by!).zetaDelta: if true, localletvariables can be unfolded (overridden by!).contextual: if true, implication hypotheses are added to the local context of the discharger.
abel!,abel1!,abel_nf!use a more aggressive reducibility setting to identify atoms.
The ! variants and the red configuration option will be deprecated soon. If you have a genuine
use case for either feature, please write in the
Zulip discussion. The warning can be
disabled with set_option warn.abelTransparency false.
Examples:
example [AddCommMonoid α] (a b : α) : a + (b + a) = a + a + b := by abel
example [AddCommGroup α] (a : α) : (3 : ℤ) • a = a + (2 : ℤ) • a := by abel
def Mathlib.Tactic.Abel.abelNFConv E1 #
Lean.ParserDescr
abel solves equations in the language of additive, commutative monoids and groups.
abel and its variants work as both tactics and conv tactics.
abel1fails if the target is not an equality that is provable by the axioms of commutative monoids/groups.abel_nfrewrites all group expressions into a normal form.abel_nf at hrewrites in a hypothesis.abel_nf (config := cfg)allows for additional configuration:red: the reducibility setting (overridden by!).zetaDelta: if true, localletvariables can be unfolded (overridden by!).contextual: if true, implication hypotheses are added to the local context of the discharger.
abel!,abel1!,abel_nf!use a more aggressive reducibility setting to identify atoms.
The ! variants and the red configuration option will be deprecated soon. If you have a genuine
use case for either feature, please write in the
Zulip discussion. The warning can be
disabled with set_option warn.abelTransparency false.
Examples:
example [AddCommMonoid α] (a b : α) : a + (b + a) = a + a + b := by abel
example [AddCommGroup α] (a : α) : (3 : ℤ) • a = a + (2 : ℤ) • a := by abel
def Mathlib.Tactic.Abel.elabAbelNFConv E1 #
Lean.Elab.Tactic.Tactic
Elaborator for the abel_nf tactic.
def Mathlib.Tactic.Abel.convAbel_nf!_ E1 #
Lean.ParserDescr
abel solves equations in the language of additive, commutative monoids and groups.
abel and its variants work as both tactics and conv tactics.
abel1fails if the target is not an equality that is provable by the axioms of commutative monoids/groups.abel_nfrewrites all group expressions into a normal form.abel_nf at hrewrites in a hypothesis.abel_nf (config := cfg)allows for additional configuration:red: the reducibility setting (overridden by!).zetaDelta: if true, localletvariables can be unfolded (overridden by!).contextual: if true, implication hypotheses are added to the local context of the discharger.
abel!,abel1!,abel_nf!use a more aggressive reducibility setting to identify atoms.
The ! variants and the red configuration option will be deprecated soon. If you have a genuine
use case for either feature, please write in the
Zulip discussion. The warning can be
disabled with set_option warn.abelTransparency false.
Examples:
example [AddCommMonoid α] (a b : α) : a + (b + a) = a + a + b := by abel
example [AddCommGroup α] (a : α) : (3 : ℤ) • a = a + (2 : ℤ) • a := by abel
def Mathlib.Tactic.Abel.tacticAbel! E1 #
Lean.ParserDescr
abel solves equations in the language of additive, commutative monoids and groups.
abel and its variants work as both tactics and conv tactics.
abel1fails if the target is not an equality that is provable by the axioms of commutative monoids/groups.abel_nfrewrites all group expressions into a normal form.abel_nf at hrewrites in a hypothesis.abel_nf (config := cfg)allows for additional configuration:red: the reducibility setting (overridden by!).zetaDelta: if true, localletvariables can be unfolded (overridden by!).contextual: if true, implication hypotheses are added to the local context of the discharger.
abel!,abel1!,abel_nf!use a more aggressive reducibility setting to identify atoms.
The ! variants and the red configuration option will be deprecated soon. If you have a genuine
use case for either feature, please write in the
Zulip discussion. The warning can be
disabled with set_option warn.abelTransparency false.
Examples:
example [AddCommMonoid α] (a b : α) : a + (b + a) = a + a + b := by abel
example [AddCommGroup α] (a : α) : (3 : ℤ) • a = a + (2 : ℤ) • a := by abel
def Mathlib.Tactic.Abel.abelConv E1 #
Lean.ParserDescr
abel solves equations in the language of additive, commutative monoids and groups.
abel and its variants work as both tactics and conv tactics.
abel1fails if the target is not an equality that is provable by the axioms of commutative monoids/groups.abel_nfrewrites all group expressions into a normal form.abel_nf at hrewrites in a hypothesis.abel_nf (config := cfg)allows for additional configuration:red: the reducibility setting (overridden by!).zetaDelta: if true, localletvariables can be unfolded (overridden by!).contextual: if true, implication hypotheses are added to the local context of the discharger.
abel!,abel1!,abel_nf!use a more aggressive reducibility setting to identify atoms.
The ! variants and the red configuration option will be deprecated soon. If you have a genuine
use case for either feature, please write in the
Zulip discussion. The warning can be
disabled with set_option warn.abelTransparency false.
Examples:
example [AddCommMonoid α] (a b : α) : a + (b + a) = a + a + b := by abel
example [AddCommGroup α] (a : α) : (3 : ℤ) • a = a + (2 : ℤ) • a := by abel
def Mathlib.Tactic.Abel.convAbel! E1 #
Lean.ParserDescr
abel solves equations in the language of additive, commutative monoids and groups.
abel and its variants work as both tactics and conv tactics.
abel1fails if the target is not an equality that is provable by the axioms of commutative monoids/groups.abel_nfrewrites all group expressions into a normal form.abel_nf at hrewrites in a hypothesis.abel_nf (config := cfg)allows for additional configuration:red: the reducibility setting (overridden by!).zetaDelta: if true, localletvariables can be unfolded (overridden by!).contextual: if true, implication hypotheses are added to the local context of the discharger.
abel!,abel1!,abel_nf!use a more aggressive reducibility setting to identify atoms.
The ! variants and the red configuration option will be deprecated soon. If you have a genuine
use case for either feature, please write in the
Zulip discussion. The warning can be
disabled with set_option warn.abelTransparency false.
Examples:
example [AddCommMonoid α] (a b : α) : a + (b + a) = a + a + b := by abel
example [AddCommGroup α] (a : α) : (3 : ℤ) • a = a + (2 : ℤ) • a := by abel