tasksource/leandojo huggingface dataset:
Theorem: List.formPerm_rotate_one
File: Mathlib/GroupTheory/Perm/List.lean

tactic: have h' : Nodup (l.rotate 1) := by simpa using h
state_before: α : Type u_1
β : Type ?u.770921
inst✝ : DecidableEq α
l✝ : List α
x : α
l : List α
h : Nodup l
⊢ formPerm (rotate l 1) = formPerm l

tactic: ext x
state_before: α : Type u_1
β : Type ?u.770921
inst✝ : DecidableEq α
l✝ : List α
x : α
l : List α
h : Nodup l
h' : Nodup (rotate l 1)
⊢ formPerm (rotate l 1) = formPerm l

tactic: by_cases hx : x ∈ l.rotate 1
state_before: case H
α : Type u_1
β : Type ?u.770921
inst✝ : DecidableEq α
l✝ : List α
x✝ : α
l : List α
h : Nodup l
h' : Nodup (rotate l 1)
x : α
⊢ ↑(formPerm (rotate l 1)) x = ↑(formPerm l) x

tactic: simpa using h
state_before: α : Type u_1
β : Type ?u.770921
inst✝ : DecidableEq α
l✝ : List α
x : α
l : List α
h : Nodup l
⊢ Nodup (rotate l 1)

tactic: obtain ⟨k, hk, rfl⟩ := nthLe_of_mem hx
state_before: case pos
α : Type u_1
β : Type ?u.770921
inst✝ : DecidableEq α
l✝ : List α
x✝ : α
l : List α
h : Nodup l
h' : Nodup (rotate l 1)
x : α
hx : x ∈ rotate l 1
⊢ ↑(formPerm (rotate l 1)) x = ↑(formPerm l) x

tactic: rw [formPerm_apply_nthLe _ h', nthLe_rotate l, nthLe_rotate l, formPerm_apply_nthLe _ h]
state_before: case pos.intro.intro
α : Type u_1
β : Type ?u.770921
inst✝ : DecidableEq α
l✝ : List α
x : α
l : List α
h : Nodup l
h' : Nodup (rotate l 1)
k : ℕ
hk : k < length (rotate l 1)
hx : nthLe (rotate l 1) k hk ∈ rotate l 1
⊢ ↑(formPerm (rotate l 1)) (nthLe (rotate l 1) k hk) = ↑(formPerm l) (nthLe (rotate l 1) k hk)

tactic: simp
state_before: case pos.intro.intro
α : Type u_1
β : Type ?u.770921
inst✝ : DecidableEq α
l✝ : List α
x : α
l : List α
h : Nodup l
h' : Nodup (rotate l 1)
k : ℕ
hk : k < length (rotate l 1)
hx : nthLe (rotate l 1) k hk ∈ rotate l 1
⊢ nthLe l (((k + 1) % length (rotate l 1) + 1) % length l)
      (_ : ((k + 1) % length (rotate l 1) + 1) % length l < length l) =
    nthLe l (((k + 1) % length l + 1) % length l) (_ : ((k + 1) % length l + 1) % length l < length l)

tactic: rw [formPerm_apply_of_not_mem _ _ hx, formPerm_apply_of_not_mem]
state_before: case neg
α : Type u_1
β : Type ?u.770921
inst✝ : DecidableEq α
l✝ : List α
x✝ : α
l : List α
h : Nodup l
h' : Nodup (rotate l 1)
x : α
hx : ¬x ∈ rotate l 1
⊢ ↑(formPerm (rotate l 1)) x = ↑(formPerm l) x

tactic: simpa using hx
state_before: case neg.h
α : Type u_1
β : Type ?u.770921
inst✝ : DecidableEq α
l✝ : List α
x✝ : α
l : List α
h : Nodup l
h' : Nodup (rotate l 1)
x : α
hx : ¬x ∈ rotate l 1
⊢ ¬x ∈ l
Theorem: Fin.cast_to_equiv
File: Mathlib/Data/Fin/Basic.lean

tactic: subst h
state_before: n m : ℕ
h : n = m
⊢ (cast h).toEquiv = Equiv.cast (_ : Fin n = Fin m)

tactic: simp
state_before: n : ℕ
⊢ (cast (_ : n = n)).toEquiv = Equiv.cast (_ : Fin n = Fin n)
Theorem: Polynomial.eq_zero_of_hasseDeriv_eq_zero
File: Mathlib/Data/Polynomial/Taylor.lean

tactic: apply taylor_injective r
state_before: R✝ : Type ?u.227456
inst✝¹ : Semiring R✝
r✝ : R✝
f✝ : R✝[X]
R : Type u_1
inst✝ : CommRing R
f : R[X]
r : R
h : ∀ (k : ℕ), eval r (↑(hasseDeriv k) f) = 0
⊢ f = 0

tactic: rw [LinearMap.map_zero]
state_before: case a
R✝ : Type ?u.227456
inst✝¹ : Semiring R✝
r✝ : R✝
f✝ : R✝[X]
R : Type u_1
inst✝ : CommRing R
f : R[X]
r : R
h : ∀ (k : ℕ), eval r (↑(hasseDeriv k) f) = 0
⊢ ↑(taylor r) f = ↑(taylor r) 0

tactic: ext k
state_before: case a
R✝ : Type ?u.227456
inst✝¹ : Semiring R✝
r✝ : R✝
f✝ : R✝[X]
R : Type u_1
inst✝ : CommRing R
f : R[X]
r : R
h : ∀ (k : ℕ), eval r (↑(hasseDeriv k) f) = 0
⊢ ↑(taylor r) f = 0

tactic: simp only [taylor_coeff, h, coeff_zero]
state_before: case a.a
R✝ : Type ?u.227456
inst✝¹ : Semiring R✝
r✝ : R✝
f✝ : R✝[X]
R : Type u_1
inst✝ : CommRing R
f : R[X]
r : R
h : ∀ (k : ℕ), eval r (↑(hasseDeriv k) f) = 0
k : ℕ
⊢ coeff (↑(taylor r) f) k = coeff 0 k
Theorem: Behrend.map_eq_iff
File: Mathlib/Combinatorics/Additive/Behrend.lean

tactic: refine' ⟨fun h => _, fun h => by rw [map_succ', map_succ', h.1, h.2]⟩
state_before: α : Type ?u.248271
β : Type ?u.248274
n d k N : ℕ
x : Fin n → ℕ
x₁ x₂ : Fin (succ n) → ℕ
hx₁ : ∀ (i : Fin (succ n)), x₁ i < d
hx₂ : ∀ (i : Fin (succ n)), x₂ i < d
⊢ ↑(map d) x₁ = ↑(map d) x₂ ↔ x₁ 0 = x₂ 0 ∧ ↑(map d) (x₁ ∘ Fin.succ) = ↑(map d) (x₂ ∘ Fin.succ)

tactic: have : x₁ 0 = x₂ 0 := by
  rw [← mod_eq_of_lt (hx₁ _), ← map_mod, ← mod_eq_of_lt (hx₂ _), ← map_mod, h]
state_before: α : Type ?u.248271
β : Type ?u.248274
n d k N : ℕ
x : Fin n → ℕ
x₁ x₂ : Fin (succ n) → ℕ
hx₁ : ∀ (i : Fin (succ n)), x₁ i < d
hx₂ : ∀ (i : Fin (succ n)), x₂ i < d
h : ↑(map d) x₁ = ↑(map d) x₂
⊢ x₁ 0 = x₂ 0 ∧ ↑(map d) (x₁ ∘ Fin.succ) = ↑(map d) (x₂ ∘ Fin.succ)

tactic: rw [map_succ, map_succ, this, add_right_inj, mul_eq_mul_right_iff] at h
state_before: α : Type ?u.248271
β : Type ?u.248274
n d k N : ℕ
x : Fin n → ℕ
x₁ x₂ : Fin (succ n) → ℕ
hx₁ : ∀ (i : Fin (succ n)), x₁ i < d
hx₂ : ∀ (i : Fin (succ n)), x₂ i < d
h : ↑(map d) x₁ = ↑(map d) x₂
this : x₁ 0 = x₂ 0
⊢ x₁ 0 = x₂ 0 ∧ ↑(map d) (x₁ ∘ Fin.succ) = ↑(map d) (x₂ ∘ Fin.succ)

tactic: exact ⟨this, h.resolve_right (pos_of_gt (hx₁ 0)).ne'⟩
state_before: α : Type ?u.248271
β : Type ?u.248274
n d k N : ℕ
x : Fin n → ℕ
x₁ x₂ : Fin (succ n) → ℕ
hx₁ : ∀ (i : Fin (succ n)), x₁ i < d
hx₂ : ∀ (i : Fin (succ n)), x₂ i < d
h : ∑ x : Fin n, x₁ (Fin.succ x) * d ^ ↑x = ∑ x : Fin n, x₂ (Fin.succ x) * d ^ ↑x ∨ d = 0
this : x₁ 0 = x₂ 0
⊢ x₁ 0 = x₂ 0 ∧ ↑(map d) (x₁ ∘ Fin.succ) = ↑(map d) (x₂ ∘ Fin.succ)

tactic: rw [map_succ', map_succ', h.1, h.2]
state_before: α : Type ?u.248271
β : Type ?u.248274
n d k N : ℕ
x : Fin n → ℕ
x₁ x₂ : Fin (succ n) → ℕ
hx₁ : ∀ (i : Fin (succ n)), x₁ i < d
hx₂ : ∀ (i : Fin (succ n)), x₂ i < d
h : x₁ 0 = x₂ 0 ∧ ↑(map d) (x₁ ∘ Fin.succ) = ↑(map d) (x₂ ∘ Fin.succ)
⊢ ↑(map d) x₁ = ↑(map d) x₂

tactic: rw [← mod_eq_of_lt (hx₁ _), ← map_mod, ← mod_eq_of_lt (hx₂ _), ← map_mod, h]
state_before: α : Type ?u.248271
β : Type ?u.248274
n d k N : ℕ
x : Fin n → ℕ
x₁ x₂ : Fin (succ n) → ℕ
hx₁ : ∀ (i : Fin (succ n)), x₁ i < d
hx₂ : ∀ (i : Fin (succ n)), x₂ i < d
h : ↑(map d) x₁ = ↑(map d) x₂
⊢ x₁ 0 = x₂ 0
Theorem: Filter.tendsto_cocompact_mul_left
File: Mathlib/Topology/Algebra/Monoid.lean

tactic: refine Filter.Tendsto.of_tendsto_comp ?_ (Filter.comap_cocompact_le (continuous_mul_left b))
state_before: ι : Type ?u.371356
α : Type ?u.371359
X : Type ?u.371362
M : Type u_1
N : Type ?u.371368
inst✝³ : TopologicalSpace X
inst✝² : TopologicalSpace M
inst✝¹ : Monoid M
inst✝ : ContinuousMul M
a b : M
ha : b * a = 1
⊢ Tendsto (fun x => a * x) (cocompact M) (cocompact M)

tactic: simp only [comp_mul_left, ha, one_mul]
state_before: ι : Type ?u.371356
α : Type ?u.371359
X : Type ?u.371362
M : Type u_1
N : Type ?u.371368
inst✝³ : TopologicalSpace X
inst✝² : TopologicalSpace M
inst✝¹ : Monoid M
inst✝ : ContinuousMul M
a b : M
ha : b * a = 1
⊢ Tendsto ((fun b_1 => b * b_1) ∘ fun x => a * x) (cocompact M) (cocompact M)

tactic: exact Filter.tendsto_id
state_before: ι : Type ?u.371356
α : Type ?u.371359
X : Type ?u.371362
M : Type u_1
N : Type ?u.371368
inst✝³ : TopologicalSpace X
inst✝² : TopologicalSpace M
inst✝¹ : Monoid M
inst✝ : ContinuousMul M
a b : M
ha : b * a = 1
⊢ Tendsto (fun x => x) (cocompact M) (cocompact M)
Theorem: tendsto_real_toNNReal_atTop
File: Mathlib/Topology/Instances/NNReal.lean

tactic: rw [← tendsto_coe_atTop]
state_before: α : Type ?u.20927
⊢ Tendsto Real.toNNReal atTop atTop

tactic: exact tendsto_atTop_mono Real.le_coe_toNNReal tendsto_id
state_before: α : Type ?u.20927
⊢ Tendsto (fun a => ↑(Real.toNNReal a)) atTop atTop
Theorem: MeasureTheory.iUnion_spanningSets
File: Mathlib/MeasureTheory/Measure/MeasureSpace.lean

tactic: simp_rw [spanningSets, iUnion_accumulate, μ.toFiniteSpanningSetsIn.spanning]
state_before: α : Type u_1
β : Type ?u.726384
γ : Type ?u.726387
δ : Type ?u.726390
ι : Type ?u.726393
R : Type ?u.726396
R' : Type ?u.726399
m0 : MeasurableSpace α
inst✝² : MeasurableSpace β
inst✝¹ : MeasurableSpace γ
μ✝ μ₁ μ₂ μ₃ ν ν' ν₁ ν₂ : Measure α
s s' t : Set α
μ : Measure α
inst✝ : SigmaFinite μ
⊢ (⋃ (i : ℕ), spanningSets μ i) = univ
Theorem: isLittleO_log_rpow_rpow_atTop
File: Mathlib/Analysis/SpecialFunctions/Pow/Asymptotics.lean

tactic: have hx₀ : 0 ≤ log x := zero_le_one.trans hx
state_before: s r : ℝ
hs : 0 < s
r' : ℝ := max r 1
hr : 0 < r'
H : 0 < s / r'
x : ℝ
hx : 1 ≤ log x
⊢ ‖log x ^ r‖ ≤ 1 * ‖log x ^ r'‖

tactic: simp [norm_eq_abs, abs_rpow_of_nonneg, abs_rpow_of_nonneg hx₀,
  rpow_le_rpow_of_exponent_le (hx.trans (le_abs_self _))]
state_before: s r : ℝ
hs : 0 < s
r' : ℝ := max r 1
hr : 0 < r'
H : 0 < s / r'
x : ℝ
hx : 1 ≤ log x
hx₀ : 0 ≤ log x
⊢ ‖log x ^ r‖ ≤ 1 * ‖log x ^ r'‖

tactic: simp only [← rpow_mul hx, div_mul_cancel _ hr.ne']
state_before: s r : ℝ
hs : 0 < s
r' : ℝ := max r 1
hr : 0 < r'
H : 0 < s / r'
x : ℝ
hx : 0 ≤ x
⊢ (fun x => (x ^ (s / r')) ^ r') x = (fun x => x ^ s) x
Theorem: Nat.mul_mod_mul_right
File: Std/Data/Nat/Lemmas.lean

tactic: rw [Nat.mul_comm x z, Nat.mul_comm y z, Nat.mul_comm (x % y) z]
state_before: z x y : Nat
⊢ x * z % (y * z) = x % y * z

tactic: apply mul_mod_mul_left
state_before: z x y : Nat
⊢ z * x % (z * y) = z * (x % y)
Theorem: List.insertNth_eq_insertNthTR
File: Std/Data/List/Basic.lean

tactic: funext α f n l
state_before: ⊢ @insertNth = @insertNthTR

tactic: simp [insertNthTR, insertNthTR_go_eq]
state_before: case h.h.h.h
α : Type u_1
f : Nat
n : α
l : List α
⊢ insertNth f n l = insertNthTR f n l
Theorem: AlgHom.snd_prod
File: Mathlib/Algebra/Algebra/Prod.lean

tactic: ext
state_before: R : Type u_1
A : Type u_2
B : Type u_3
C : Type u_4
inst✝⁶ : CommSemiring R
inst✝⁵ : Semiring A
inst✝⁴ : Algebra R A
inst✝³ : Semiring B
inst✝² : Algebra R B
inst✝¹ : Semiring C
inst✝ : Algebra R C
f : A →ₐ[R] B
g : A →ₐ[R] C
⊢ comp (snd R B C) (prod f g) = g

tactic: rfl
state_before: case H
R : Type u_1
A : Type u_2
B : Type u_3
C : Type u_4
inst✝⁶ : CommSemiring R
inst✝⁵ : Semiring A
inst✝⁴ : Algebra R A
inst✝³ : Semiring B
inst✝² : Algebra R B
inst✝¹ : Semiring C
inst✝ : Algebra R C
f : A →ₐ[R] B
g : A →ₐ[R] C
x✝ : A
⊢ ↑(comp (snd R B C) (prod f g)) x✝ = ↑g x✝
Theorem: pow_two_pow_sub_pow_two_pow
File: Mathlib/NumberTheory/Multiplicity.lean

tactic: induction' n with d hd
state_before: R : Type u_1
n✝ : ℕ
inst✝ : CommRing R
x y : R
n : ℕ
⊢ x ^ 2 ^ n - y ^ 2 ^ n = (∏ i in range n, (x ^ 2 ^ i + y ^ 2 ^ i)) * (x - y)

tactic: simp only [pow_zero, pow_one, range_zero, prod_empty, one_mul, Nat.zero_eq]
state_before: case zero
R : Type u_1
n : ℕ
inst✝ : CommRing R
x y : R
⊢ x ^ 2 ^ Nat.zero - y ^ 2 ^ Nat.zero = (∏ i in range Nat.zero, (x ^ 2 ^ i + y ^ 2 ^ i)) * (x - y)

tactic: suffices x ^ 2 ^ d.succ - y ^ 2 ^ d.succ = (x ^ 2 ^ d + y ^ 2 ^ d) * (x ^ 2 ^ d - y ^ 2 ^ d) by
  rw [this, hd, Finset.prod_range_succ, ← mul_assoc, mul_comm (x ^ 2 ^ d + y ^ 2 ^ d)]
state_before: case succ
R : Type u_1
n : ℕ
inst✝ : CommRing R
x y : R
d : ℕ
hd : x ^ 2 ^ d - y ^ 2 ^ d = (∏ i in range d, (x ^ 2 ^ i + y ^ 2 ^ i)) * (x - y)
⊢ x ^ 2 ^ Nat.succ d - y ^ 2 ^ Nat.succ d = (∏ i in range (Nat.succ d), (x ^ 2 ^ i + y ^ 2 ^ i)) * (x - y)

tactic: rw [this, hd, Finset.prod_range_succ, ← mul_assoc, mul_comm (x ^ 2 ^ d + y ^ 2 ^ d)]
state_before: R : Type u_1
n : ℕ
inst✝ : CommRing R
x y : R
d : ℕ
hd : x ^ 2 ^ d - y ^ 2 ^ d = (∏ i in range d, (x ^ 2 ^ i + y ^ 2 ^ i)) * (x - y)
this : x ^ 2 ^ Nat.succ d - y ^ 2 ^ Nat.succ d = (x ^ 2 ^ d + y ^ 2 ^ d) * (x ^ 2 ^ d - y ^ 2 ^ d)
⊢ x ^ 2 ^ Nat.succ d - y ^ 2 ^ Nat.succ d = (∏ i in range (Nat.succ d), (x ^ 2 ^ i + y ^ 2 ^ i)) * (x - y)

tactic: rw [Nat.succ_eq_add_one]
state_before: case succ
R : Type u_1
n : ℕ
inst✝ : CommRing R
x y : R
d : ℕ
hd : x ^ 2 ^ d - y ^ 2 ^ d = (∏ i in range d, (x ^ 2 ^ i + y ^ 2 ^ i)) * (x - y)
⊢ x ^ 2 ^ Nat.succ d - y ^ 2 ^ Nat.succ d = (x ^ 2 ^ d + y ^ 2 ^ d) * (x ^ 2 ^ d - y ^ 2 ^ d)

tactic: ring
state_before: case succ
R : Type u_1
n : ℕ
inst✝ : CommRing R
x y : R
d : ℕ
hd : x ^ 2 ^ d - y ^ 2 ^ d = (∏ i in range d, (x ^ 2 ^ i + y ^ 2 ^ i)) * (x - y)
⊢ x ^ 2 ^ (d + 1) - y ^ 2 ^ (d + 1) = (x ^ 2 ^ d + y ^ 2 ^ d) * (x ^ 2 ^ d - y ^ 2 ^ d)
Theorem: Finsupp.total_onFinset
File: Mathlib/LinearAlgebra/Finsupp.lean

tactic: simp only [Finsupp.total_apply, Finsupp.sum, Finsupp.onFinset_apply, Finsupp.support_onFinset]
state_before: α : Type u_1
M : Type u_3
N : Type ?u.456003
P : Type ?u.456006
R : Type u_2
S : Type ?u.456012
inst✝¹² : Semiring R
inst✝¹¹ : Semiring S
inst✝¹⁰ : AddCommMonoid M
inst✝⁹ : Module R M
inst✝⁸ : AddCommMonoid N
inst✝⁷ : Module R N
inst✝⁶ : AddCommMonoid P
inst✝⁵ : Module R P
α' : Type ?u.456104
M' : Type ?u.456107
inst✝⁴ : Semiring R
inst✝³ : AddCommMonoid M'
inst✝² : AddCommMonoid M
inst✝¹ : Module R M'
inst✝ : Module R M
v : α → M
v' : α' → M'
s : Finset α
f : α → R
g : α → M
hf : ∀ (a : α), f a ≠ 0 → a ∈ s
⊢ ↑(Finsupp.total α M R g) (onFinset s f hf) = ∑ x in s, f x • g x

tactic: rw [Finset.sum_filter_of_ne]
state_before: α : Type u_1
M : Type u_3
N : Type ?u.456003
P : Type ?u.456006
R : Type u_2
S : Type ?u.456012
inst✝¹² : Semiring R
inst✝¹¹ : Semiring S
inst✝¹⁰ : AddCommMonoid M
inst✝⁹ : Module R M
inst✝⁸ : AddCommMonoid N
inst✝⁷ : Module R N
inst✝⁶ : AddCommMonoid P
inst✝⁵ : Module R P
α' : Type ?u.456104
M' : Type ?u.456107
inst✝⁴ : Semiring R
inst✝³ : AddCommMonoid M'
inst✝² : AddCommMonoid M
inst✝¹ : Module R M'
inst✝ : Module R M
v : α → M
v' : α' → M'
s : Finset α
f : α → R
g : α → M
hf : ∀ (a : α), f a ≠ 0 → a ∈ s
⊢ ∑ x in Finset.filter (fun a => f a ≠ 0) s, f x • g x = ∑ x in s, f x • g x

tactic: intro x _ h
state_before: α : Type u_1
M : Type u_3
N : Type ?u.456003
P : Type ?u.456006
R : Type u_2
S : Type ?u.456012
inst✝¹² : Semiring R
inst✝¹¹ : Semiring S
inst✝¹⁰ : AddCommMonoid M
inst✝⁹ : Module R M
inst✝⁸ : AddCommMonoid N
inst✝⁷ : Module R N
inst✝⁶ : AddCommMonoid P
inst✝⁵ : Module R P
α' : Type ?u.456104
M' : Type ?u.456107
inst✝⁴ : Semiring R
inst✝³ : AddCommMonoid M'
inst✝² : AddCommMonoid M
inst✝¹ : Module R M'
inst✝ : Module R M
v : α → M
v' : α' → M'
s : Finset α
f : α → R
g : α → M
hf : ∀ (a : α), f a ≠ 0 → a ∈ s
⊢ ∀ (x : α), x ∈ s → f x • g x ≠ 0 → f x ≠ 0

tactic: contrapose! h
state_before: α : Type u_1
M : Type u_3
N : Type ?u.456003
P : Type ?u.456006
R : Type u_2
S : Type ?u.456012
inst✝¹² : Semiring R
inst✝¹¹ : Semiring S
inst✝¹⁰ : AddCommMonoid M
inst✝⁹ : Module R M
inst✝⁸ : AddCommMonoid N
inst✝⁷ : Module R N
inst✝⁶ : AddCommMonoid P
inst✝⁵ : Module R P
α' : Type ?u.456104
M' : Type ?u.456107
inst✝⁴ : Semiring R
inst✝³ : AddCommMonoid M'
inst✝² : AddCommMonoid M
inst✝¹ : Module R M'
inst✝ : Module R M
v : α → M
v' : α' → M'
s : Finset α
f : α → R
g : α → M
hf : ∀ (a : α), f a ≠ 0 → a ∈ s
x : α
a✝ : x ∈ s
h : f x • g x ≠ 0
⊢ f x ≠ 0

tactic: simp [h]
state_before: α : Type u_1
M : Type u_3
N : Type ?u.456003
P : Type ?u.456006
R : Type u_2
S : Type ?u.456012
inst✝¹² : Semiring R
inst✝¹¹ : Semiring S
inst✝¹⁰ : AddCommMonoid M
inst✝⁹ : Module R M
inst✝⁸ : AddCommMonoid N
inst✝⁷ : Module R N
inst✝⁶ : AddCommMonoid P
inst✝⁵ : Module R P
α' : Type ?u.456104
M' : Type ?u.456107
inst✝⁴ : Semiring R
inst✝³ : AddCommMonoid M'
inst✝² : AddCommMonoid M
inst✝¹ : Module R M'
inst✝ : Module R M
v : α → M
v' : α' → M'
s : Finset α
f : α → R
g : α → M
hf : ∀ (a : α), f a ≠ 0 → a ∈ s
x : α
a✝ : x ∈ s
h : f x = 0
⊢ f x • g x = 0
Theorem: Polynomial.monic_X_pow_add
File: Mathlib/Data/Polynomial/Monic.lean

tactic: rw [coeff_add, coeff_X_pow, if_pos rfl, coeff_eq_zero_of_degree_lt H1, add_zero]
state_before: R : Type u
S : Type v
a b : R
m n✝ : ℕ
ι : Type y
inst✝ : Semiring R
p q r : R[X]
n : ℕ
H : degree p ≤ ↑n
H1 : degree p < ↑(n + 1)
⊢ coeff (X ^ (n + 1) + p) (n + 1) = 1
Theorem: FermatPsp.a_id_helper
File: Mathlib/NumberTheory/FermatPsp.lean

tactic: change 1 < _
state_before: a b : ℕ
ha : 2 ≤ a
hb : 2 ≤ b
⊢ 2 ≤ (a ^ b - 1) / (a - 1)

tactic: have h₁ : a - 1 ∣ a ^ b - 1 := by simpa only [one_pow] using nat_sub_dvd_pow_sub_pow a 1 b
state_before: a b : ℕ
ha : 2 ≤ a
hb : 2 ≤ b
⊢ 1 < (a ^ b - 1) / (a - 1)

tactic: rw [Nat.lt_div_iff_mul_lt h₁, mul_one, tsub_lt_tsub_iff_right (Nat.le_of_succ_le ha)]
state_before: a b : ℕ
ha : 2 ≤ a
hb : 2 ≤ b
h₁ : a - 1 ∣ a ^ b - 1
⊢ 1 < (a ^ b - 1) / (a - 1)

tactic: convert pow_lt_pow (Nat.lt_of_succ_le ha) hb
state_before: a b : ℕ
ha : 2 ≤ a
hb : 2 ≤ b
h₁ : a - 1 ∣ a ^ b - 1
⊢ a < a ^ b

tactic: rw [pow_one]
state_before: case h.e'_3
a b : ℕ
ha : 2 ≤ a
hb : 2 ≤ b
h₁ : a - 1 ∣ a ^ b - 1
⊢ a = a ^ 1

tactic: simpa only [one_pow] using nat_sub_dvd_pow_sub_pow a 1 b
state_before: a b : ℕ
ha : 2 ≤ a
hb : 2 ≤ b
⊢ a - 1 ∣ a ^ b - 1
Theorem: Fin.cycleType_cycleRange
File: Mathlib/GroupTheory/Perm/Fin.lean

tactic: cases' i with i hi
state_before: n : ℕ
i : Fin (n + 1)
h0 : i ≠ 0
⊢ cycleType (cycleRange i) = {↑i + 1}

tactic: cases i
state_before: case mk
n i : ℕ
hi : i < n + 1
h0 : { val := i, isLt := hi } ≠ 0
⊢ cycleType (cycleRange { val := i, isLt := hi }) = {↑{ val := i, isLt := hi } + 1}

tactic: rw [cycleRange, cycleType_extendDomain]
state_before: case mk.succ
n n✝ : ℕ
hi : Nat.succ n✝ < n + 1
h0 : { val := Nat.succ n✝, isLt := hi } ≠ 0
⊢ cycleType (cycleRange { val := Nat.succ n✝, isLt := hi }) = {↑{ val := Nat.succ n✝, isLt := hi } + 1}

tactic: exact cycleType_finRotate
state_before: case mk.succ
n n✝ : ℕ
hi : Nat.succ n✝ < n + 1
h0 : { val := Nat.succ n✝, isLt := hi } ≠ 0
⊢ cycleType (finRotate (↑{ val := Nat.succ n✝, isLt := hi } + 1)) = {↑{ val := Nat.succ n✝, isLt := hi } + 1}

tactic: exact (h0 rfl).elim
state_before: case mk.zero
n : ℕ
hi : Nat.zero < n + 1
h0 : { val := Nat.zero, isLt := hi } ≠ 0
⊢ cycleType (cycleRange { val := Nat.zero, isLt := hi }) = {↑{ val := Nat.zero, isLt := hi } + 1}
Theorem: Finset.map_subtype_embedding_Ioc
File: Mathlib/Order/LocallyFinite.lean

tactic: rw [subtype_Ioc_eq]
state_before: α : Type u_1
β : Type ?u.220530
inst✝² : Preorder α
p : α → Prop
inst✝¹ : DecidablePred p
inst✝ : LocallyFiniteOrder α
a b : Subtype p
hp : ∀ ⦃a b x : α⦄, a ≤ x → x ≤ b → p a → p b → p x
⊢ map (Embedding.subtype p) (Ioc a b) = Ioc ↑a ↑b

tactic: refine' Finset.subtype_map_of_mem fun x hx => _
state_before: α : Type u_1
β : Type ?u.220530
inst✝² : Preorder α
p : α → Prop
inst✝¹ : DecidablePred p
inst✝ : LocallyFiniteOrder α
a b : Subtype p
hp : ∀ ⦃a b x : α⦄, a ≤ x → x ≤ b → p a → p b → p x
⊢ map (Embedding.subtype p) (Finset.subtype p (Ioc ↑a ↑b)) = Ioc ↑a ↑b

tactic: rw [mem_Ioc] at hx
state_before: α : Type u_1
β : Type ?u.220530
inst✝² : Preorder α
p : α → Prop
inst✝¹ : DecidablePred p
inst✝ : LocallyFiniteOrder α
a b : Subtype p
hp : ∀ ⦃a b x : α⦄, a ≤ x → x ≤ b → p a → p b → p x
x : α
hx : x ∈ Ioc ↑a ↑b
⊢ p x

tactic: exact hp hx.1.le hx.2 a.prop b.prop
state_before: α : Type u_1
β : Type ?u.220530
inst✝² : Preorder α
p : α → Prop
inst✝¹ : DecidablePred p
inst✝ : LocallyFiniteOrder α
a b : Subtype p
hp : ∀ ⦃a b x : α⦄, a ≤ x → x ≤ b → p a → p b → p x
x : α
hx : ↑a < x ∧ x ≤ ↑b
⊢ p x
Theorem: MeasureTheory.Measure.add_haar_closedBall
File: Mathlib/MeasureTheory/Measure/Lebesgue/EqHaar.lean

tactic: rw [add_haar_closedBall' μ x hr, add_haar_closed_unit_ball_eq_add_haar_unit_ball]
state_before: E : Type u_1
inst✝⁸ : NormedAddCommGroup E
inst✝⁷ : NormedSpace ℝ E
inst✝⁶ : MeasurableSpace E
inst✝⁵ : BorelSpace E
inst✝⁴ : FiniteDimensional ℝ E
μ : Measure E
inst✝³ : IsAddHaarMeasure μ
F : Type ?u.2012353
inst✝² : NormedAddCommGroup F
inst✝¹ : NormedSpace ℝ F
inst✝ : CompleteSpace F
s : Set E
x : E
r : ℝ
hr : 0 ≤ r
⊢ ↑↑μ (closedBall x r) = ENNReal.ofReal (r ^ finrank ℝ E) * ↑↑μ (ball 0 1)
Theorem: sign_eq_one_iff
File: Mathlib/Data/Sign.lean

tactic: refine' ⟨fun h => _, fun h => sign_pos h⟩
state_before: α : Type u_1
inst✝² : Zero α
inst✝¹ : Preorder α
inst✝ : DecidableRel fun x x_1 => x < x_1
a : α
⊢ ↑sign a = 1 ↔ 0 < a

tactic: by_contra hn
state_before: α : Type u_1
inst✝² : Zero α
inst✝¹ : Preorder α
inst✝ : DecidableRel fun x x_1 => x < x_1
a : α
h : ↑sign a = 1
⊢ 0 < a

tactic: rw [sign_apply, if_neg hn] at h
state_before: α : Type u_1
inst✝² : Zero α
inst✝¹ : Preorder α
inst✝ : DecidableRel fun x x_1 => x < x_1
a : α
h : ↑sign a = 1
hn : ¬0 < a
⊢ False

tactic: split_ifs at h
state_before: α : Type u_1
inst✝² : Zero α
inst✝¹ : Preorder α
inst✝ : DecidableRel fun x x_1 => x < x_1
a : α
h : (if a < 0 then -1 else 0) = 1
hn : ¬0 < a
⊢ False
Theorem: StieltjesFunction.iInf_rat_gt_eq
File: Mathlib/MeasureTheory/Measure/Stieltjes.lean

tactic: rw [← iInf_Ioi_eq f x]
state_before: f✝ f : StieltjesFunction
x : ℝ
⊢ (⨅ (r : { r' // x < ↑r' }), ↑f ↑↑r) = ↑f x

tactic: refine' (iInf_Ioi_eq_iInf_rat_gt _ _ f.mono).symm
state_before: f✝ f : StieltjesFunction
x : ℝ
⊢ (⨅ (r : { r' // x < ↑r' }), ↑f ↑↑r) = ⨅ (r : ↑(Ioi x)), ↑f ↑r

tactic: refine' ⟨f x, fun y => _⟩
state_before: f✝ f : StieltjesFunction
x : ℝ
⊢ BddBelow (↑f '' Ioi x)

tactic: rintro ⟨y, hy_mem, rfl⟩
state_before: f✝ f : StieltjesFunction
x y : ℝ
⊢ y ∈ ↑f '' Ioi x → ↑f x ≤ y

tactic: exact f.mono (le_of_lt hy_mem)
state_before: case intro.intro
f✝ f : StieltjesFunction
x y : ℝ
hy_mem : y ∈ Ioi x
⊢ ↑f x ≤ ↑f y
Theorem: zpow_neg_mul_zpow_self
File: Mathlib/Algebra/GroupWithZero/Power.lean

tactic: rw [zpow_neg]
state_before: G₀ : Type u_1
inst✝ : GroupWithZero G₀
n : ℤ
x : G₀
h : x ≠ 0
⊢ x ^ (-n) * x ^ n = 1

tactic: exact inv_mul_cancel (zpow_ne_zero n h)
state_before: G₀ : Type u_1
inst✝ : GroupWithZero G₀
n : ℤ
x : G₀
h : x ≠ 0
⊢ (x ^ n)⁻¹ * x ^ n = 1
Theorem: SimplexCategory.δ_comp_δ'
File: Mathlib/AlgebraicTopology/SimplexCategory.lean

tactic: simp [hj, Fin.not_lt_zero] at H
state_before: n : ℕ
i : Fin (n + 2)
j : Fin (n + 3)
H : ↑Fin.castSucc i < j
hj : j = 0
⊢ False

tactic: rw [← δ_comp_δ]
state_before: n : ℕ
i : Fin (n + 2)
j : Fin (n + 3)
H : ↑Fin.castSucc i < j
⊢ δ i ≫ δ j = δ (Fin.pred j (_ : j = 0 → False)) ≫ δ (↑Fin.castSucc i)

tactic: rw [Fin.succ_pred]
state_before: n : ℕ
i : Fin (n + 2)
j : Fin (n + 3)
H : ↑Fin.castSucc i < j
⊢ δ i ≫ δ j = δ i ≫ δ (Fin.succ (Fin.pred j (_ : j = 0 → False)))

tactic: simpa only [Fin.le_iff_val_le_val, ← Nat.lt_succ_iff, Nat.succ_eq_add_one, ← Fin.val_succ,
  j.succ_pred, Fin.lt_iff_val_lt_val] using H
state_before: n : ℕ
i : Fin (n + 2)
j : Fin (n + 3)
H : ↑Fin.castSucc i < j
⊢ i ≤ Fin.pred j (_ : j = 0 → False)
Theorem: Sym.map_map
File: Mathlib/Data/Sym/Basic.lean

tactic: dsimp only [Sym.map]
state_before: α✝ : Type ?u.36412
β✝ : Type ?u.36415
n✝ n' m : ℕ
s✝ : Sym α✝ n✝
a b : α✝
α : Type u_1
β : Type u_2
γ : Type u_3
n : ℕ
g : β → γ
f : α → β
s : Sym α n
⊢ ↑(map g (map f s)) = ↑(map (g ∘ f) s)

tactic: simp
state_before: α✝ : Type ?u.36412
β✝ : Type ?u.36415
n✝ n' m : ℕ
s✝ : Sym α✝ n✝
a b : α✝
α : Type u_1
β : Type u_2
γ : Type u_3
n : ℕ
g : β → γ
f : α → β
s : Sym α n
⊢ Multiset.map g (Multiset.map f ↑s) = Multiset.map (g ∘ f) ↑s
Theorem: HahnSeries.SummableFamily.embDomain_notin_range
File: Mathlib/RingTheory/HahnSeries.lean

tactic: rw [embDomain_apply, dif_neg h]
state_before: Γ : Type u_3
R : Type u_4
inst✝¹ : PartialOrder Γ
inst✝ : AddCommMonoid R
α : Type u_2
β : Type u_1
s : SummableFamily Γ R α
f : α ↪ β
a : α
b : β
h : ¬b ∈ Set.range ↑f
⊢ toFun (embDomain s f) b = 0
Theorem: AddMonoidHom.toRatLinearMap_injective
File: Mathlib/Algebra/Module/LinearMap.lean

tactic: intro f g h
state_before: R : Type ?u.365280
R₁ : Type ?u.365283
R₂ : Type ?u.365286
R₃ : Type ?u.365289
k : Type ?u.365292
S : Type ?u.365295
S₃ : Type ?u.365298
T : Type ?u.365301
M : Type u_1
M₁ : Type ?u.365307
M₂ : Type u_2
M₃ : Type ?u.365313
N₁ : Type ?u.365316
N₂ : Type ?u.365319
N₃ : Type ?u.365322
ι : Type ?u.365325
inst✝³ : AddCommGroup M
inst✝² : Module ℚ M
inst✝¹ : AddCommGroup M₂
inst✝ : Module ℚ M₂
⊢ Injective toRatLinearMap

tactic: ext x
state_before: R : Type ?u.365280
R₁ : Type ?u.365283
R₂ : Type ?u.365286
R₃ : Type ?u.365289
k : Type ?u.365292
S : Type ?u.365295
S₃ : Type ?u.365298
T : Type ?u.365301
M : Type u_1
M₁ : Type ?u.365307
M₂ : Type u_2
M₃ : Type ?u.365313
N₁ : Type ?u.365316
N₂ : Type ?u.365319
N₃ : Type ?u.365322
ι : Type ?u.365325
inst✝³ : AddCommGroup M
inst✝² : Module ℚ M
inst✝¹ : AddCommGroup M₂
inst✝ : Module ℚ M₂
f g : M →+ M₂
h : toRatLinearMap f = toRatLinearMap g
⊢ f = g

tactic: exact LinearMap.congr_fun h x
state_before: case h
R : Type ?u.365280
R₁ : Type ?u.365283
R₂ : Type ?u.365286
R₃ : Type ?u.365289
k : Type ?u.365292
S : Type ?u.365295
S₃ : Type ?u.365298
T : Type ?u.365301
M : Type u_1
M₁ : Type ?u.365307
M₂ : Type u_2
M₃ : Type ?u.365313
N₁ : Type ?u.365316
N₂ : Type ?u.365319
N₃ : Type ?u.365322
ι : Type ?u.365325
inst✝³ : AddCommGroup M
inst✝² : Module ℚ M
inst✝¹ : AddCommGroup M₂
inst✝ : Module ℚ M₂
f g : M →+ M₂
h : toRatLinearMap f = toRatLinearMap g
x : M
⊢ ↑f x = ↑g x