tasksource/leandojo huggingface dataset:
Theorem: ZMod.val_injective
File: Mathlib/Data/ZMod/Basic.lean

tactic: cases n
state_before: n : ℕ
inst✝ : NeZero n
⊢ Injective val

tactic: intro a b h
state_before: case succ
n✝ : ℕ
inst✝ : NeZero (Nat.succ n✝)
⊢ Injective val

tactic: dsimp [ZMod]
state_before: case succ
n✝ : ℕ
inst✝ : NeZero (Nat.succ n✝)
a b : ZMod (Nat.succ n✝)
h : val a = val b
⊢ a = b

tactic: ext
state_before: case succ
n✝ : ℕ
inst✝ : NeZero (Nat.succ n✝)
a b : ZMod (Nat.succ n✝)
h : val a = val b
⊢ a = b

tactic: exact h
state_before: case succ.h
n✝ : ℕ
inst✝ : NeZero (Nat.succ n✝)
a b : ZMod (Nat.succ n✝)
h : val a = val b
⊢ ↑a = ↑b

tactic: cases NeZero.ne 0 rfl
state_before: case zero
inst✝ : NeZero Nat.zero
⊢ Injective val
Theorem: MeasureTheory.lintegral_union
File: Mathlib/MeasureTheory/Integral/Lebesgue.lean

tactic: rw [restrict_union hAB hB, lintegral_add_measure]
state_before: α : Type u_1
β : Type ?u.1027026
γ : Type ?u.1027029
δ : Type ?u.1027032
m : MeasurableSpace α
μ ν : Measure α
f : α → ℝ≥0∞
A B : Set α
hB : MeasurableSet B
hAB : Disjoint A B
⊢ (∫⁻ (a : α) in A ∪ B, f a ∂μ) = (∫⁻ (a : α) in A, f a ∂μ) + ∫⁻ (a : α) in B, f a ∂μ
Theorem: Vector.mem_map_iff
File: Mathlib/Data/Vector/Mem.lean

tactic: rw [Vector.toList_map, List.mem_map]
state_before: α : Type u_1
β : Type u_2
n : ℕ
a a' : α
b : β
v : Vector α n
f : α → β
⊢ b ∈ toList (map f v) ↔ ∃ a, a ∈ toList v ∧ f a = b
Theorem: Set.Ioi_subset_Ici_iff
File: Mathlib/Data/Set/Intervals/Basic.lean

tactic: refine' ⟨fun h => _, fun h => Ioi_subset_Ici h⟩
state_before: α : Type u_1
β : Type ?u.72950
inst✝¹ : LinearOrder α
a a₁ a₂ b b₁ b₂ c d : α
inst✝ : DenselyOrdered α
⊢ Ioi b ⊆ Ici a ↔ a ≤ b

tactic: by_contra ba
state_before: α : Type u_1
β : Type ?u.72950
inst✝¹ : LinearOrder α
a a₁ a₂ b b₁ b₂ c d : α
inst✝ : DenselyOrdered α
h : Ioi b ⊆ Ici a
⊢ a ≤ b

tactic: obtain ⟨c, bc, ca⟩ : ∃ c, b < c ∧ c < a := exists_between (not_le.mp ba)
state_before: α : Type u_1
β : Type ?u.72950
inst✝¹ : LinearOrder α
a a₁ a₂ b b₁ b₂ c d : α
inst✝ : DenselyOrdered α
h : Ioi b ⊆ Ici a
ba : ¬a ≤ b
⊢ False

tactic: exact lt_irrefl _ (ca.trans_le (h bc))
state_before: case intro.intro
α : Type u_1
β : Type ?u.72950
inst✝¹ : LinearOrder α
a a₁ a₂ b b₁ b₂ c✝ d : α
inst✝ : DenselyOrdered α
h : Ioi b ⊆ Ici a
ba : ¬a ≤ b
c : α
bc : b < c
ca : c < a
⊢ False
Theorem: Matrix.diagonal_updateRow_single
File: Mathlib/Data/Matrix/Basic.lean

tactic: rw [← diagonal_transpose, updateRow_transpose, diagonal_updateColumn_single, diagonal_transpose]
state_before: l : Type ?u.1233103
m : Type ?u.1233106
n : Type u_1
o : Type ?u.1233112
m' : o → Type ?u.1233117
n' : o → Type ?u.1233122
R : Type ?u.1233125
S : Type ?u.1233128
α : Type v
β : Type w
γ : Type ?u.1233135
M : Matrix m n α
i✝ : m
j : n
b : n → α
c : m → α
inst✝¹ : DecidableEq n
inst✝ : Zero α
v : n → α
i : n
x : α
⊢ updateRow (diagonal v) i (Pi.single i x) = diagonal (Function.update v i x)
Theorem: Int.floor_le_sub_one_iff
File: Mathlib/Algebra/Order/Floor.lean

tactic: rw [← floor_lt, le_sub_one_iff]
state_before: F : Type ?u.123144
α : Type u_1
β : Type ?u.123150
inst✝¹ : LinearOrderedRing α
inst✝ : FloorRing α
z : ℤ
a : α
⊢ ⌊a⌋ ≤ z - 1 ↔ a < ↑z
Theorem: eq_of_one_div_eq_one_div
File: Mathlib/Algebra/Group/Basic.lean

tactic: rw [← one_div_one_div a, h, one_div_one_div]
state_before: α : Type u_1
β : Type ?u.27621
G : Type ?u.27624
inst✝ : DivisionMonoid α
a b c : α
h : 1 / a = 1 / b
⊢ a = b
Theorem: Fin.one_succAbove_zero
File: Mathlib/Data/Fin/Basic.lean

tactic: rfl
state_before: n✝ m n : ℕ
⊢ ↑(succAbove 1) 0 = 0
Theorem: Bornology.ext_iff_isBounded
File: Mathlib/Topology/Bornology/Basic.lean

tactic: ext s
state_before: ι : Type ?u.6300
α : Type u_1
β : Type ?u.6306
t t' : Bornology α
h : ∀ (s : Set α), IsBounded s ↔ IsBounded s
⊢ t = t'

tactic: simpa [@isBounded_def _ t, isBounded_def, compl_compl] using h (sᶜ)
state_before: case h_cobounded.a
ι : Type ?u.6300
α : Type u_1
β : Type ?u.6306
t t' : Bornology α
h : ∀ (s : Set α), IsBounded s ↔ IsBounded s
s : Set α
⊢ s ∈ cobounded α ↔ s ∈ cobounded α
Theorem: Real.tendsto_exp_atTop
File: Mathlib/Analysis/SpecialFunctions/Exp.lean

tactic: have A : Tendsto (fun x : ℝ => x + 1) atTop atTop :=
  tendsto_atTop_add_const_right atTop 1 tendsto_id
state_before: α : Type ?u.20985
x y z : ℝ
l : Filter α
⊢ Tendsto exp atTop atTop

tactic: have B : ∀ᶠ x in atTop, x + 1 ≤ exp x := eventually_atTop.2 ⟨0, fun x _ => add_one_le_exp x⟩
state_before: α : Type ?u.20985
x y z : ℝ
l : Filter α
A : Tendsto (fun x => x + 1) atTop atTop
⊢ Tendsto exp atTop atTop

tactic: exact tendsto_atTop_mono' atTop B A
state_before: α : Type ?u.20985
x y z : ℝ
l : Filter α
A : Tendsto (fun x => x + 1) atTop atTop
B : ∀ᶠ (x : ℝ) in atTop, x + 1 ≤ exp x
⊢ Tendsto exp atTop atTop
Theorem: CategoryTheory.Idempotents.Karoubi.comp_p
File: Mathlib/CategoryTheory/Idempotents/Karoubi.lean

tactic: rw [f.comm, assoc, assoc, Q.idem]
state_before: C : Type u_1
inst✝ : Category C
P Q : Karoubi C
f : Hom P Q
⊢ f.f ≫ Q.p = f.f
Theorem: Wbtw.dist_le_max_dist
File: Mathlib/Analysis/Convex/StrictConvexBetween.lean

tactic: by_cases hp₁ : p₂ = p₁
state_before: V : Type u_1
P : Type u_2
inst✝⁴ : NormedAddCommGroup V
inst✝³ : NormedSpace ℝ V
inst✝² : PseudoMetricSpace P
inst✝¹ : NormedAddTorsor V P
inst✝ : StrictConvexSpace ℝ V
p p₁ p₂ p₃ : P
h : Wbtw ℝ p₁ p₂ p₃
⊢ dist p₂ p ≤ max (dist p₁ p) (dist p₃ p)

tactic: by_cases hp₃ : p₂ = p₃
state_before: case neg
V : Type u_1
P : Type u_2
inst✝⁴ : NormedAddCommGroup V
inst✝³ : NormedSpace ℝ V
inst✝² : PseudoMetricSpace P
inst✝¹ : NormedAddTorsor V P
inst✝ : StrictConvexSpace ℝ V
p p₁ p₂ p₃ : P
h : Wbtw ℝ p₁ p₂ p₃
hp₁ : ¬p₂ = p₁
⊢ dist p₂ p ≤ max (dist p₁ p) (dist p₃ p)

tactic: have hs : Sbtw ℝ p₁ p₂ p₃ := ⟨h, hp₁, hp₃⟩
state_before: case neg
V : Type u_1
P : Type u_2
inst✝⁴ : NormedAddCommGroup V
inst✝³ : NormedSpace ℝ V
inst✝² : PseudoMetricSpace P
inst✝¹ : NormedAddTorsor V P
inst✝ : StrictConvexSpace ℝ V
p p₁ p₂ p₃ : P
h : Wbtw ℝ p₁ p₂ p₃
hp₁ : ¬p₂ = p₁
hp₃ : ¬p₂ = p₃
⊢ dist p₂ p ≤ max (dist p₁ p) (dist p₃ p)

tactic: exact (hs.dist_lt_max_dist _).le
state_before: case neg
V : Type u_1
P : Type u_2
inst✝⁴ : NormedAddCommGroup V
inst✝³ : NormedSpace ℝ V
inst✝² : PseudoMetricSpace P
inst✝¹ : NormedAddTorsor V P
inst✝ : StrictConvexSpace ℝ V
p p₁ p₂ p₃ : P
h : Wbtw ℝ p₁ p₂ p₃
hp₁ : ¬p₂ = p₁
hp₃ : ¬p₂ = p₃
hs : Sbtw ℝ p₁ p₂ p₃
⊢ dist p₂ p ≤ max (dist p₁ p) (dist p₃ p)

tactic: simp [hp₁]
state_before: case pos
V : Type u_1
P : Type u_2
inst✝⁴ : NormedAddCommGroup V
inst✝³ : NormedSpace ℝ V
inst✝² : PseudoMetricSpace P
inst✝¹ : NormedAddTorsor V P
inst✝ : StrictConvexSpace ℝ V
p p₁ p₂ p₃ : P
h : Wbtw ℝ p₁ p₂ p₃
hp₁ : p₂ = p₁
⊢ dist p₂ p ≤ max (dist p₁ p) (dist p₃ p)

tactic: simp [hp₃]
state_before: case pos
V : Type u_1
P : Type u_2
inst✝⁴ : NormedAddCommGroup V
inst✝³ : NormedSpace ℝ V
inst✝² : PseudoMetricSpace P
inst✝¹ : NormedAddTorsor V P
inst✝ : StrictConvexSpace ℝ V
p p₁ p₂ p₃ : P
h : Wbtw ℝ p₁ p₂ p₃
hp₁ : ¬p₂ = p₁
hp₃ : p₂ = p₃
⊢ dist p₂ p ≤ max (dist p₁ p) (dist p₃ p)
Theorem: MeasureTheory.average_const
File: Mathlib/MeasureTheory/Integral/Average.lean

tactic: simp only [average_eq, integral_const, Measure.restrict_apply, MeasurableSet.univ, one_smul,
  univ_inter, smul_smul, ← ENNReal.toReal_inv, ← ENNReal.toReal_mul, ENNReal.inv_mul_cancel,
  measure_ne_top μ univ, Ne.def, measure_univ_eq_zero, ae_neBot.1 h, not_false_iff,
  ENNReal.one_toReal]
state_before: α : Type u_1
E : Type u_2
F : Type ?u.232029
m0 : MeasurableSpace α
inst✝⁶ : NormedAddCommGroup E
inst✝⁵ : NormedSpace ℝ E
inst✝⁴ : CompleteSpace E
inst✝³ : NormedAddCommGroup F
inst✝² : NormedSpace ℝ F
inst✝¹ : CompleteSpace F
μ : Measure α
s : Set E
inst✝ : IsFiniteMeasure μ
h : NeBot (ae μ)
c : E
⊢ (⨍ (x : α), c ∂μ) = c
Theorem: Equiv.Perm.IsCycle.isConj_iff
File: Mathlib/GroupTheory/Perm/Cycle/Basic.lean

tactic: intro h
state_before: ι : Type ?u.3035426
α : Type u_1
β : Type ?u.3035432
inst✝¹ : DecidableEq α
inst✝ : Fintype α
σ τ : Perm α
hσ : IsCycle σ
hτ : IsCycle τ
⊢ IsConj σ τ → card (support σ) = card (support τ)

tactic: obtain ⟨π, rfl⟩ := (_root_.isConj_iff).1 h
state_before: ι : Type ?u.3035426
α : Type u_1
β : Type ?u.3035432
inst✝¹ : DecidableEq α
inst✝ : Fintype α
σ τ : Perm α
hσ : IsCycle σ
hτ : IsCycle τ
h : IsConj σ τ
⊢ card (support σ) = card (support τ)

tactic: refine' Finset.card_congr (fun a _ => π a) (fun _ ha => _) (fun _ _ _ _ ab => π.injective ab)
    fun b hb => _
state_before: case intro
ι : Type ?u.3035426
α : Type u_1
β : Type ?u.3035432
inst✝¹ : DecidableEq α
inst✝ : Fintype α
σ : Perm α
hσ : IsCycle σ
π : Perm α
hτ : IsCycle (π * σ * π⁻¹)
h : IsConj σ (π * σ * π⁻¹)
⊢ card (support σ) = card (support (π * σ * π⁻¹))

tactic: simp [mem_support.1 ha]
state_before: case intro.refine'_1
ι : Type ?u.3035426
α : Type u_1
β : Type ?u.3035432
inst✝¹ : DecidableEq α
inst✝ : Fintype α
σ : Perm α
hσ : IsCycle σ
π : Perm α
hτ : IsCycle (π * σ * π⁻¹)
h : IsConj σ (π * σ * π⁻¹)
x✝ : α
ha : x✝ ∈ support σ
⊢ (fun a x => ↑π a) x✝ ha ∈ support (π * σ * π⁻¹)

tactic: refine' ⟨π⁻¹ b, ⟨_, π.apply_inv_self b⟩⟩
state_before: case intro.refine'_2
ι : Type ?u.3035426
α : Type u_1
β : Type ?u.3035432
inst✝¹ : DecidableEq α
inst✝ : Fintype α
σ : Perm α
hσ : IsCycle σ
π : Perm α
hτ : IsCycle (π * σ * π⁻¹)
h : IsConj σ (π * σ * π⁻¹)
b : α
hb : b ∈ support (π * σ * π⁻¹)
⊢ ∃ a ha, (fun a x => ↑π a) a ha = b

tactic: contrapose! hb
state_before: case intro.refine'_2
ι : Type ?u.3035426
α : Type u_1
β : Type ?u.3035432
inst✝¹ : DecidableEq α
inst✝ : Fintype α
σ : Perm α
hσ : IsCycle σ
π : Perm α
hτ : IsCycle (π * σ * π⁻¹)
h : IsConj σ (π * σ * π⁻¹)
b : α
hb : b ∈ support (π * σ * π⁻¹)
⊢ ↑π⁻¹ b ∈ support σ

tactic: rw [mem_support, Classical.not_not] at hb
state_before: case intro.refine'_2
ι : Type ?u.3035426
α : Type u_1
β : Type ?u.3035432
inst✝¹ : DecidableEq α
inst✝ : Fintype α
σ : Perm α
hσ : IsCycle σ
π : Perm α
hτ : IsCycle (π * σ * π⁻¹)
h : IsConj σ (π * σ * π⁻¹)
b : α
hb : ¬↑π⁻¹ b ∈ support σ
⊢ ¬b ∈ support (π * σ * π⁻¹)

tactic: rw [mem_support, Classical.not_not, Perm.mul_apply, Perm.mul_apply, hb, Perm.apply_inv_self]
state_before: case intro.refine'_2
ι : Type ?u.3035426
α : Type u_1
β : Type ?u.3035432
inst✝¹ : DecidableEq α
inst✝ : Fintype α
σ : Perm α
hσ : IsCycle σ
π : Perm α
hτ : IsCycle (π * σ * π⁻¹)
h : IsConj σ (π * σ * π⁻¹)
b : α
hb : ↑σ (↑π⁻¹ b) = ↑π⁻¹ b
⊢ ¬b ∈ support (π * σ * π⁻¹)
Theorem: LocallyFinite.isClosed_iUnion
File: Mathlib/Topology/LocallyFinite.lean

tactic: simp only [← closure_eq_iff_isClosed, hf.closure_iUnion, (hc _).closure_eq]
state_before: ι : Type u_1
ι' : Type ?u.8039
α : Type ?u.8042
X : Type u_2
Y : Type ?u.8048
inst✝¹ : TopologicalSpace X
inst✝ : TopologicalSpace Y
f g : ι → Set X
hf : LocallyFinite f
hc : ∀ (i : ι), IsClosed (f i)
⊢ IsClosed (⋃ (i : ι), f i)
Theorem: Filter.isCountablyGenerated_of_seq
File: Mathlib/Order/Filter/Bases.lean

tactic: rcases h with ⟨x, rfl⟩
state_before: α : Type u_1
β : Type ?u.110343
γ : Type ?u.110346
ι : Type ?u.110349
ι' : Sort ?u.110352
f : Filter α
h : ∃ x, f = ⨅ (i : ℕ), 𝓟 (x i)
⊢ IsCountablyGenerated f

tactic: apply isCountablyGenerated_seq
state_before: case intro
α : Type u_1
β : Type ?u.110343
γ : Type ?u.110346
ι : Type ?u.110349
ι' : Sort ?u.110352
x : ℕ → Set α
⊢ IsCountablyGenerated (⨅ (i : ℕ), 𝓟 (x i))
Theorem: CategoryTheory.Limits.eq_zero_of_mono_cokernel
File: Mathlib/CategoryTheory/Limits/Shapes/Kernels.lean

tactic: simp
state_before: C : Type u
inst✝³ : Category C
inst✝² : HasZeroMorphisms C
X Y : C
f : X ⟶ Y
inst✝¹ : HasCokernel f
inst✝ : Mono (cokernel.π f)
⊢ f ≫ cokernel.π f = 0 ≫ cokernel.π f
Theorem: Int.mul_neg_one
File: Std/Data/Int/Lemmas.lean

tactic: rw [Int.mul_neg, Int.mul_one]
state_before: a : Int
⊢ a * -1 = -a
Theorem: ContinuousLinearMap.isPositive_iff_complex
File: Mathlib/Analysis/InnerProductSpace/Positive.lean

tactic: simp_rw [IsPositive, forall_and, isSelfAdjoint_iff_isSymmetric,
  LinearMap.isSymmetric_iff_inner_map_self_real, conj_eq_iff_re]
state_before: 𝕜 : Type ?u.285201
E : Type ?u.285204
F : Type ?u.285207
inst✝⁹ : IsROrC 𝕜
inst✝⁸ : NormedAddCommGroup E
inst✝⁷ : NormedAddCommGroup F
inst✝⁶ : InnerProductSpace 𝕜 E
inst✝⁵ : InnerProductSpace 𝕜 F
inst✝⁴ : CompleteSpace E
inst✝³ : CompleteSpace F
E' : Type u_1
inst✝² : NormedAddCommGroup E'
inst✝¹ : InnerProductSpace ℂ E'
inst✝ : CompleteSpace E'
T : E' →L[ℂ] E'
⊢ IsPositive T ↔ ∀ (x : E'), ↑(↑re (inner (↑T x) x)) = inner (↑T x) x ∧ 0 ≤ ↑re (inner (↑T x) x)

tactic: rfl
state_before: 𝕜 : Type ?u.285201
E : Type ?u.285204
F : Type ?u.285207
inst✝⁹ : IsROrC 𝕜
inst✝⁸ : NormedAddCommGroup E
inst✝⁷ : NormedAddCommGroup F
inst✝⁶ : InnerProductSpace 𝕜 E
inst✝⁵ : InnerProductSpace 𝕜 F
inst✝⁴ : CompleteSpace E
inst✝³ : CompleteSpace F
E' : Type u_1
inst✝² : NormedAddCommGroup E'
inst✝¹ : InnerProductSpace ℂ E'
inst✝ : CompleteSpace E'
T : E' →L[ℂ] E'
⊢ ((∀ (v : E'), ↑(↑re (inner (↑↑T v) v)) = inner (↑↑T v) v) ∧ ∀ (x : E'), 0 ≤ reApplyInnerSelf T x) ↔
    (∀ (x : E'), ↑(↑re (inner (↑T x) x)) = inner (↑T x) x) ∧ ∀ (x : E'), 0 ≤ ↑re (inner (↑T x) x)
Theorem: WeakDual.CharacterSpace.union_zero_isClosed
File: Mathlib/Topology/Algebra/Module/CharacterSpace.lean

tactic: simp only [union_zero, Set.setOf_forall]
state_before: 𝕜 : Type u_1
A : Type u_2
inst✝⁸ : CommSemiring 𝕜
inst✝⁷ : TopologicalSpace 𝕜
inst✝⁶ : ContinuousAdd 𝕜
inst✝⁵ : ContinuousConstSMul 𝕜 𝕜
inst✝⁴ : NonUnitalNonAssocSemiring A
inst✝³ : TopologicalSpace A
inst✝² : Module 𝕜 A
inst✝¹ : T2Space 𝕜
inst✝ : ContinuousMul 𝕜
⊢ IsClosed (characterSpace 𝕜 A ∪ {0})

tactic: exact
  isClosed_iInter fun x =>
    isClosed_iInter fun y =>
      isClosed_eq (eval_continuous _) <| (eval_continuous _).mul (eval_continuous _)
state_before: 𝕜 : Type u_1
A : Type u_2
inst✝⁸ : CommSemiring 𝕜
inst✝⁷ : TopologicalSpace 𝕜
inst✝⁶ : ContinuousAdd 𝕜
inst✝⁵ : ContinuousConstSMul 𝕜 𝕜
inst✝⁴ : NonUnitalNonAssocSemiring A
inst✝³ : TopologicalSpace A
inst✝² : Module 𝕜 A
inst✝¹ : T2Space 𝕜
inst✝ : ContinuousMul 𝕜
⊢ IsClosed (⋂ (i : A) (i_1 : A), {x | ↑x (i * i_1) = ↑x i * ↑x i_1})
Theorem: Cardinal.aleph0_le_mul_iff'
File: Mathlib/SetTheory/Cardinal/Basic.lean

tactic: have : ∀ {a : Cardinal.{u}}, ℵ₀ ≤ a → a ≠ 0 := fun a => ne_bot_of_le_ne_bot aleph0_ne_zero a
state_before: α β : Type u
a b : Cardinal
⊢ ℵ₀ ≤ a * b ↔ a ≠ 0 ∧ ℵ₀ ≤ b ∨ ℵ₀ ≤ a ∧ b ≠ 0

tactic: simp only [aleph0_le_mul_iff, and_or_left, and_iff_right_of_imp this, @and_left_comm (a ≠ 0)]
state_before: α β : Type u
a b : Cardinal
this : ∀ {a : Cardinal}, ℵ₀ ≤ a → a ≠ 0
⊢ ℵ₀ ≤ a * b ↔ a ≠ 0 ∧ ℵ₀ ≤ b ∨ ℵ₀ ≤ a ∧ b ≠ 0

tactic: simp only [and_comm, or_comm]
state_before: α β : Type u
a b : Cardinal
this : ∀ {a : Cardinal}, ℵ₀ ≤ a → a ≠ 0
⊢ b ≠ 0 ∧ ℵ₀ ≤ a ∨ a ≠ 0 ∧ ℵ₀ ≤ b ↔ a ≠ 0 ∧ ℵ₀ ≤ b ∨ ℵ₀ ≤ a ∧ b ≠ 0
Theorem: List.oldMapIdx_append
File: Mathlib/Data/List/Indexes.lean

tactic: intros f l e
state_before: α : Type u
β : Type v
⊢ ∀ (f : ℕ → α → β) (l : List α) (e : α), List.oldMapIdx f (l ++ [e]) = List.oldMapIdx f l ++ [f (length l) e]

tactic: unfold List.oldMapIdx
state_before: α : Type u
β : Type v
f : ℕ → α → β
l : List α
e : α
⊢ List.oldMapIdx f (l ++ [e]) = List.oldMapIdx f l ++ [f (length l) e]

tactic: rw [List.oldMapIdxCore_append f 0 l [e]]
state_before: α : Type u
β : Type v
f : ℕ → α → β
l : List α
e : α
⊢ List.oldMapIdxCore f 0 (l ++ [e]) = List.oldMapIdxCore f 0 l ++ [f (length l) e]

tactic: simp only [zero_add, append_cancel_left_eq]
state_before: α : Type u
β : Type v
f : ℕ → α → β
l : List α
e : α
⊢ List.oldMapIdxCore f 0 l ++ List.oldMapIdxCore f (0 + length l) [e] = List.oldMapIdxCore f 0 l ++ [f (length l) e]

tactic: rfl
state_before: α : Type u
β : Type v
f : ℕ → α → β
l : List α
e : α
⊢ List.oldMapIdxCore f (length l) [e] = [f (length l) e]
Theorem: Nat.fib_lt_fib_succ
File: Mathlib/Data/Nat/Fib.lean

tactic: rcases exists_add_of_le hn with ⟨n, rfl⟩
state_before: n : ℕ
hn : 2 ≤ n
⊢ fib n < fib (n + 1)

tactic: rw [← tsub_pos_iff_lt, add_comm 2, fib_add_two_sub_fib_add_one]
state_before: case intro
n : ℕ
hn : 2 ≤ 2 + n
⊢ fib (2 + n) < fib (2 + n + 1)

tactic: apply fib_pos (succ_pos n)
state_before: case intro
n : ℕ
hn : 2 ≤ 2 + n
⊢ 0 < fib (n + 1)
Theorem: IsCoprime.mul_dvd
File: Mathlib/RingTheory/Coprime/Basic.lean

tactic: obtain ⟨a, b, h⟩ := H
state_before: R : Type u
inst✝ : CommSemiring R
x y z : R
H : IsCoprime x y
H1 : x ∣ z
H2 : y ∣ z
⊢ x * y ∣ z

tactic: rw [← mul_one z, ← h, mul_add]
state_before: case intro.intro
R : Type u
inst✝ : CommSemiring R
x y z : R
H1 : x ∣ z
H2 : y ∣ z
a b : R
h : a * x + b * y = 1
⊢ x * y ∣ z

tactic: apply dvd_add
state_before: case intro.intro
R : Type u
inst✝ : CommSemiring R
x y z : R
H1 : x ∣ z
H2 : y ∣ z
a b : R
h : a * x + b * y = 1
⊢ x * y ∣ z * (a * x) + z * (b * y)

tactic: rw [mul_comm z, mul_assoc]
state_before: case intro.intro.h₁
R : Type u
inst✝ : CommSemiring R
x y z : R
H1 : x ∣ z
H2 : y ∣ z
a b : R
h : a * x + b * y = 1
⊢ x * y ∣ z * (a * x)

tactic: exact (mul_dvd_mul_left _ H2).mul_left _
state_before: case intro.intro.h₁
R : Type u
inst✝ : CommSemiring R
x y z : R
H1 : x ∣ z
H2 : y ∣ z
a b : R
h : a * x + b * y = 1
⊢ x * y ∣ a * (x * z)

tactic: rw [mul_comm b, ← mul_assoc]
state_before: case intro.intro.h₂
R : Type u
inst✝ : CommSemiring R
x y z : R
H1 : x ∣ z
H2 : y ∣ z
a b : R
h : a * x + b * y = 1
⊢ x * y ∣ z * (b * y)

tactic: exact (mul_dvd_mul_right H1 _).mul_right _
state_before: case intro.intro.h₂
R : Type u
inst✝ : CommSemiring R
x y z : R
H1 : x ∣ z
H2 : y ∣ z
a b : R
h : a * x + b * y = 1
⊢ x * y ∣ z * y * b
Theorem: Valued.hasBasis_nhds_zero
File: Mathlib/Topology/Algebra/Valuation.lean

tactic: simp [Filter.hasBasis_iff, is_topological_valuation]
state_before: R : Type u
inst✝¹ : Ring R
Γ₀ : Type v
inst✝ : LinearOrderedCommGroupWithZero Γ₀
_i : Valued R Γ₀
⊢ Filter.HasBasis (𝓝 0) (fun x => True) fun γ => {x | ↑v x < ↑γ}
Theorem: Set.image_sub_const_Ioo
File: Mathlib/Data/Set/Pointwise/Interval.lean

tactic: simp [sub_eq_neg_add]
state_before: α : Type u_1
inst✝ : OrderedAddCommGroup α
a b c : α
⊢ (fun x => x - a) '' Ioo b c = Ioo (b - a) (c - a)
Theorem: Set.toFinset_univ
File: Mathlib/Data/Fintype/Basic.lean

tactic: ext
state_before: α : Type u_1
β : Type ?u.91847
γ : Type ?u.91850
s t : Set α
inst✝¹ : Fintype α
inst✝ : Fintype ↑univ
⊢ toFinset univ = Finset.univ

tactic: simp
state_before: case a
α : Type u_1
β : Type ?u.91847
γ : Type ?u.91850
s t : Set α
inst✝¹ : Fintype α
inst✝ : Fintype ↑univ
a✝ : α
⊢ a✝ ∈ toFinset univ ↔ a✝ ∈ Finset.univ
Theorem: Polynomial.coeff_monomial_mul
File: Mathlib/Data/Polynomial/Coeff.lean

tactic: rw [← C_mul_X_pow_eq_monomial, mul_assoc, coeff_C_mul, X_pow_mul, coeff_mul_X_pow]
state_before: R : Type u
S : Type v
a b : R
n✝ m : ℕ
inst✝ : Semiring R
p✝ q r✝ p : R[X]
n d : ℕ
r : R
⊢ coeff (↑(monomial n) r * p) (d + n) = r * coeff p d
Theorem: Submonoid.FG.map_injective
File: Mathlib/GroupTheory/Finiteness.lean

tactic: obtain ⟨s, hs⟩ := h
state_before: M : Type u_2
N : Type ?u.23387
inst✝² : Monoid M
inst✝¹ : AddMonoid N
M' : Type u_1
inst✝ : Monoid M'
P : Submonoid M
e : M →* M'
he : Function.Injective ↑e
h : FG (Submonoid.map e P)
⊢ FG P

tactic: use s.preimage e (he.injOn _)
state_before: case intro
M : Type u_2
N : Type ?u.23387
inst✝² : Monoid M
inst✝¹ : AddMonoid N
M' : Type u_1
inst✝ : Monoid M'
P : Submonoid M
e : M →* M'
he : Function.Injective ↑e
s : Finset M'
hs : closure ↑s = Submonoid.map e P
⊢ FG P

tactic: apply Submonoid.map_injective_of_injective he
state_before: case intro
M : Type u_2
N : Type ?u.23387
inst✝² : Monoid M
inst✝¹ : AddMonoid N
M' : Type u_1
inst✝ : Monoid M'
P : Submonoid M
e : M →* M'
he : Function.Injective ↑e
s : Finset M'
hs : closure ↑s = Submonoid.map e P
⊢ closure ↑(Finset.preimage s ↑e (_ : Set.InjOn (↑e) (↑e ⁻¹' ↑s))) = P

tactic: rw [← hs, MonoidHom.map_mclosure e, Finset.coe_preimage]
state_before: case intro.a
M : Type u_2
N : Type ?u.23387
inst✝² : Monoid M
inst✝¹ : AddMonoid N
M' : Type u_1
inst✝ : Monoid M'
P : Submonoid M
e : M →* M'
he : Function.Injective ↑e
s : Finset M'
hs : closure ↑s = Submonoid.map e P
⊢ Submonoid.map e (closure ↑(Finset.preimage s ↑e (_ : Set.InjOn (↑e) (↑e ⁻¹' ↑s)))) = Submonoid.map e P

tactic: congr
state_before: case intro.a
M : Type u_2
N : Type ?u.23387
inst✝² : Monoid M
inst✝¹ : AddMonoid N
M' : Type u_1
inst✝ : Monoid M'
P : Submonoid M
e : M →* M'
he : Function.Injective ↑e
s : Finset M'
hs : closure ↑s = Submonoid.map e P
⊢ closure (↑e '' (↑e ⁻¹' ↑s)) = closure ↑s

tactic: rw [Set.image_preimage_eq_iff, ← MonoidHom.coe_mrange e, ← Submonoid.closure_le, hs,
    MonoidHom.mrange_eq_map e]
state_before: case intro.a.e_s
M : Type u_2
N : Type ?u.23387
inst✝² : Monoid M
inst✝¹ : AddMonoid N
M' : Type u_1
inst✝ : Monoid M'
P : Submonoid M
e : M →* M'
he : Function.Injective ↑e
s : Finset M'
hs : closure ↑s = Submonoid.map e P
⊢ ↑e '' (↑e ⁻¹' ↑s) = ↑s

tactic: exact Submonoid.monotone_map le_top
state_before: case intro.a.e_s
M : Type u_2
N : Type ?u.23387
inst✝² : Monoid M
inst✝¹ : AddMonoid N
M' : Type u_1
inst✝ : Monoid M'
P : Submonoid M
e : M →* M'
he : Function.Injective ↑e
s : Finset M'
hs : closure ↑s = Submonoid.map e P
⊢ Submonoid.map e P ≤ Submonoid.map e ⊤
Theorem: zpow_mono_right
File: Mathlib/Algebra/GroupPower/Lemmas.lean

tactic: rw [← zpow_add]
state_before: α : Type u_1
M : Type u
N : Type v
G : Type w
H : Type x
A : Type y
B : Type z
R : Type u₁
S : Type u₂
inst✝ : OrderedCommGroup α
m✝ n✝ : ℤ
a b : α
ha : 1 ≤ a
m n : ℤ
h : m ≤ n
⊢ a ^ m * a ^ (n - m) = a ^ n

tactic: simp
state_before: α : Type u_1
M : Type u
N : Type v
G : Type w
H : Type x
A : Type y
B : Type z
R : Type u₁
S : Type u₂
inst✝ : OrderedCommGroup α
m✝ n✝ : ℤ
a b : α
ha : 1 ≤ a
m n : ℤ
h : m ≤ n
⊢ a ^ (m + (n - m)) = a ^ n
Theorem: Real.pi_lower_bound_start
File: Mathlib/Data/Real/Pi/Bounds.lean

tactic: refine' lt_of_le_of_lt _ (pi_gt_sqrtTwoAddSeries n)
state_before: n : ℕ
a : ℝ
h : sqrtTwoAddSeries (↑0 / ↑1) n ≤ 2 - (a / 2 ^ (n + 1)) ^ 2
⊢ a < π

tactic: rw [mul_comm]
state_before: n : ℕ
a : ℝ
h : sqrtTwoAddSeries (↑0 / ↑1) n ≤ 2 - (a / 2 ^ (n + 1)) ^ 2
⊢ a ≤ 2 ^ (n + 1) * sqrt (2 - sqrtTwoAddSeries 0 n)

tactic: refine' (div_le_iff (pow_pos (by norm_num) _ : (0 : ℝ) < _)).mp (le_sqrt_of_sq_le _)
state_before: n : ℕ
a : ℝ
h : sqrtTwoAddSeries (↑0 / ↑1) n ≤ 2 - (a / 2 ^ (n + 1)) ^ 2
⊢ a ≤ sqrt (2 - sqrtTwoAddSeries 0 n) * 2 ^ (n + 1)

tactic: rwa [le_sub_comm, show (0 : ℝ) = (0 : ℕ) / (1 : ℕ) by rw [Nat.cast_zero, zero_div]]
state_before: n : ℕ
a : ℝ
h : sqrtTwoAddSeries (↑0 / ↑1) n ≤ 2 - (a / 2 ^ (n + 1)) ^ 2
⊢ (a / 2 ^ (n + 1)) ^ 2 ≤ 2 - sqrtTwoAddSeries 0 n

tactic: norm_num
state_before: n : ℕ
a : ℝ
h : sqrtTwoAddSeries (↑0 / ↑1) n ≤ 2 - (a / 2 ^ (n + 1)) ^ 2
⊢ 0 < 2

tactic: rw [Nat.cast_zero, zero_div]
state_before: n : ℕ
a : ℝ
h : sqrtTwoAddSeries (↑0 / ↑1) n ≤ 2 - (a / 2 ^ (n + 1)) ^ 2
⊢ 0 = ↑0 / ↑1
Theorem: Nat.closedBall_eq_Icc
File: Mathlib/Topology/Instances/Nat.lean

tactic: rcases le_or_lt 0 r with (hr | hr)
state_before: x : ℕ
r : ℝ
⊢ closedBall x r = Icc ⌈↑x - r⌉₊ ⌊↑x + r⌋₊

tactic: rw [← preimage_closedBall, Real.closedBall_eq_Icc, preimage_Icc]
state_before: case inl
x : ℕ
r : ℝ
hr : 0 ≤ r
⊢ closedBall x r = Icc ⌈↑x - r⌉₊ ⌊↑x + r⌋₊

tactic: exact add_nonneg (cast_nonneg x) hr
state_before: case inl
x : ℕ
r : ℝ
hr : 0 ≤ r
⊢ 0 ≤ ↑x + r

tactic: rw [closedBall_eq_empty.2 hr, Icc_eq_empty_of_lt]
state_before: case inr
x : ℕ
r : ℝ
hr : r < 0
⊢ closedBall x r = Icc ⌈↑x - r⌉₊ ⌊↑x + r⌋₊

tactic: calc ⌊(x : ℝ) + r⌋₊ ≤ ⌊(x : ℝ)⌋₊ := floor_mono <| by linarith
_ < ⌈↑x - r⌉₊ := by
  rw [floor_coe, Nat.lt_ceil]
  linarith
state_before: case inr
x : ℕ
r : ℝ
hr : r < 0
⊢ ⌊↑x + r⌋₊ < ⌈↑x - r⌉₊

tactic: linarith
state_before: x : ℕ
r : ℝ
hr : r < 0
⊢ ↑x + r ≤ ↑x

tactic: rw [floor_coe, Nat.lt_ceil]
state_before: x : ℕ
r : ℝ
hr : r < 0
⊢ ⌊↑x⌋₊ < ⌈↑x - r⌉₊

tactic: linarith
state_before: x : ℕ
r : ℝ
hr : r < 0
⊢ ↑x < ↑x - r
Theorem: Real.toNNReal_mul
File: Mathlib/Data/Real/NNReal.lean

tactic: simp [mul_max_of_nonneg, hp]
state_before: p q : ℝ
hp : 0 ≤ p
⊢ ↑(toNNReal (p * q)) = ↑(toNNReal p * toNNReal q)