The areas / V34. The tactics of Mathlib
Mathlib.Tactic.FieldSimp.Lemmas
75 declarations. Mathlib docs · Source
Lemmas for the field_simp tactic
Theory of lists of pairs (exponent, atom)
This section contains the lemmas which are orchestrated by the field_simp tactic
to prove goals in fields. The basic object which these lemmas concern is NF M, a type synonym
for a list of ordered pairs in ℤ × M, where typically M is a field.
Negations of algebraic operations
theorem Mathlib.Tactic.FieldSimp.Sign.minus.injEq E0 #
∀ {v : Lean.Level} {M : Q(Type v)} (iM iM_1 : Q(Field «$M»)),
(Mathlib.Tactic.FieldSimp.Sign.minus iM = Mathlib.Tactic.FieldSimp.Sign.minus iM_1) = (iM = iM_1)
abbrev Mathlib.Tactic.FieldSimp.Sign.ctorElimType E1 #
{v : Lean.Level} → {M : Q(Type v)} → {motive : Mathlib.Tactic.FieldSimp.Sign M → Sort u} → ℕ → Sort (max 1 u)
theorem Mathlib.Tactic.FieldSimp.Sign.minus.inj E1 #
∀ {v : Lean.Level} {M : Q(Type v)} {iM iM_1 : Q(Field «$M»)},
Mathlib.Tactic.FieldSimp.Sign.minus iM = Mathlib.Tactic.FieldSimp.Sign.minus iM_1 → iM = iM_1
theorem Mathlib.Tactic.FieldSimp.NF.eval.match_1.congr_eq_1 E1 #
∀ {M : Type u_1} (motive : ℤ × M → Sort u_2) (x : ℤ × M) (h_1 : (r : ℤ) → (x : M) → motive (r, x)) (r : ℤ) (x_1 : M),
x = (r, x_1) →
(match x with
| (r, x) => h_1 r x) ≍
h_1 r x_1
def Mathlib.Tactic.FieldSimp.Sign.ctorIdx E1 #
{v : Lean.Level} → {M : Q(Type v)} → Mathlib.Tactic.FieldSimp.Sign M → ℕ
def Mathlib.Tactic.FieldSimp.zpow' E1 #
{α : Type u_1} → [GroupWithZero α] → α → ℤ → α
This is a variant of integer exponentiation, defined for internal use in the field_simp tactic
implementation. It differs from the usual integer exponentiation in that 0 ^ 0 is 0, not 1.
With this choice, the function n ↦ a ^ n is always a homomorphism (a ^ (n + m) = a ^ n * a ^ m),
even if a is zero.
theorem Mathlib.Tactic.FieldSimp.zpow'_add E1 #
∀ {α : Type u_1} [inst : GroupWithZero α] (a : α) (m n : ℤ),
Mathlib.Tactic.FieldSimp.zpow' a (m + n) = Mathlib.Tactic.FieldSimp.zpow' a m * Mathlib.Tactic.FieldSimp.zpow' a n
theorem Mathlib.Tactic.FieldSimp.zpow'_of_ne_zero_right E1 #
∀ {α : Type u_1} [inst : GroupWithZero α] (a : α) (n : ℤ), n ≠ 0 → Mathlib.Tactic.FieldSimp.zpow' a n = a ^ n
theorem Mathlib.Tactic.FieldSimp.zpow'_of_ne_zero_left E1 #
∀ {α : Type u_1} [inst : GroupWithZero α] (a : α) (n : ℤ), a ≠ 0 → Mathlib.Tactic.FieldSimp.zpow' a n = a ^ n
theorem Mathlib.Tactic.FieldSimp.zero_zpow' E0 #
∀ {α : Type u_1} [inst : GroupWithZero α] (n : ℤ), Mathlib.Tactic.FieldSimp.zpow' 0 n = 0
theorem Mathlib.Tactic.FieldSimp.zpow'_eq_zero_iff E0 #
∀ {α : Type u_1} [inst : GroupWithZero α] (a : α) (n : ℤ), Mathlib.Tactic.FieldSimp.zpow' a n = 0 ↔ a = 0
theorem Mathlib.Tactic.FieldSimp.one_zpow' E0 #
∀ {α : Type u_1} [inst : GroupWithZero α] (n : ℤ), Mathlib.Tactic.FieldSimp.zpow' 1 n = 1
theorem Mathlib.Tactic.FieldSimp.zpow'_one E0 #
∀ {α : Type u_1} [inst : GroupWithZero α] (a : α), Mathlib.Tactic.FieldSimp.zpow' a 1 = a
theorem Mathlib.Tactic.FieldSimp.zpow'_zero_eq_div E1 #
∀ {α : Type u_1} [inst : GroupWithZero α] (a : α), Mathlib.Tactic.FieldSimp.zpow' a 0 = a / a
theorem Mathlib.Tactic.FieldSimp.zpow'_zero_of_ne_zero E1 #
∀ {α : Type u_1} [inst : GroupWithZero α] {a : α}, a ≠ 0 → Mathlib.Tactic.FieldSimp.zpow' a 0 = 1
theorem Mathlib.Tactic.FieldSimp.zpow'_neg E1 #
∀ {α : Type u_1} [inst : GroupWithZero α] (a : α) (n : ℤ),
Mathlib.Tactic.FieldSimp.zpow' a (-n) = (Mathlib.Tactic.FieldSimp.zpow' a n)⁻¹
theorem Mathlib.Tactic.FieldSimp.zpow'_mul E1 #
∀ {α : Type u_1} [inst : GroupWithZero α] (a : α) (m n : ℤ),
Mathlib.Tactic.FieldSimp.zpow' a (m * n) = Mathlib.Tactic.FieldSimp.zpow' (Mathlib.Tactic.FieldSimp.zpow' a m) n
theorem Mathlib.Tactic.FieldSimp.zpow'_ofNat E1 #
∀ {α : Type u_1} [inst : GroupWithZero α] (a : α) {n : ℕ}, n ≠ 0 → Mathlib.Tactic.FieldSimp.zpow' a ↑n = a ^ n
theorem Mathlib.Tactic.FieldSimp.mul_zpow' E1 #
∀ {α : Type u_1} [inst : CommGroupWithZero α] (n : ℤ) (a b : α),
Mathlib.Tactic.FieldSimp.zpow' (a * b) n = Mathlib.Tactic.FieldSimp.zpow' a n * Mathlib.Tactic.FieldSimp.zpow' b n
theorem Mathlib.Tactic.FieldSimp.list_prod_zpow' E1 #
∀ {α : Type u_1} [inst : CommGroupWithZero α] {r : ℤ} {l : List α},
Mathlib.Tactic.FieldSimp.zpow' l.prod r = (List.map (fun x ↦ Mathlib.Tactic.FieldSimp.zpow' x r) l).prod
theorem Mathlib.Tactic.FieldSimp.subst_add E1 #
∀ {M : Type u_1} [inst : Semiring M] {x₁ x₂ X₁ X₂ Y y a : M},
x₁ = a * X₁ → x₂ = a * X₂ → X₁ + X₂ = Y → a * Y = y → x₁ + x₂ = y
theorem Mathlib.Tactic.FieldSimp.subst_sub E1 #
∀ {M : Type u_1} [inst : Ring M] {x₁ x₂ X₁ X₂ Y y a : M},
x₁ = a * X₁ → x₂ = a * X₂ → X₁ - X₂ = Y → a * Y = y → x₁ - x₂ = y
theorem Mathlib.Tactic.FieldSimp.le_eq_cancel_le E1 #
∀ {M : Type u_1} [inst : MonoidWithZero M] [inst_1 : PartialOrder M] [PosMulMono M] [PosMulReflectLE M]
{e₁ e₂ f₁ f₂ L : M}, e₁ = L * f₁ → e₂ = L * f₂ → 0 < L → (e₁ ≤ e₂) = (f₁ ≤ f₂)
theorem Mathlib.Tactic.FieldSimp.lt_eq_cancel_lt E1 #
∀ {M : Type u_1} [inst : MonoidWithZero M] [inst_1 : PartialOrder M] [PosMulStrictMono M] [PosMulReflectLT M]
{e₁ e₂ f₁ f₂ L : M}, e₁ = L * f₁ → e₂ = L * f₂ → 0 < L → (e₁ < e₂) = (f₁ < f₂)
def Mathlib.Tactic.FieldSimp.NF E1 #
Type u_1 → Type u_1
Basic theoretical "normal form" object of the field_simp tactic: a type
synonym for a list of ordered pairs in ℤ × M, where typically M is a field. This is the
form to which the tactics reduce field expressions.
def Mathlib.Tactic.FieldSimp.NF.cons E1 #
{M : Type u_1} → ℤ × M → Mathlib.Tactic.FieldSimp.NF M → Mathlib.Tactic.FieldSimp.NF M
Augment a FieldSimp.NF M object l, i.e. a list of pairs in ℤ × M, by prepending another
pair p : ℤ × M.
def Mathlib.Tactic.FieldSimp.NF.«term_::ᵣ_» E1 #
Lean.TrailingParserDescr
Augment a FieldSimp.NF M object l, i.e. a list of pairs in ℤ × M, by prepending another
pair p : ℤ × M.
def Mathlib.Tactic.FieldSimp.NF.eval E1 #
{M : Type u_1} → [GroupWithZero M] → Mathlib.Tactic.FieldSimp.NF M → M
Evaluate a FieldSimp.NF M object l, i.e. a list of pairs in ℤ × M, to an element of M,
by forming the "multiplicative linear combination" it specifies: raise each M term to the power of
the corresponding ℤ term, then multiply them all together.
theorem Mathlib.Tactic.FieldSimp.NF.eval_cons E0 #
∀ {M : Type u_1} [inst : CommGroupWithZero M] (p : ℤ × M) (l : Mathlib.Tactic.FieldSimp.NF M),
(p ::ᵣ l).eval = l.eval * Mathlib.Tactic.FieldSimp.zpow' p.2 p.1
theorem Mathlib.Tactic.FieldSimp.NF.cons_ne_zero E1 #
∀ {M : Type u_1} [inst : GroupWithZero M] (r : ℤ) {x : M},
x ≠ 0 → ∀ {l : Mathlib.Tactic.FieldSimp.NF M}, l.eval ≠ 0 → ((r, x) ::ᵣ l).eval ≠ 0
theorem Mathlib.Tactic.FieldSimp.NF.cons_pos E1 #
∀ {M : Type u_1} [inst : GroupWithZero M] [inst_1 : PartialOrder M] [PosMulStrictMono M] [PosMulReflectLT M]
[ZeroLEOneClass M] (r : ℤ) {x : M},
0 < x → ∀ {l : Mathlib.Tactic.FieldSimp.NF M}, 0 < l.eval → 0 < ((r, x) ::ᵣ l).eval
theorem Mathlib.Tactic.FieldSimp.NF.atom_eq_eval E1 #
∀ {M : Type u_1} [inst : GroupWithZero M] (x : M), x = Mathlib.Tactic.FieldSimp.NF.eval [(1, x)]
theorem Mathlib.Tactic.FieldSimp.NF.one_eq_eval E1 #
∀ (M : Type u_1) [inst : GroupWithZero M], 1 = Mathlib.Tactic.FieldSimp.NF.eval []
theorem Mathlib.Tactic.FieldSimp.NF.mul_eq_eval₁ E1 #
∀ {M : Type u_1} [inst : CommGroupWithZero M] (a₁ : ℤ × M) {a₂ : ℤ × M} {l₁ l₂ l : Mathlib.Tactic.FieldSimp.NF M},
l₁.eval * (a₂ ::ᵣ l₂).eval = l.eval → (a₁ ::ᵣ l₁).eval * (a₂ ::ᵣ l₂).eval = (a₁ ::ᵣ l).eval
theorem Mathlib.Tactic.FieldSimp.NF.mul_eq_eval₂ E1 #
∀ {M : Type u_1} [inst : CommGroupWithZero M] (r₁ r₂ : ℤ) (x : M) {l₁ l₂ l : Mathlib.Tactic.FieldSimp.NF M},
l₁.eval * l₂.eval = l.eval → ((r₁, x) ::ᵣ l₁).eval * ((r₂, x) ::ᵣ l₂).eval = ((r₁ + r₂, x) ::ᵣ l).eval
theorem Mathlib.Tactic.FieldSimp.NF.mul_eq_eval₃ E1 #
∀ {M : Type u_1} [inst : CommGroupWithZero M] {a₁ : ℤ × M} (a₂ : ℤ × M) {l₁ l₂ l : Mathlib.Tactic.FieldSimp.NF M},
(a₁ ::ᵣ l₁).eval * l₂.eval = l.eval → (a₁ ::ᵣ l₁).eval * (a₂ ::ᵣ l₂).eval = (a₂ ::ᵣ l).eval
theorem Mathlib.Tactic.FieldSimp.NF.mul_eq_eval E1 #
∀ {M : Type u_1} [inst : GroupWithZero M] {l₁ l₂ l : Mathlib.Tactic.FieldSimp.NF M} {x₁ x₂ : M},
x₁ = l₁.eval → x₂ = l₂.eval → l₁.eval * l₂.eval = l.eval → x₁ * x₂ = l.eval
theorem Mathlib.Tactic.FieldSimp.NF.div_eq_eval₁ E1 #
∀ {M : Type u_1} [inst : CommGroupWithZero M] (a₁ : ℤ × M) {a₂ : ℤ × M} {l₁ l₂ l : Mathlib.Tactic.FieldSimp.NF M},
l₁.eval / (a₂ ::ᵣ l₂).eval = l.eval → (a₁ ::ᵣ l₁).eval / (a₂ ::ᵣ l₂).eval = (a₁ ::ᵣ l).eval
theorem Mathlib.Tactic.FieldSimp.NF.div_eq_eval₂ E1 #
∀ {M : Type u_1} [inst : CommGroupWithZero M] (r₁ r₂ : ℤ) (x : M) {l₁ l₂ l : Mathlib.Tactic.FieldSimp.NF M},
l₁.eval / l₂.eval = l.eval → ((r₁, x) ::ᵣ l₁).eval / ((r₂, x) ::ᵣ l₂).eval = ((r₁ - r₂, x) ::ᵣ l).eval
theorem Mathlib.Tactic.FieldSimp.NF.div_eq_eval₃ E1 #
∀ {M : Type u_1} [inst : CommGroupWithZero M] {a₁ : ℤ × M} (a₂ : ℤ × M) {l₁ l₂ l : Mathlib.Tactic.FieldSimp.NF M},
(a₁ ::ᵣ l₁).eval / l₂.eval = l.eval → (a₁ ::ᵣ l₁).eval / (a₂ ::ᵣ l₂).eval = ((-a₂.1, a₂.2) ::ᵣ l).eval
theorem Mathlib.Tactic.FieldSimp.NF.div_eq_eval E1 #
∀ {M : Type u_1} [inst : GroupWithZero M] {l₁ l₂ l : Mathlib.Tactic.FieldSimp.NF M} {x₁ x₂ : M},
x₁ = l₁.eval → x₂ = l₂.eval → l₁.eval / l₂.eval = l.eval → x₁ / x₂ = l.eval
theorem Mathlib.Tactic.FieldSimp.NF.eval_mul_eval_cons E1 #
∀ {M : Type u_1} [inst : CommGroupWithZero M] (n : ℤ) (e : M) {L l l' : Mathlib.Tactic.FieldSimp.NF M},
L.eval * l.eval = l'.eval → L.eval * ((n, e) ::ᵣ l).eval = ((n, e) ::ᵣ l').eval
theorem Mathlib.Tactic.FieldSimp.NF.eval_mul_eval_cons_zero E1 #
∀ {M : Type u_1} [inst : CommGroupWithZero M] {e : M} {L l l' l₀ : Mathlib.Tactic.FieldSimp.NF M},
L.eval * l.eval = l'.eval → ((0, e) ::ᵣ l).eval = l₀.eval → L.eval * l₀.eval = ((0, e) ::ᵣ l').eval
theorem Mathlib.Tactic.FieldSimp.NF.eval_cons_mul_eval E1 #
∀ {M : Type u_1} [inst : CommGroupWithZero M] (n : ℤ) (e : M) {L l l' : Mathlib.Tactic.FieldSimp.NF M},
L.eval * l.eval = l'.eval → ((n, e) ::ᵣ L).eval * l.eval = ((n, e) ::ᵣ l').eval
theorem Mathlib.Tactic.FieldSimp.NF.eval_cons_mul_eval_cons_neg E1 #
∀ {M : Type u_1} [inst : CommGroupWithZero M] (n : ℤ) {e : M},
e ≠ 0 →
∀ {L l l' : Mathlib.Tactic.FieldSimp.NF M},
L.eval * l.eval = l'.eval → ((n, e) ::ᵣ L).eval * ((-n, e) ::ᵣ l).eval = l'.eval
theorem Mathlib.Tactic.FieldSimp.NF.cons_eq_div_of_eq_div E1 #
∀ {M : Type u_1} [inst : CommGroupWithZero M] (n : ℤ) (e : M) {t t_n t_d : Mathlib.Tactic.FieldSimp.NF M},
t.eval = t_n.eval / t_d.eval → ((n, e) ::ᵣ t).eval = ((n, e) ::ᵣ t_n).eval / t_d.eval
theorem Mathlib.Tactic.FieldSimp.NF.cons_eq_div_of_eq_div' E1 #
∀ {M : Type u_1} [inst : CommGroupWithZero M] (n : ℤ) (e : M) {t t_n t_d : Mathlib.Tactic.FieldSimp.NF M},
t.eval = t_n.eval / t_d.eval → ((-n, e) ::ᵣ t).eval = t_n.eval / ((n, e) ::ᵣ t_d).eval
theorem Mathlib.Tactic.FieldSimp.NF.cons_zero_eq_div_of_eq_div E1 #
∀ {M : Type u_1} [inst : CommGroupWithZero M] (e : M) {t t_n t_d : Mathlib.Tactic.FieldSimp.NF M},
t.eval = t_n.eval / t_d.eval → ((0, e) ::ᵣ t).eval = ((1, e) ::ᵣ t_n).eval / ((1, e) ::ᵣ t_d).eval
instance Mathlib.Tactic.FieldSimp.NF.instInv E0 #
{M : Type u_1} → Inv (Mathlib.Tactic.FieldSimp.NF M)
theorem Mathlib.Tactic.FieldSimp.NF.eval_inv E1 #
∀ {M : Type u_1} [inst : CommGroupWithZero M] (l : Mathlib.Tactic.FieldSimp.NF M), l⁻¹.eval = l.eval⁻¹
theorem Mathlib.Tactic.FieldSimp.NF.one_div_eq_eval E1 #
∀ {M : Type u_1} [inst : CommGroupWithZero M] (l : Mathlib.Tactic.FieldSimp.NF M), 1 / l.eval = l⁻¹.eval
theorem Mathlib.Tactic.FieldSimp.NF.inv_eq_eval E1 #
∀ {M : Type u_1} [inst : CommGroupWithZero M] {l : Mathlib.Tactic.FieldSimp.NF M} {x : M}, x = l.eval → x⁻¹ = l⁻¹.eval
instance Mathlib.Tactic.FieldSimp.NF.instPowInt E0 #
{M : Type u_1} → Pow (Mathlib.Tactic.FieldSimp.NF M) ℤ
theorem Mathlib.Tactic.FieldSimp.NF.zpow_apply E0 #
∀ {M : Type u_1} (r : ℤ) (l : Mathlib.Tactic.FieldSimp.NF M),
l ^ r =
List.map
(fun x ↦
match x with
| (a, x) => (r * a, x))
l
theorem Mathlib.Tactic.FieldSimp.NF.eval_zpow' E1 #
∀ {M : Type u_1} [inst : CommGroupWithZero M] (l : Mathlib.Tactic.FieldSimp.NF M) (r : ℤ),
(l ^ r).eval = Mathlib.Tactic.FieldSimp.zpow' l.eval r
theorem Mathlib.Tactic.FieldSimp.NF.zpow_eq_eval E1 #
∀ {M : Type u_1} [inst : CommGroupWithZero M] {l : Mathlib.Tactic.FieldSimp.NF M} {r : ℤ},
r ≠ 0 → ∀ {x : M}, x = l.eval → x ^ r = (l ^ r).eval
instance Mathlib.Tactic.FieldSimp.NF.instPowNat E0 #
{M : Type u_1} → Pow (Mathlib.Tactic.FieldSimp.NF M) ℕ
theorem Mathlib.Tactic.FieldSimp.NF.pow_apply E0 #
∀ {M : Type u_1} (r : ℕ) (l : Mathlib.Tactic.FieldSimp.NF M),
l ^ r =
List.map
(fun x ↦
match x with
| (a, x) => (↑r * a, x))
l
theorem Mathlib.Tactic.FieldSimp.NF.eval_pow E1 #
∀ {M : Type u_1} [inst : CommGroupWithZero M] (l : Mathlib.Tactic.FieldSimp.NF M) (r : ℕ),
(l ^ r).eval = Mathlib.Tactic.FieldSimp.zpow' l.eval ↑r
theorem Mathlib.Tactic.FieldSimp.NF.pow_eq_eval E1 #
∀ {M : Type u_1} [inst : CommGroupWithZero M] {l : Mathlib.Tactic.FieldSimp.NF M} {r : ℕ},
r ≠ 0 → ∀ {x : M}, x = l.eval → x ^ r = (l ^ r).eval
theorem Mathlib.Tactic.FieldSimp.NF.eval_cons_of_pow_eq_zero E1 #
∀ {M : Type u_1} [inst : CommGroupWithZero M] {r : ℤ},
r = 0 → ∀ {x : M}, x ≠ 0 → ∀ (l : Mathlib.Tactic.FieldSimp.NF M), ((r, x) ::ᵣ l).eval = l.eval
theorem Mathlib.Tactic.FieldSimp.NF.eval_cons_eq_eval_of_eq_of_eq E0 #
∀ {M : Type u_1} [inst : CommGroupWithZero M] (r : ℤ) (x : M) {t t' l' : Mathlib.Tactic.FieldSimp.NF M},
t.eval = t'.eval → ((r, x) ::ᵣ t').eval = l'.eval → ((r, x) ::ᵣ t).eval = l'.eval
inductive Mathlib.Tactic.FieldSimp.Sign E1 #
{v : Lean.Level} → Q(Type v) → Type
Inductive type representing the options for the sign of an element in a type-expression M
If the sign is "-", then we also carry an expression for a field instance on M, to allow us to
construct that negation when needed.
ctor Mathlib.Tactic.FieldSimp.Sign.plus E0 #
{v : Lean.Level} → {M : Q(Type v)} → Mathlib.Tactic.FieldSimp.Sign M
ctor Mathlib.Tactic.FieldSimp.Sign.minus E0 #
{v : Lean.Level} → {M : Q(Type v)} → Q(Field «$M») → Mathlib.Tactic.FieldSimp.Sign M
def Mathlib.Tactic.FieldSimp.Sign.expr E1 #
{v : Lean.Level} → {M : Q(Type v)} → Mathlib.Tactic.FieldSimp.Sign M → Q(«$M») → Q(«$M»)
Given an expression e : Q($M), construct an expression which is morally "± e", with the
choice between + and - determined by an object g : Sign M.
def Mathlib.Tactic.FieldSimp.Sign.mulRight E1 #
{v : Lean.Level} →
{M : Q(Type v)} →
(iM : Q(CommGroupWithZero «$M»)) →
(c y : Q(«$M»)) →
(g : Mathlib.Tactic.FieldSimp.Sign M) →
Lean.MetaM
(have a := g.expr y;
have a_1 := g.expr q(«$c» * «$y»);
Q(«$a_1» = «$c» * «$a»))
Given an expression y : Q($M) with specified sign (either + or -), construct a proof that
the product with c of (± y) (here taking the specified sign) is ± c * y.
def Mathlib.Tactic.FieldSimp.Sign.mul E1 #
{v : Lean.Level} →
{M : Q(Type v)} →
(iM : Q(CommGroupWithZero «$M»)) →
(y₁ y₂ : Q(«$M»)) →
(g₁ g₂ : Mathlib.Tactic.FieldSimp.Sign M) →
Lean.MetaM
((G : Mathlib.Tactic.FieldSimp.Sign M) ×
have a := G.expr q(«$y₁» * «$y₂»);
have a_1 := g₂.expr y₂;
have a_2 := g₁.expr y₁;
Q(«$a_2» * «$a_1» = «$a»))
Given expressions y₁ y₂ : Q($M) with specified signs (either + or -), construct a proof that
the product of (± y₁) and (± y₂) (here taking the specified signs) is ± y₁ * y₂; return this
proof and the computed sign.
def Mathlib.Tactic.FieldSimp.Sign.inv E1 #
{v : Lean.Level} →
{M : Q(Type v)} →
(iM : Q(CommGroupWithZero «$M»)) →
(y : Q(«$M»)) →
(g : Mathlib.Tactic.FieldSimp.Sign M) →
Lean.MetaM
(have a := g.expr q(«$y»⁻¹);
have a_1 := g.expr y;
Q(«$a_1»⁻¹ = «$a»))
Given an expression y : Q($M) with specified sign (either + or -), construct a proof that
the inverse of (± y) (here taking the specified sign) is ± y⁻¹.
def Mathlib.Tactic.FieldSimp.Sign.div E1 #
{v : Lean.Level} →
{M : Q(Type v)} →
(iM : Q(CommGroupWithZero «$M»)) →
(y₁ y₂ : Q(«$M»)) →
(g₁ g₂ : Mathlib.Tactic.FieldSimp.Sign M) →
Lean.MetaM
((G : Mathlib.Tactic.FieldSimp.Sign M) ×
have a := G.expr q(«$y₁» / «$y₂»);
have a_1 := g₂.expr y₂;
have a_2 := g₁.expr y₁;
Q(«$a_2» / «$a_1» = «$a»))
Given expressions y₁ y₂ : Q($M) with specified signs (either + or -), construct a proof that
the quotient of (± y₁) and (± y₂) (here taking the specified signs) is ± y₁ / y₂; return this
proof and the computed sign.
def Mathlib.Tactic.FieldSimp.Sign.neg E1 #
{v : Lean.Level} →
{M : Q(Type v)} →
(iM : Q(Field «$M»)) →
(y : Q(«$M»)) →
(g : Mathlib.Tactic.FieldSimp.Sign M) →
Lean.MetaM
((G : Mathlib.Tactic.FieldSimp.Sign M) ×
have a := G.expr y;
have a_1 := g.expr y;
Q(-«$a_1» = «$a»))
Given an expression y : Q($M) with specified sign (either + or -), construct a proof that
the negation of (± y) (here taking the specified sign) is ∓ y.
def Mathlib.Tactic.FieldSimp.Sign.pow E1 #
{v : Lean.Level} →
{M : Q(Type v)} →
(iM : Q(CommGroupWithZero «$M»)) →
(y : Q(«$M»)) →
(g : Mathlib.Tactic.FieldSimp.Sign M) →
(s : ℕ) →
Lean.MetaM
((G : Mathlib.Tactic.FieldSimp.Sign M) ×
have a := G.expr q(«$y» ^ «$s»);
have a_1 := g.expr y;
Q(«$a_1» ^ «$s» = «$a»))
Given an expression y : Q($M) with specified sign (either + or -), construct a proof that
the exponentiation to power s : ℕ of (± y) (here taking the specified signs) is ± y ^ s;
return this proof and the computed sign.
def Mathlib.Tactic.FieldSimp.Sign.zpow E1 #
{v : Lean.Level} →
{M : Q(Type v)} →
(iM : Q(CommGroupWithZero «$M»)) →
(y : Q(«$M»)) →
(g : Mathlib.Tactic.FieldSimp.Sign M) →
(s : ℤ) →
Lean.MetaM
((G : Mathlib.Tactic.FieldSimp.Sign M) ×
have a := G.expr q(«$y» ^ «$s»);
have a_1 := g.expr y;
Q(«$a_1» ^ «$s» = «$a»))
Given an expression y : Q($M) with specified sign (either + or -), construct a proof that
the exponentiation to power s : ℤ of (± y) (here taking the specified signs) is ± y ^ s;
return this proof and the computed sign.
def Mathlib.Tactic.FieldSimp.Sign.congr E1 #
{v : Lean.Level} →
{M : Q(Type v)} →
{y y' : Q(«$M»)} →
(g : Mathlib.Tactic.FieldSimp.Sign M) →
Q(«$y» = «$y'») →
have a := g.expr y';
have a_1 := g.expr y;
Q(«$a_1» = «$a»)
Given a proof that two expressions y₁ y₂ : Q($M) are equal, construct a proof that (± y₁)
and (± y₂) are equal, where the same sign is taken in both expression.
def Mathlib.Tactic.FieldSimp.Sign.mkEqMul E1 #
{v : Lean.Level} →
{M : Q(Type v)} →
(iM : Q(CommGroupWithZero «$M»)) →
{a b C d e : Q(«$M»)} →
{g : Mathlib.Tactic.FieldSimp.Sign M} →
(have a_1 := g.expr b;
Q(«$a» = «$a_1»)) →
Q(«$b» = «$C» * «$d») →
Q(«$d» = «$e») →
Lean.MetaM
(have a_1 := g.expr e;
Q(«$a» = «$C» * «$a_1»))
If a = ± b, b = C * d, and d = e, construct a proof that a = C * ± e.