The abel
tactic #
Evaluate expressions in the language of additive, commutative monoids and groups.
Equations
- tactic.abel.term n x a = n • x + a
Equations
- tactic.abel.termg n x a = n • x + a
theorem
tactic.abel.const_add_term
{α : Type u_1}
[add_comm_monoid α]
(k : α)
(n : ℕ)
(x a a' : α)
(h : k + a = a') :
k + tactic.abel.term n x a = tactic.abel.term n x a'
theorem
tactic.abel.const_add_termg
{α : Type u_1}
[add_comm_group α]
(k : α)
(n : ℤ)
(x a a' : α)
(h : k + a = a') :
k + tactic.abel.termg n x a = tactic.abel.termg n x a'
theorem
tactic.abel.term_add_const
{α : Type u_1}
[add_comm_monoid α]
(n : ℕ)
(x a k a' : α)
(h : a + k = a') :
tactic.abel.term n x a + k = tactic.abel.term n x a'
theorem
tactic.abel.term_add_constg
{α : Type u_1}
[add_comm_group α]
(n : ℤ)
(x a k a' : α)
(h : a + k = a') :
tactic.abel.termg n x a + k = tactic.abel.termg n x a'
theorem
tactic.abel.term_add_term
{α : Type u_1}
[add_comm_monoid α]
(n₁ : ℕ)
(x a₁ : α)
(n₂ : ℕ)
(a₂ : α)
(n' : ℕ)
(a' : α)
(h₁ : n₁ + n₂ = n')
(h₂ : a₁ + a₂ = a') :
tactic.abel.term n₁ x a₁ + tactic.abel.term n₂ x a₂ = tactic.abel.term n' x a'
theorem
tactic.abel.term_add_termg
{α : Type u_1}
[add_comm_group α]
(n₁ : ℤ)
(x a₁ : α)
(n₂ : ℤ)
(a₂ : α)
(n' : ℤ)
(a' : α)
(h₁ : n₁ + n₂ = n')
(h₂ : a₁ + a₂ = a') :
tactic.abel.termg n₁ x a₁ + tactic.abel.termg n₂ x a₂ = tactic.abel.termg n' x a'
theorem
tactic.abel.zero_term
{α : Type u_1}
[add_comm_monoid α]
(x a : α) :
tactic.abel.term 0 x a = a
theorem
tactic.abel.zero_termg
{α : Type u_1}
[add_comm_group α]
(x a : α) :
tactic.abel.termg 0 x a = a
theorem
tactic.abel.term_neg
{α : Type u_1}
[add_comm_group α]
(n : ℤ)
(x a : α)
(n' : ℤ)
(a' : α)
(h₁ : -n = n')
(h₂ : -a = a') :
-tactic.abel.termg n x a = tactic.abel.termg n' x a'
Equations
- tactic.abel.smul n x = n • x
Equations
- tactic.abel.smulg n x = n • x
theorem
tactic.abel.zero_smulg
{α : Type u_1}
[add_comm_group α]
(c : ℤ) :
tactic.abel.smulg c 0 = 0
theorem
tactic.abel.term_smul
{α : Type u_1}
[add_comm_monoid α]
(c n : ℕ)
(x a : α)
(n' : ℕ)
(a' : α)
(h₁ : c * n = n')
(h₂ : tactic.abel.smul c a = a') :
tactic.abel.smul c (tactic.abel.term n x a) = tactic.abel.term n' x a'
theorem
tactic.abel.term_smulg
{α : Type u_1}
[add_comm_group α]
(c n : ℤ)
(x a : α)
(n' : ℤ)
(a' : α)
(h₁ : c * n = n')
(h₂ : tactic.abel.smulg c a = a') :
tactic.abel.smulg c (tactic.abel.termg n x a) = tactic.abel.termg n' x a'
theorem
tactic.abel.term_atom
{α : Type u_1}
[add_comm_monoid α]
(x : α) :
x = tactic.abel.term 1 x 0
theorem
tactic.abel.term_atomg
{α : Type u_1}
[add_comm_group α]
(x : α) :
x = tactic.abel.termg 1 x 0
theorem
tactic.abel.unfold_smul
{α : Type u_1}
[add_comm_monoid α]
(n : ℕ)
(x y : α)
(h : tactic.abel.smul n x = y) :
theorem
tactic.abel.unfold_smulg
{α : Type u_1}
[add_comm_group α]
(n : ℕ)
(x y : α)
(h : tactic.abel.smulg (int.of_nat n) x = y) :
theorem
tactic.abel.unfold_zsmul
{α : Type u_1}
[add_comm_group α]
(n : ℤ)
(x y : α)
(h : tactic.abel.smulg n x = y) :
theorem
tactic.abel.subst_into_smul
{α : Type u_1}
[add_comm_monoid α]
(l : ℕ)
(r : α)
(tl : ℕ)
(tr t : α)
(prl : l = tl)
(prr : r = tr)
(prt : tactic.abel.smul tl tr = t) :
tactic.abel.smul l r = t
theorem
tactic.abel.subst_into_smulg
{α : Type u_1}
[add_comm_group α]
(l : ℤ)
(r : α)
(tl : ℤ)
(tr t : α)
(prl : l = tl)
(prr : r = tr)
(prt : tactic.abel.smulg tl tr = t) :
tactic.abel.smulg l r = t
theorem
tactic.abel.subst_into_smul_upcast
{α : Type u_1}
[add_comm_group α]
(l : ℕ)
(r : α)
(tl : ℕ)
(zl : ℤ)
(tr t : α)
(prl₁ : l = tl)
(prl₂ : ↑tl = zl)
(prr : r = tr)
(prt : tactic.abel.smulg zl tr = t) :
tactic.abel.smul l r = t
- raw : tactic.abel.normalize_mode
- term : tactic.abel.normalize_mode
Instances for tactic.abel.normalize_mode
- tactic.abel.normalize_mode.has_sizeof_inst
- tactic.abel.normalize_mode.has_reflect
- tactic.abel.normalize_mode.inhabited
@[protected, instance]
Evaluate expressions in the language of additive, commutative monoids and groups.
It attempts to prove the goal outright if there is no at
specifier and the target is an equality, but if this
fails, it falls back to rewriting all monoid expressions into a normal form.
If there is an at
specifier, it rewrites the given target into a normal form.
abel!
will use a more aggressive reducibility setting to identify atoms.
This can prove goals that abel
cannot, but is more expensive.
example {α : Type*} {a b : α} [add_comm_monoid α] : a + (b + a) = a + a + b := by abel
example {α : Type*} {a b : α} [add_comm_group α] : (a + b) - ((b + a) + a) = -a := by abel
example {α : Type*} {a b : α} [add_comm_group α] (hyp : a + a - a = b - b) : a = 0 :=
by { abel at hyp, exact hyp }
example {α : Type*} {a b : α} [add_comm_group α] : (a + b) - (id a + b) = 0 := by abel!