tasksource/leandojo huggingface dataset:
Theorem: Nat.mul_sub_div
File: Std/Data/Nat/Lemmas.lean

tactic: have npos : 0 < n := (eq_zero_or_pos _).resolve_left fun n0 => by
  rw [n0, Nat.zero_mul] at h₁; exact not_lt_zero _ h₁
state_before: x n p : Nat
h₁ : x < n * p
⊢ (n * p - succ x) / n = p - succ (x / n)

tactic: apply Nat.div_eq_of_lt_le
state_before: x n p : Nat
h₁ : x < n * p
npos : 0 < n
⊢ (n * p - succ x) / n = p - succ (x / n)

tactic: rw [n0, Nat.zero_mul] at h₁
state_before: x n p : Nat
h₁ : x < n * p
n0 : n = 0
⊢ False

tactic: exact not_lt_zero _ h₁
state_before: x n p : Nat
h₁ : x < 0
n0 : n = 0
⊢ False

tactic: rw [Nat.mul_sub_right_distrib, Nat.mul_comm]
state_before: case lo
x n p : Nat
h₁ : x < n * p
npos : 0 < n
⊢ (p - succ (x / n)) * n ≤ n * p - succ x

tactic: exact Nat.sub_le_sub_left _ <| (div_lt_iff_lt_mul npos).1 (lt_succ_self _)
state_before: case lo
x n p : Nat
h₁ : x < n * p
npos : 0 < n
⊢ n * p - succ (x / n) * n ≤ n * p - succ x

tactic: show succ (pred (n * p - x)) ≤ (succ (pred (p - x / n))) * n
state_before: case hi
x n p : Nat
h₁ : x < n * p
npos : 0 < n
⊢ n * p - succ x < succ (p - succ (x / n)) * n

tactic: rw [succ_pred_eq_of_pos (Nat.sub_pos_of_lt h₁),
  fun h => succ_pred_eq_of_pos (Nat.sub_pos_of_lt h)]
state_before: case hi
x n p : Nat
h₁ : x < n * p
npos : 0 < n
⊢ succ (pred (n * p - x)) ≤ succ (pred (p - x / n)) * n

tactic: rw [Nat.mul_sub_right_distrib, Nat.mul_comm]
state_before: case hi
x n p : Nat
h₁ : x < n * p
npos : 0 < n
⊢ n * p - x ≤ (p - x / n) * n

tactic: exact Nat.sub_le_sub_left _ <| div_mul_le_self ..
state_before: case hi
x n p : Nat
h₁ : x < n * p
npos : 0 < n
⊢ p * n - x ≤ p * n - x / n * n

tactic: rwa [div_lt_iff_lt_mul npos, Nat.mul_comm]
state_before: case hi
x n p : Nat
h₁ : x < n * p
npos : 0 < n
⊢ x / n < p
Theorem: Finset.prod_ite_mem
File: Mathlib/Algebra/BigOperators/Basic.lean

tactic: rw [← Finset.prod_filter, Finset.filter_mem_eq_inter]
state_before: ι : Type ?u.409694
β : Type u
α : Type v
γ : Type w
s✝ s₁ s₂ : Finset α
a : α
f✝ g : α → β
inst✝¹ : CommMonoid β
inst✝ : DecidableEq α
s t : Finset α
f : α → β
⊢ (∏ i in s, if i ∈ t then f i else 1) = ∏ i in s ∩ t, f i
Theorem: WithTop.not_none_lt
File: Mathlib/Order/WithBot.lean

tactic: rw [← toDual_lt_toDual_iff]
state_before: α : Type u_1
β : Type ?u.89059
γ : Type ?u.89062
δ : Type ?u.89065
inst✝ : LT α
a✝ b : α
a : WithTop α
⊢ ¬none < a

tactic: exact WithBot.not_lt_none _
state_before: α : Type u_1
β : Type ?u.89059
γ : Type ?u.89062
δ : Type ?u.89065
inst✝ : LT α
a✝ b : α
a : WithTop α
⊢ ¬↑WithTop.toDual a < ↑WithTop.toDual none
Theorem: LieIdeal.derivedSeries_eq_derivedSeriesOfIdeal_comap
File: Mathlib/Algebra/Lie/Solvable.lean

tactic: induction' k with k ih
state_before: R : Type u
L : Type v
M : Type w
L' : Type w₁
inst✝⁴ : CommRing R
inst✝³ : LieRing L
inst✝² : LieAlgebra R L
inst✝¹ : LieRing L'
inst✝ : LieAlgebra R L'
I J : LieIdeal R L
f : L' →ₗ⁅R⁆ L
k : ℕ
⊢ derivedSeries R { x // x ∈ ↑I } k = comap (incl I) (derivedSeriesOfIdeal R L k I)

tactic: simp only [Nat.zero_eq, derivedSeries_def, comap_incl_self, derivedSeriesOfIdeal_zero]
state_before: case zero
R : Type u
L : Type v
M : Type w
L' : Type w₁
inst✝⁴ : CommRing R
inst✝³ : LieRing L
inst✝² : LieAlgebra R L
inst✝¹ : LieRing L'
inst✝ : LieAlgebra R L'
I J : LieIdeal R L
f : L' →ₗ⁅R⁆ L
⊢ derivedSeries R { x // x ∈ ↑I } Nat.zero = comap (incl I) (derivedSeriesOfIdeal R L Nat.zero I)

tactic: simp only [derivedSeries_def, derivedSeriesOfIdeal_succ] at ih ⊢
state_before: case succ
R : Type u
L : Type v
M : Type w
L' : Type w₁
inst✝⁴ : CommRing R
inst✝³ : LieRing L
inst✝² : LieAlgebra R L
inst✝¹ : LieRing L'
inst✝ : LieAlgebra R L'
I J : LieIdeal R L
f : L' →ₗ⁅R⁆ L
k : ℕ
ih : derivedSeries R { x // x ∈ ↑I } k = comap (incl I) (derivedSeriesOfIdeal R L k I)
⊢ derivedSeries R { x // x ∈ ↑I } (Nat.succ k) = comap (incl I) (derivedSeriesOfIdeal R L (Nat.succ k) I)

tactic: rw [ih]
state_before: case succ
R : Type u
L : Type v
M : Type w
L' : Type w₁
inst✝⁴ : CommRing R
inst✝³ : LieRing L
inst✝² : LieAlgebra R L
inst✝¹ : LieRing L'
inst✝ : LieAlgebra R L'
I J : LieIdeal R L
f : L' →ₗ⁅R⁆ L
k : ℕ
ih : derivedSeriesOfIdeal R { x // x ∈ ↑I } k ⊤ = comap (incl I) (derivedSeriesOfIdeal R L k I)
⊢ ⁅derivedSeriesOfIdeal R { x // x ∈ ↑I } k ⊤, derivedSeriesOfIdeal R { x // x ∈ ↑I } k ⊤⁆ =
    comap (incl I) ⁅derivedSeriesOfIdeal R L k I, derivedSeriesOfIdeal R L k I⁆

tactic: exact comap_bracket_incl_of_le I
  (derivedSeriesOfIdeal_le_self I k) (derivedSeriesOfIdeal_le_self I k)
state_before: case succ
R : Type u
L : Type v
M : Type w
L' : Type w₁
inst✝⁴ : CommRing R
inst✝³ : LieRing L
inst✝² : LieAlgebra R L
inst✝¹ : LieRing L'
inst✝ : LieAlgebra R L'
I J : LieIdeal R L
f : L' →ₗ⁅R⁆ L
k : ℕ
ih : derivedSeriesOfIdeal R { x // x ∈ ↑I } k ⊤ = comap (incl I) (derivedSeriesOfIdeal R L k I)
⊢ ⁅comap (incl I) (derivedSeriesOfIdeal R L k I), comap (incl I) (derivedSeriesOfIdeal R L k I)⁆ =
    comap (incl I) ⁅derivedSeriesOfIdeal R L k I, derivedSeriesOfIdeal R L k I⁆
Theorem: GroupSeminorm.smul_sup
File: Mathlib/Analysis/Normed/Group/Seminorm.lean

tactic: simpa only [← smul_eq_mul, ← NNReal.smul_def, smul_one_smul ℝ≥0 r (_ : ℝ)] using
  mul_max_of_nonneg x y (r • (1 : ℝ≥0) : ℝ≥0).coe_nonneg
state_before: ι : Type ?u.177768
R : Type u_2
R' : Type ?u.177774
E : Type u_1
F : Type ?u.177780
G : Type ?u.177783
inst✝³ : Group E
inst✝² : SMul R ℝ
inst✝¹ : SMul R ℝ≥0
inst✝ : IsScalarTower R ℝ≥0 ℝ
r : R
p q : GroupSeminorm E
x y : ℝ
⊢ r • max x y = max (r • x) (r • y)
Theorem: Set.preimage_eq_core
File: Mathlib/Data/Rel.lean

tactic: simp [Set.preimage, Function.graph, Rel.core]
state_before: α : Type u_2
β : Type u_1
γ : Type ?u.42890
f : α → β
s : Set β
⊢ f ⁻¹' s = Rel.core (Function.graph f) s
Theorem: Finset.supIndep_univ_fin_two
File: Mathlib/Order/SupIndep.lean

tactic: simp
state_before: α : Type u_1
β : Type ?u.14885
ι : Type ?u.14888
ι' : Type ?u.14891
inst✝¹ : Lattice α
inst✝ : OrderBot α
s t : Finset ι
f✝ : ι → α
i : ι
f : Fin 2 → α
⊢ 0 ≠ 1
Theorem: le_mul_iff_one_le_right
File: Mathlib/Algebra/Order/Ring/Lemmas.lean

tactic: rw [mul_one]
state_before: α : Type u_1
a b c d : α
inst✝⁴ : MulOneClass α
inst✝³ : Zero α
inst✝² : Preorder α
inst✝¹ : PosMulMono α
inst✝ : PosMulMonoRev α
a0 : 0 < a
⊢ a ≤ a * b ↔ a * 1 ≤ a * b
Theorem: OrderIso.map_bot'
File: Mathlib/Order/Hom/Basic.lean

tactic: refine' le_antisymm _ (hy _)
state_before: F : Type ?u.106047
α : Type u_1
β : Type u_2
γ : Type ?u.106056
δ : Type ?u.106059
inst✝¹ : LE α
inst✝ : PartialOrder β
f : α ≃o β
x : α
y : β
hx : ∀ (x' : α), x ≤ x'
hy : ∀ (y' : β), y ≤ y'
⊢ ↑f x = y

tactic: rw [← f.apply_symm_apply y, f.map_rel_iff]
state_before: F : Type ?u.106047
α : Type u_1
β : Type u_2
γ : Type ?u.106056
δ : Type ?u.106059
inst✝¹ : LE α
inst✝ : PartialOrder β
f : α ≃o β
x : α
y : β
hx : ∀ (x' : α), x ≤ x'
hy : ∀ (y' : β), y ≤ y'
⊢ ↑f x ≤ y

tactic: apply hx
state_before: F : Type ?u.106047
α : Type u_1
β : Type u_2
γ : Type ?u.106056
δ : Type ?u.106059
inst✝¹ : LE α
inst✝ : PartialOrder β
f : α ≃o β
x : α
y : β
hx : ∀ (x' : α), x ≤ x'
hy : ∀ (y' : β), y ≤ y'
⊢ x ≤ ↑(symm f) y
Theorem: MeasurableEmbedding.integrableOn_map_iff
File: Mathlib/MeasureTheory/Integral/IntegrableOn.lean

tactic: simp only [IntegrableOn, he.restrict_map, he.integrable_map_iff]
state_before: α : Type u_2
β : Type u_1
E : Type u_3
F : Type ?u.1519544
inst✝² : MeasurableSpace α
inst✝¹ : NormedAddCommGroup E
f✝ g : α → E
s✝ t : Set α
μ✝ ν : Measure α
inst✝ : MeasurableSpace β
e : α → β
he : MeasurableEmbedding e
f : β → E
μ : Measure α
s : Set β
⊢ IntegrableOn f s ↔ IntegrableOn (f ∘ e) (e ⁻¹' s)
Theorem: Ideal.Quotient.subsingleton_iff
File: Mathlib/RingTheory/Ideal/Quotient.lean

tactic: rw [eq_top_iff_one, ← subsingleton_iff_zero_eq_one, eq_comm, ← (mk I).map_one,
  Quotient.eq_zero_iff_mem]
state_before: R : Type u
inst✝ : CommRing R
I✝ : Ideal R
a b : R
S : Type v
x y : R
I : Ideal R
⊢ Subsingleton (R ⧸ I) ↔ I = ⊤
Theorem: Fintype.range_total
File: Mathlib/LinearAlgebra/Finsupp.lean

tactic: rw [← Finsupp.total_eq_fintype_total, LinearMap.range_comp, LinearEquiv.range,
  Submodule.map_top, Finsupp.range_total]
state_before: α : Type u_3
M : Type u_1
R : Type u_2
inst✝⁶ : Fintype α
inst✝⁵ : Semiring R
inst✝⁴ : AddCommMonoid M
inst✝³ : Module R M
S : Type u_4
inst✝² : Semiring S
inst✝¹ : Module S M
inst✝ : SMulCommClass R S M
v : α → M
⊢ LinearMap.range (↑(Fintype.total R S) v) = span R (Set.range v)
Theorem: ENNReal.ofReal_zero
File: Mathlib/Data/Real/ENNReal.lean

tactic: simp [ENNReal.ofReal]
state_before: α : Type ?u.20964
β : Type ?u.20967
a b c d : ℝ≥0∞
r p q : ℝ≥0
⊢ ENNReal.ofReal 0 = 0
Theorem: List.tails_reverse
File: Mathlib/Data/List/Infix.lean

tactic: rw [inits_eq_tails l]
state_before: α : Type u_1
β : Type ?u.47240
l✝ l₁ l₂ l₃ : List α
a b : α
m n : ℕ
l : List α
⊢ tails (reverse l) = reverse (map reverse (inits l))

tactic: simp [reverse_involutive.comp_self, reverse_map]
state_before: α : Type u_1
β : Type ?u.47240
l✝ l₁ l₂ l₃ : List α
a b : α
m n : ℕ
l : List α
⊢ tails (reverse l) = reverse (map reverse (reverse (map reverse (tails (reverse l)))))
Theorem: MvPolynomial.sum_def
File: Mathlib/Data/MvPolynomial/Basic.lean

tactic: simp [support, Finsupp.sum, coeff]
state_before: R : Type u
S₁ : Type v
S₂ : Type w
S₃ : Type x
σ : Type u_2
a a' a₁ a₂ : R
e : ℕ
n m : σ
s : σ →₀ ℕ
inst✝² : CommSemiring R
inst✝¹ : CommSemiring S₁
p✝ q : MvPolynomial σ R
A : Type u_1
inst✝ : AddCommMonoid A
p : MvPolynomial σ R
b : (σ →₀ ℕ) → R → A
⊢ sum p b = ∑ m in support p, b m (coeff m p)
Theorem: CategoryTheory.Presieve.pullbackCompatible_iff
File: Mathlib/CategoryTheory/Sites/SheafOfTypes.lean

tactic: constructor
state_before: C : Type u₁
inst✝¹ : Category C
P Q U : Cᵒᵖ ⥤ Type w
X Y : C
S : Sieve X
R : Presieve X
J J₂ : GrothendieckTopology C
x : FamilyOfElements P R
inst✝ : HasPullbacks C
⊢ FamilyOfElements.Compatible x ↔ FamilyOfElements.PullbackCompatible x

tactic: intro t Y₁ Y₂ f₁ f₂ hf₁ hf₂
state_before: case mp
C : Type u₁
inst✝¹ : Category C
P Q U : Cᵒᵖ ⥤ Type w
X Y : C
S : Sieve X
R : Presieve X
J J₂ : GrothendieckTopology C
x : FamilyOfElements P R
inst✝ : HasPullbacks C
⊢ FamilyOfElements.Compatible x → FamilyOfElements.PullbackCompatible x

tactic: apply t
state_before: case mp
C : Type u₁
inst✝¹ : Category C
P Q U : Cᵒᵖ ⥤ Type w
X Y : C
S : Sieve X
R : Presieve X
J J₂ : GrothendieckTopology C
x : FamilyOfElements P R
inst✝ : HasPullbacks C
t : FamilyOfElements.Compatible x
Y₁ Y₂ : C
f₁ : Y₁ ⟶ X
f₂ : Y₂ ⟶ X
hf₁ : R f₁
hf₂ : R f₂
⊢ P.map pullback.fst.op (x f₁ hf₁) = P.map pullback.snd.op (x f₂ hf₂)

tactic: apply pullback.condition
state_before: case mp.a
C : Type u₁
inst✝¹ : Category C
P Q U : Cᵒᵖ ⥤ Type w
X Y : C
S : Sieve X
R : Presieve X
J J₂ : GrothendieckTopology C
x : FamilyOfElements P R
inst✝ : HasPullbacks C
t : FamilyOfElements.Compatible x
Y₁ Y₂ : C
f₁ : Y₁ ⟶ X
f₂ : Y₂ ⟶ X
hf₁ : R f₁
hf₂ : R f₂
⊢ pullback.fst ≫ f₁ = pullback.snd ≫ f₂

tactic: intro t Y₁ Y₂ Z g₁ g₂ f₁ f₂ hf₁ hf₂ comm
state_before: case mpr
C : Type u₁
inst✝¹ : Category C
P Q U : Cᵒᵖ ⥤ Type w
X Y : C
S : Sieve X
R : Presieve X
J J₂ : GrothendieckTopology C
x : FamilyOfElements P R
inst✝ : HasPullbacks C
⊢ FamilyOfElements.PullbackCompatible x → FamilyOfElements.Compatible x

tactic: rw [← pullback.lift_fst _ _ comm, op_comp, FunctorToTypes.map_comp_apply, t hf₁ hf₂,
  ← FunctorToTypes.map_comp_apply, ← op_comp, pullback.lift_snd]
state_before: case mpr
C : Type u₁
inst✝¹ : Category C
P Q U : Cᵒᵖ ⥤ Type w
X Y : C
S : Sieve X
R : Presieve X
J J₂ : GrothendieckTopology C
x : FamilyOfElements P R
inst✝ : HasPullbacks C
t : FamilyOfElements.PullbackCompatible x
Y₁ Y₂ Z : C
g₁ : Z ⟶ Y₁
g₂ : Z ⟶ Y₂
f₁ : Y₁ ⟶ X
f₂ : Y₂ ⟶ X
hf₁ : R f₁
hf₂ : R f₂
comm : g₁ ≫ f₁ = g₂ ≫ f₂
⊢ P.map g₁.op (x f₁ hf₁) = P.map g₂.op (x f₂ hf₂)
Theorem: and_congr_right_iff
File: Std/Logic.lean

tactic: simp [ha] at h
state_before: a b c : Prop
h : a ∧ b ↔ a ∧ c
ha : a
⊢ b ↔ c

tactic: exact h
state_before: a b c : Prop
ha : a
h : b ↔ c
⊢ b ↔ c
Theorem: PEquiv.single_mul_single
File: Mathlib/Data/Matrix/PEquiv.lean

tactic: rw [← toMatrix_trans, single_trans_single]
state_before: k : Type u_2
l : Type ?u.73281
m : Type u_3
n : Type u_1
α : Type v
inst✝⁴ : Fintype n
inst✝³ : DecidableEq k
inst✝² : DecidableEq m
inst✝¹ : DecidableEq n
inst✝ : Semiring α
a : m
b : n
c : k
⊢ toMatrix (single a b) ⬝ toMatrix (single b c) = toMatrix (single a c)
Theorem: Set.univ_pi_eq_empty_iff
File: Mathlib/Data/Set/Prod.lean

tactic: simp [← not_nonempty_iff_eq_empty, univ_pi_nonempty_iff]
state_before: ι : Type u_1
α : ι → Type u_2
β : ι → Type ?u.124745
s s₁ s₂ : Set ι
t t₁ t₂ : (i : ι) → Set (α i)
i : ι
⊢ pi univ t = ∅ ↔ ∃ i, t i = ∅
Theorem: Subgroup.subsingleton_iff
File: Mathlib/GroupTheory/Subgroup/Basic.lean

tactic: simp [Subgroup.one_mem]
state_before: G : Type u_1
G' : Type ?u.194712
inst✝² : Group G
inst✝¹ : Group G'
A : Type ?u.194721
inst✝ : AddGroup A
H K : Subgroup G
h : Subsingleton G
x y : Subgroup G
i : G
⊢ 1 ∈ x ↔ 1 ∈ y
Theorem: Finsupp.iSup_lsingle_range
File: Mathlib/LinearAlgebra/Finsupp.lean

tactic: refine' eq_top_iff.2 <| SetLike.le_def.2 fun f _ => _
state_before: α : Type u_1
M : Type u_2
N : Type ?u.36095
P : Type ?u.36098
R : Type u_3
S : Type ?u.36104
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
⊢ (⨆ (a : α), LinearMap.range (lsingle a)) = ⊤

tactic: rw [← sum_single f]
state_before: α : Type u_1
M : Type u_2
N : Type ?u.36095
P : Type ?u.36098
R : Type u_3
S : Type ?u.36104
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
f : α →₀ M
x✝ : f ∈ ⊤
⊢ f ∈ ⨆ (a : α), LinearMap.range (lsingle a)

tactic: exact sum_mem fun a _ => Submodule.mem_iSup_of_mem a ⟨_, rfl⟩
state_before: α : Type u_1
M : Type u_2
N : Type ?u.36095
P : Type ?u.36098
R : Type u_3
S : Type ?u.36104
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
f : α →₀ M
x✝ : f ∈ ⊤
⊢ sum f single ∈ ⨆ (a : α), LinearMap.range (lsingle a)
Theorem: Nat.cauchy_induction_mul
File: Mathlib/Data/Nat/Interval.lean

tactic: intro _ hl _
state_before: a b c : ℕ
P : ℕ → Prop
h : ∀ (n : ℕ), P (n + 1) → P n
k seed : ℕ
hk : 1 < k
hs : P (succ seed)
hm : ∀ (x : ℕ), seed < x → P x → P (k * x)
n : ℕ
⊢ ∀ (x : ℕ), succ seed ≤ x → P x → x < (fun x x_1 => x * x_1) k x

tactic: convert (mul_lt_mul_right <| seed.succ_pos.trans_le hl).2 hk
state_before: a b c : ℕ
P : ℕ → Prop
h : ∀ (n : ℕ), P (n + 1) → P n
k seed : ℕ
hk : 1 < k
hs : P (succ seed)
hm : ∀ (x : ℕ), seed < x → P x → P (k * x)
n x✝ : ℕ
hl : succ seed ≤ x✝
hP✝ : P x✝
⊢ x✝ < (fun x x_1 => x * x_1) k x✝

tactic: rw [one_mul]
state_before: case h.e'_3
a b c : ℕ
P : ℕ → Prop
h : ∀ (n : ℕ), P (n + 1) → P n
k seed : ℕ
hk : 1 < k
hs : P (succ seed)
hm : ∀ (x : ℕ), seed < x → P x → P (k * x)
n x✝ : ℕ
hl : succ seed ≤ x✝
hP✝ : P x✝
⊢ x✝ = 1 * x✝
Theorem: Stream'.map_iterate
File: Mathlib/Data/Stream/Init.lean

tactic: funext n
state_before: α : Type u
β : Type v
δ : Type w
f : α → α
a : α
⊢ iterate f (f a) = map f (iterate f a)

tactic: induction' n with n' ih
state_before: case h
α : Type u
β : Type v
δ : Type w
f : α → α
a : α
n : ℕ
⊢ iterate f (f a) n = map f (iterate f a) n

tactic: rfl
state_before: case h.zero
α : Type u
β : Type v
δ : Type w
f : α → α
a : α
⊢ iterate f (f a) zero = map f (iterate f a) zero

tactic: unfold map iterate nth
state_before: case h.succ
α : Type u
β : Type v
δ : Type w
f : α → α
a : α
n' : ℕ
ih : iterate f (f a) n' = map f (iterate f a) n'
⊢ iterate f (f a) (succ n') = map f (iterate f a) (succ n')

tactic: dsimp
state_before: case h.succ
α : Type u
β : Type v
δ : Type w
f : α → α
a : α
n' : ℕ
ih : iterate f (f a) n' = map f (iterate f a) n'
⊢ f (iterate f (f a) n') = f (iterate f a (succ n'))

tactic: rw [map, nth] at ih
state_before: case h.succ
α : Type u
β : Type v
δ : Type w
f : α → α
a : α
n' : ℕ
ih : iterate f (f a) n' = map f (iterate f a) n'
⊢ f (iterate f (f a) n') = f (iterate f a (succ n'))

tactic: rw [iterate]
state_before: case h.succ
α : Type u
β : Type v
δ : Type w
f : α → α
a : α
n' : ℕ
ih : iterate f (f a) n' = f (iterate f a n')
⊢ f (iterate f (f a) n') = f (iterate f a (succ n'))

tactic: exact congrArg f ih
state_before: case h.succ
α : Type u
β : Type v
δ : Type w
f : α → α
a : α
n' : ℕ
ih : iterate f (f a) n' = f (iterate f a n')
⊢ f (iterate f (f a) n') = f (f (iterate f a n'))
Theorem: Polynomial.Monic.prime_of_degree_eq_one
File: Mathlib/Data/Polynomial/RingDivision.lean

tactic: simpa [hm.leadingCoeff] using eq_X_add_C_of_degree_eq_one hp1
state_before: R : Type u
S : Type v
T : Type w
a b : R
n : ℕ
inst✝¹ : CommRing R
inst✝ : IsDomain R
p q : R[X]
hp1 : degree p = 1
hm : Monic p
⊢ p = X - ↑C (-coeff p 0)
Theorem: List.erase_cons_head
File: Std/Data/List/Lemmas.lean

tactic: simp [erase_cons]
state_before: α : Type u_1
inst✝ : DecidableEq α
a : α
l : List α
⊢ List.erase (a :: l) a = l
Theorem: Set.Countable.sUnion_iff
File: Mathlib/Data/Set/Countable.lean

tactic: rw [sUnion_eq_biUnion, hs.biUnion_iff]
state_before: α : Type u
β : Type v
γ : Type w
ι : Sort x
s : Set (Set α)
hs : Set.Countable s
⊢ Set.Countable (⋃₀ s) ↔ ∀ (a : Set α), a ∈ s → Set.Countable a
Theorem: Polynomial.trailingCoeff_mul
File: Mathlib/Data/Polynomial/Reverse.lean

tactic: rw [← reverse_leadingCoeff, reverse_mul_of_domain, leadingCoeff_mul, reverse_leadingCoeff,
  reverse_leadingCoeff]
state_before: R✝ : Type ?u.363887
inst✝² : Semiring R✝
f : R✝[X]
R : Type u_1
inst✝¹ : Ring R
inst✝ : NoZeroDivisors R
p q : R[X]
⊢ trailingCoeff (p * q) = trailingCoeff p * trailingCoeff q
Theorem: Finsupp.coe_eq_zero
File: Mathlib/Data/Finsupp/Defs.lean

tactic: rw [← coe_zero, FunLike.coe_fn_eq]
state_before: α : Type u_1
β : Type ?u.13590
γ : Type ?u.13593
ι : Type ?u.13596
M : Type u_2
M' : Type ?u.13602
N : Type ?u.13605
P : Type ?u.13608
G : Type ?u.13611
H : Type ?u.13614
R : Type ?u.13617
S : Type ?u.13620
inst✝ : Zero M
f : α →₀ M
⊢ ↑f = 0 ↔ f = 0
Theorem: CategoryTheory.Limits.Types.colimit_eq
File: Mathlib/CategoryTheory/Limits/Types.lean

tactic: apply Quot.eq.1
state_before: J : Type v
inst✝ : SmallCategory J
F : J ⥤ TypeMax
j j' : J
x : F.obj j
x' : F.obj j'
w : colimit.ι F j x = colimit.ι F j' x'
⊢ EqvGen (Quot.Rel F) { fst := j, snd := x } { fst := j', snd := x' }

tactic: simpa using congr_arg (colimitEquivQuot.{v, u} F) w
state_before: J : Type v
inst✝ : SmallCategory J
F : J ⥤ TypeMax
j j' : J
x : F.obj j
x' : F.obj j'
w : colimit.ι F j x = colimit.ι F j' x'
⊢ Quot.mk (Quot.Rel F) { fst := j, snd := x } = Quot.mk (Quot.Rel F) { fst := j', snd := x' }
Theorem: CategoryTheory.MorphismProperty.universally_le
File: Mathlib/CategoryTheory/MorphismProperty.lean

tactic: intro X Y f hf
state_before: C : Type u
inst✝¹ : Category C
D : Type ?u.86593
inst✝ : Category D
P : MorphismProperty C
⊢ universally P ≤ P

tactic: exact hf (𝟙 _) (𝟙 _) _ (IsPullback.of_vert_isIso ⟨by rw [Category.comp_id, Category.id_comp]⟩)
state_before: C : Type u
inst✝¹ : Category C
D : Type ?u.86593
inst✝ : Category D
P : MorphismProperty C
X Y : C
f : X ⟶ Y
hf : universally P f
⊢ P f

tactic: rw [Category.comp_id, Category.id_comp]
state_before: C : Type u
inst✝¹ : Category C
D : Type ?u.86593
inst✝ : Category D
P : MorphismProperty C
X Y : C
f : X ⟶ Y
hf : universally P f
⊢ f ≫ 𝟙 Y = 𝟙 X ≫ f
Theorem: FiniteDimensional.complete
File: Mathlib/Analysis/NormedSpace/FiniteDimension.lean

tactic: set e := ContinuousLinearEquiv.ofFinrankEq (@finrank_fin_fun 𝕜 _ _ (finrank 𝕜 E)).symm
state_before: 𝕜 : Type u
inst✝¹¹ : NontriviallyNormedField 𝕜
E : Type v
inst✝¹⁰ : NormedAddCommGroup E
inst✝⁹ : NormedSpace 𝕜 E
F : Type w
inst✝⁸ : NormedAddCommGroup F
inst✝⁷ : NormedSpace 𝕜 F
F' : Type x
inst✝⁶ : AddCommGroup F'
inst✝⁵ : Module 𝕜 F'
inst✝⁴ : TopologicalSpace F'
inst✝³ : TopologicalAddGroup F'
inst✝² : ContinuousSMul 𝕜 F'
inst✝¹ : CompleteSpace 𝕜
inst✝ : FiniteDimensional 𝕜 E
⊢ CompleteSpace E

tactic: have : UniformEmbedding e.toLinearEquiv.toEquiv.symm := e.symm.uniformEmbedding
state_before: 𝕜 : Type u
inst✝¹¹ : NontriviallyNormedField 𝕜
E : Type v
inst✝¹⁰ : NormedAddCommGroup E
inst✝⁹ : NormedSpace 𝕜 E
F : Type w
inst✝⁸ : NormedAddCommGroup F
inst✝⁷ : NormedSpace 𝕜 F
F' : Type x
inst✝⁶ : AddCommGroup F'
inst✝⁵ : Module 𝕜 F'
inst✝⁴ : TopologicalSpace F'
inst✝³ : TopologicalAddGroup F'
inst✝² : ContinuousSMul 𝕜 F'
inst✝¹ : CompleteSpace 𝕜
inst✝ : FiniteDimensional 𝕜 E
e : E ≃L[𝕜] Fin (finrank 𝕜 E) → 𝕜 :=
  ContinuousLinearEquiv.ofFinrankEq (_ : finrank 𝕜 E = finrank 𝕜 (Fin (finrank 𝕜 E) → 𝕜))
⊢ CompleteSpace E

tactic: exact (completeSpace_congr this).1 (by infer_instance)
state_before: 𝕜 : Type u
inst✝¹¹ : NontriviallyNormedField 𝕜
E : Type v
inst✝¹⁰ : NormedAddCommGroup E
inst✝⁹ : NormedSpace 𝕜 E
F : Type w
inst✝⁸ : NormedAddCommGroup F
inst✝⁷ : NormedSpace 𝕜 F
F' : Type x
inst✝⁶ : AddCommGroup F'
inst✝⁵ : Module 𝕜 F'
inst✝⁴ : TopologicalSpace F'
inst✝³ : TopologicalAddGroup F'
inst✝² : ContinuousSMul 𝕜 F'
inst✝¹ : CompleteSpace 𝕜
inst✝ : FiniteDimensional 𝕜 E
e : E ≃L[𝕜] Fin (finrank 𝕜 E) → 𝕜 :=
  ContinuousLinearEquiv.ofFinrankEq (_ : finrank 𝕜 E = finrank 𝕜 (Fin (finrank 𝕜 E) → 𝕜))
this : UniformEmbedding ↑(LinearEquiv.toEquiv e.toLinearEquiv).symm
⊢ CompleteSpace E

tactic: infer_instance
state_before: 𝕜 : Type u
inst✝¹¹ : NontriviallyNormedField 𝕜
E : Type v
inst✝¹⁰ : NormedAddCommGroup E
inst✝⁹ : NormedSpace 𝕜 E
F : Type w
inst✝⁸ : NormedAddCommGroup F
inst✝⁷ : NormedSpace 𝕜 F
F' : Type x
inst✝⁶ : AddCommGroup F'
inst✝⁵ : Module 𝕜 F'
inst✝⁴ : TopologicalSpace F'
inst✝³ : TopologicalAddGroup F'
inst✝² : ContinuousSMul 𝕜 F'
inst✝¹ : CompleteSpace 𝕜
inst✝ : FiniteDimensional 𝕜 E
e : E ≃L[𝕜] Fin (finrank 𝕜 E) → 𝕜 :=
  ContinuousLinearEquiv.ofFinrankEq (_ : finrank 𝕜 E = finrank 𝕜 (Fin (finrank 𝕜 E) → 𝕜))
this : UniformEmbedding ↑(LinearEquiv.toEquiv e.toLinearEquiv).symm
⊢ CompleteSpace (Fin (finrank 𝕜 E) → 𝕜)
Theorem: Filter.ext_iff
File: Mathlib/Order/Filter/Basic.lean

tactic: simp only [filter_eq_iff, ext_iff, Filter.mem_sets]
state_before: α : Type u
f g : Filter α
s t : Set α
⊢ f = g ↔ ∀ (s : Set α), s ∈ f ↔ s ∈ g
Theorem: OnePoint.ultrafilter_le_nhds_infty
File: Mathlib/Topology/Compactification/OnePoint.lean

tactic: simp only [le_nhds_infty, ← compl_image_coe, Ultrafilter.mem_coe,
  Ultrafilter.compl_mem_iff_not_mem]
state_before: X : Type u_1
inst✝ : TopologicalSpace X
s : Set (OnePoint X)
t : Set X
f : Ultrafilter (OnePoint X)
⊢ ↑f ≤ 𝓝 ∞ ↔ ∀ (s : Set X), IsClosed s → IsCompact s → ¬some '' s ∈ f
Theorem: List.all_iff_forall_prop
File: Mathlib/Data/Bool/AllAny.lean

tactic: simp only [all_iff_forall, Bool.of_decide_iff]
state_before: α : Type u_1
p : α → Prop
inst✝ : DecidablePred p
l : List α
a : α
⊢ (all l fun a => decide (p a)) = true ↔ ∀ (a : α), a ∈ l → p a
Theorem: Nat.choose_mul_succ_eq
File: Mathlib/Data/Nat/Choose/Basic.lean

tactic: simp
state_before: case zero
n : ℕ
⊢ choose n zero * (n + 1) = choose (n + 1) zero * (n + 1 - zero)

tactic: obtain hk | hk := le_or_lt (k + 1) (n + 1)
state_before: case succ
n k : ℕ
⊢ choose n (succ k) * (n + 1) = choose (n + 1) (succ k) * (n + 1 - succ k)

tactic: rw [choose_succ_succ, add_mul, succ_sub_succ, ← choose_succ_right_eq, ← succ_sub_succ,
  mul_tsub, add_tsub_cancel_of_le (Nat.mul_le_mul_left _ hk)]
state_before: case succ.inl
n k : ℕ
hk : k + 1 ≤ n + 1
⊢ choose n (succ k) * (n + 1) = choose (n + 1) (succ k) * (n + 1 - succ k)

tactic: rw [choose_eq_zero_of_lt hk, choose_eq_zero_of_lt (n.lt_succ_self.trans hk), zero_mul,
  zero_mul]
state_before: case succ.inr
n k : ℕ
hk : n + 1 < k + 1
⊢ choose n (succ k) * (n + 1) = choose (n + 1) (succ k) * (n + 1 - succ k)