tasksource/leandojo huggingface dataset:
Theorem: SimpleGraph.Walk.reverse_append
File: Mathlib/Combinatorics/SimpleGraph/Connectivity.lean

tactic: simp [reverse]
state_before: V : Type u
V' : Type v
V'' : Type w
G : SimpleGraph V
G' : SimpleGraph V'
G'' : SimpleGraph V''
u v w : V
p : Walk G u v
q : Walk G v w
⊢ reverse (append p q) = append (reverse q) (reverse p)
Theorem: Equiv.id_traverse
File: Mathlib/Control/Traversable/Equiv.lean

tactic: simp [Equiv.traverse]
state_before: t t' : Type u → Type u
eqv : (α : Type u) → t α ≃ t' α
inst✝⁵ : Traversable t
inst✝⁴ : IsLawfulTraversable t
F G : Type u → Type u
inst✝³ : Applicative F
inst✝² : Applicative G
inst✝¹ : LawfulApplicative F
inst✝ : LawfulApplicative G
η : ApplicativeTransformation F G
α β γ : Type u
x : t' α
⊢ Equiv.traverse eqv pure x = x
Theorem: AlgebraicTopology.DoldKan.Q_f_naturality
File: Mathlib/AlgebraicTopology/DoldKan/Projections.lean

tactic: simp only [Q, HomologicalComplex.sub_f_apply, HomologicalComplex.id_f, comp_sub, P_f_naturality,
  sub_comp, sub_left_inj]
state_before: C : Type u_2
inst✝¹ : Category C
inst✝ : Preadditive C
X✝ : SimplicialObject C
q n : ℕ
X Y : SimplicialObject C
f : X ⟶ Y
⊢ f.app [n].op ≫ HomologicalComplex.Hom.f (Q q) n = HomologicalComplex.Hom.f (Q q) n ≫ f.app [n].op

tactic: dsimp
state_before: C : Type u_2
inst✝¹ : Category C
inst✝ : Preadditive C
X✝ : SimplicialObject C
q n : ℕ
X Y : SimplicialObject C
f : X ⟶ Y
⊢ f.app [n].op ≫ 𝟙 (HomologicalComplex.X K[Y] n) = 𝟙 (HomologicalComplex.X K[X] n) ≫ f.app [n].op

tactic: simp only [comp_id, id_comp]
state_before: C : Type u_2
inst✝¹ : Category C
inst✝ : Preadditive C
X✝ : SimplicialObject C
q n : ℕ
X Y : SimplicialObject C
f : X ⟶ Y
⊢ f.app [n].op ≫ 𝟙 (Y.obj [n].op) = 𝟙 (X.obj [n].op) ≫ f.app [n].op
Theorem: Std.Range.numElems_step_1
File: Std/Data/Range/Lemmas.lean

tactic: simp [numElems]
state_before: start stop : Nat
⊢ numElems { start := start, stop := stop, step := 1 } = stop - start
Theorem: AlgebraicGeometry.PresheafedSpace.stalkMap.congr_hom
File: Mathlib/AlgebraicGeometry/Stalks.lean

tactic: rw [h]
state_before: C : Type u
inst✝¹ : Category C
inst✝ : HasColimits C
X Y : PresheafedSpace C
α β : X ⟶ Y
h : α = β
x : ↑↑X
⊢ stalk Y ((CategoryTheory.forget TopCat).map α.base x) = stalk Y ((CategoryTheory.forget TopCat).map β.base x)

tactic: rw [← stalkMap.congr α β h x x rfl, eqToHom_refl, Category.comp_id]
state_before: C : Type u
inst✝¹ : Category C
inst✝ : HasColimits C
X Y : PresheafedSpace C
α β : X ⟶ Y
h : α = β
x : ↑↑X
⊢ stalkMap α x =
    eqToHom
        (_ :
          stalk Y ((CategoryTheory.forget TopCat).map α.base x) =
            stalk Y ((CategoryTheory.forget TopCat).map β.base x)) ≫
      stalkMap β x
Theorem: LinearMap.aeval_self_charpoly
File: Mathlib/LinearAlgebra/Charpoly/Basic.lean

tactic: apply (LinearEquiv.map_eq_zero_iff (algEquivMatrix (chooseBasis R M)).toLinearEquiv).1
state_before: R : Type u
M : Type v
inst✝⁵ : CommRing R
inst✝⁴ : Nontrivial R
inst✝³ : AddCommGroup M
inst✝² : Module R M
inst✝¹ : Module.Free R M
inst✝ : Module.Finite R M
f : M →ₗ[R] M
⊢ ↑(aeval f) (charpoly f) = 0

tactic: rw [AlgEquiv.toLinearEquiv_apply, ← AlgEquiv.coe_algHom, ← Polynomial.aeval_algHom_apply _ _ _,
  charpoly_def]
state_before: R : Type u
M : Type v
inst✝⁵ : CommRing R
inst✝⁴ : Nontrivial R
inst✝³ : AddCommGroup M
inst✝² : Module R M
inst✝¹ : Module.Free R M
inst✝ : Module.Finite R M
f : M →ₗ[R] M
⊢ ↑(AlgEquiv.toLinearEquiv (algEquivMatrix (chooseBasis R M))) (↑(aeval f) (charpoly f)) = 0

tactic: exact Matrix.aeval_self_charpoly _
state_before: R : Type u
M : Type v
inst✝⁵ : CommRing R
inst✝⁴ : Nontrivial R
inst✝³ : AddCommGroup M
inst✝² : Module R M
inst✝¹ : Module.Free R M
inst✝ : Module.Finite R M
f : M →ₗ[R] M
⊢ ↑(aeval (↑↑(algEquivMatrix (chooseBasis R M)) f))
      (Matrix.charpoly (↑(toMatrix (chooseBasis R M) (chooseBasis R M)) f)) =
    0
Theorem: Real.tan_two_mul
File: Mathlib/Analysis/SpecialFunctions/Trigonometric/Arctan.lean

tactic: have := @Complex.tan_two_mul x
state_before: x : ℝ
⊢ tan (2 * x) = ↑2 * tan x / (↑1 - tan x ^ 2)

tactic: norm_cast at *
state_before: x : ℝ
this : Complex.tan (2 * ↑x) = 2 * Complex.tan ↑x / (1 - Complex.tan ↑x ^ 2)
⊢ tan (2 * x) = ↑2 * tan x / (↑1 - tan x ^ 2)
Theorem: Rel.edgeDensity_empty_left
File: Mathlib/Combinatorics/SimpleGraph/Density.lean

tactic: rw [edgeDensity, Finset.card_empty, Nat.cast_zero, zero_mul, div_zero]
state_before: 𝕜 : Type ?u.20604
ι : Type ?u.20607
κ : Type ?u.20610
α : Type u_2
β : Type u_1
inst✝¹ : LinearOrderedField 𝕜
r : α → β → Prop
inst✝ : (a : α) → DecidablePred (r a)
s s₁ s₂ : Finset α
t✝ t₁ t₂ : Finset β
a : α
b : β
δ : 𝕜
t : Finset β
⊢ edgeDensity r ∅ t = 0
Theorem: openSegment_eq_image_lineMap
File: Mathlib/Analysis/Convex/Segment.lean

tactic: convert openSegment_eq_image 𝕜 x y using 2
state_before: 𝕜 : Type u_2
E : Type u_1
F : Type ?u.93217
G : Type ?u.93220
ι : Type ?u.93223
π : ι → Type ?u.93228
inst✝⁵ : OrderedRing 𝕜
inst✝⁴ : AddCommGroup E
inst✝³ : AddCommGroup F
inst✝² : AddCommGroup G
inst✝¹ : Module 𝕜 E
inst✝ : Module 𝕜 F
x y : E
⊢ openSegment 𝕜 x y = ↑(AffineMap.lineMap x y) '' Ioo 0 1

tactic: exact AffineMap.lineMap_apply_module _ _ _
state_before: case h.e'_3.h
𝕜 : Type u_2
E : Type u_1
F : Type ?u.93217
G : Type ?u.93220
ι : Type ?u.93223
π : ι → Type ?u.93228
inst✝⁵ : OrderedRing 𝕜
inst✝⁴ : AddCommGroup E
inst✝³ : AddCommGroup F
inst✝² : AddCommGroup G
inst✝¹ : Module 𝕜 E
inst✝ : Module 𝕜 F
x y : E
a✝¹ : 𝕜
a✝ : a✝¹ ∈ Ioo 0 1
⊢ ↑(AffineMap.lineMap x y) a✝¹ = (1 - a✝¹) • x + a✝¹ • y
Theorem: FiniteDimensional.finrank_lt_of_rank_lt
File: Mathlib/LinearAlgebra/Finrank.lean

tactic: rwa [← Cardinal.toNat_lt_iff_lt_of_lt_aleph0, toNat_cast] at h
state_before: K : Type u
V : Type v
inst✝⁴ : Ring K
inst✝³ : AddCommGroup V
inst✝² : Module K V
V₂ : Type v'
inst✝¹ : AddCommGroup V₂
inst✝ : Module K V₂
n : ℕ
h : Module.rank K V < ↑n
⊢ finrank K V < n

tactic: exact h.trans (nat_lt_aleph0 n)
state_before: case hc
K : Type u
V : Type v
inst✝⁴ : Ring K
inst✝³ : AddCommGroup V
inst✝² : Module K V
V₂ : Type v'
inst✝¹ : AddCommGroup V₂
inst✝ : Module K V₂
n : ℕ
h : Module.rank K V < ↑n
⊢ Module.rank K V < ℵ₀

tactic: exact nat_lt_aleph0 n
state_before: case hd
K : Type u
V : Type v
inst✝⁴ : Ring K
inst✝³ : AddCommGroup V
inst✝² : Module K V
V₂ : Type v'
inst✝¹ : AddCommGroup V₂
inst✝ : Module K V₂
n : ℕ
h : Module.rank K V < ↑n
⊢ ↑n < ℵ₀
Theorem: LiouvilleWith.nat_mul
File: Mathlib/NumberTheory/Liouville/LiouvilleWith.lean

tactic: rw [mul_comm]
state_before: p q x y : ℝ
r : ℚ
m : ℤ
n : ℕ
h : LiouvilleWith p x
hn : n ≠ 0
⊢ LiouvilleWith p (↑n * x)

tactic: exact h.mul_nat hn
state_before: p q x y : ℝ
r : ℚ
m : ℤ
n : ℕ
h : LiouvilleWith p x
hn : n ≠ 0
⊢ LiouvilleWith p (x * ↑n)
Theorem: Rat.inv_coe_nat_den
File: Mathlib/Data/Rat/Lemmas.lean

tactic: simpa [-inv_coe_int_den, ofInt_eq_cast] using inv_coe_int_den a
state_before: a : ℕ
⊢ (↑a)⁻¹.den = if a = 0 then 1 else a
Theorem: op_geom_sum₂
File: Mathlib/Algebra/GeomSum.lean

tactic: simp only [op_sum, op_mul, op_pow]
state_before: α : Type u
inst✝ : Semiring α
x y : α
n : ℕ
⊢ ∑ i in range n, op y ^ (n - 1 - i) * op x ^ i = ∑ i in range n, op y ^ i * op x ^ (n - 1 - i)

tactic: rw [← sum_range_reflect]
state_before: α : Type u
inst✝ : Semiring α
x y : α
n : ℕ
⊢ ∑ i in range n, op y ^ (n - 1 - i) * op x ^ i = ∑ i in range n, op y ^ i * op x ^ (n - 1 - i)

tactic: refine' sum_congr rfl fun j j_in => _
state_before: α : Type u
inst✝ : Semiring α
x y : α
n : ℕ
⊢ ∑ j in range n, op y ^ (n - 1 - (n - 1 - j)) * op x ^ (n - 1 - j) = ∑ i in range n, op y ^ i * op x ^ (n - 1 - i)

tactic: rw [mem_range, Nat.lt_iff_add_one_le] at j_in
state_before: α : Type u
inst✝ : Semiring α
x y : α
n j : ℕ
j_in : j ∈ range n
⊢ op y ^ (n - 1 - (n - 1 - j)) * op x ^ (n - 1 - j) = op y ^ j * op x ^ (n - 1 - j)

tactic: congr
state_before: α : Type u
inst✝ : Semiring α
x y : α
n j : ℕ
j_in : j + 1 ≤ n
⊢ op y ^ (n - 1 - (n - 1 - j)) * op x ^ (n - 1 - j) = op y ^ j * op x ^ (n - 1 - j)

tactic: apply tsub_tsub_cancel_of_le
state_before: case e_a.e_a
α : Type u
inst✝ : Semiring α
x y : α
n j : ℕ
j_in : j + 1 ≤ n
⊢ n - 1 - (n - 1 - j) = j

tactic: exact le_tsub_of_add_le_right j_in
state_before: case e_a.e_a.h
α : Type u
inst✝ : Semiring α
x y : α
n j : ℕ
j_in : j + 1 ≤ n
⊢ j ≤ n - 1
Theorem: mul_ite
File: Mathlib/Algebra/Ring/Defs.lean

tactic: split_ifs <;> rfl
state_before: α✝ : Type u
β : Type v
γ : Type w
R : Type x
α : Type u_1
inst✝¹ : Mul α
P : Prop
inst✝ : Decidable P
a b c : α
⊢ (a * if P then b else c) = if P then a * b else a * c
Theorem: LieHom.idealRange_eq_top_of_surjective
File: Mathlib/Algebra/Lie/Submodule.lean

tactic: rw [← f.range_eq_top] at h
state_before: R : Type u
L : Type v
L' : Type w₂
M : Type w
M' : Type w₁
inst✝¹² : CommRing R
inst✝¹¹ : LieRing L
inst✝¹⁰ : LieAlgebra R L
inst✝⁹ : LieRing L'
inst✝⁸ : LieAlgebra R L'
inst✝⁷ : AddCommGroup M
inst✝⁶ : Module R M
inst✝⁵ : LieRingModule L M
inst✝⁴ : LieModule R L M
inst✝³ : AddCommGroup M'
inst✝² : Module R M'
inst✝¹ : LieRingModule L M'
inst✝ : LieModule R L M'
f : L →ₗ⁅R⁆ L'
I : LieIdeal R L
J : LieIdeal R L'
h : Function.Surjective ↑f
⊢ idealRange f = ⊤

tactic: rw [idealRange_eq_lieSpan_range, h, ← LieSubalgebra.coe_to_submodule, ←
  LieSubmodule.coe_toSubmodule_eq_iff, LieSubmodule.top_coeSubmodule,
  LieSubalgebra.top_coe_submodule, LieSubmodule.coe_lieSpan_submodule_eq_iff]
state_before: R : Type u
L : Type v
L' : Type w₂
M : Type w
M' : Type w₁
inst✝¹² : CommRing R
inst✝¹¹ : LieRing L
inst✝¹⁰ : LieAlgebra R L
inst✝⁹ : LieRing L'
inst✝⁸ : LieAlgebra R L'
inst✝⁷ : AddCommGroup M
inst✝⁶ : Module R M
inst✝⁵ : LieRingModule L M
inst✝⁴ : LieModule R L M
inst✝³ : AddCommGroup M'
inst✝² : Module R M'
inst✝¹ : LieRingModule L M'
inst✝ : LieModule R L M'
f : L →ₗ⁅R⁆ L'
I : LieIdeal R L
J : LieIdeal R L'
h : range f = ⊤
⊢ idealRange f = ⊤

tactic: use ⊤
state_before: R : Type u
L : Type v
L' : Type w₂
M : Type w
M' : Type w₁
inst✝¹² : CommRing R
inst✝¹¹ : LieRing L
inst✝¹⁰ : LieAlgebra R L
inst✝⁹ : LieRing L'
inst✝⁸ : LieAlgebra R L'
inst✝⁷ : AddCommGroup M
inst✝⁶ : Module R M
inst✝⁵ : LieRingModule L M
inst✝⁴ : LieModule R L M
inst✝³ : AddCommGroup M'
inst✝² : Module R M'
inst✝¹ : LieRingModule L M'
inst✝ : LieModule R L M'
f : L →ₗ⁅R⁆ L'
I : LieIdeal R L
J : LieIdeal R L'
h : range f = ⊤
⊢ ∃ N, ↑N = ⊤

tactic: exact LieSubmodule.top_coeSubmodule
state_before: R : Type u
L : Type v
L' : Type w₂
M : Type w
M' : Type w₁
inst✝¹² : CommRing R
inst✝¹¹ : LieRing L
inst✝¹⁰ : LieAlgebra R L
inst✝⁹ : LieRing L'
inst✝⁸ : LieAlgebra R L'
inst✝⁷ : AddCommGroup M
inst✝⁶ : Module R M
inst✝⁵ : LieRingModule L M
inst✝⁴ : LieModule R L M
inst✝³ : AddCommGroup M'
inst✝² : Module R M'
inst✝¹ : LieRingModule L M'
inst✝ : LieModule R L M'
f : L →ₗ⁅R⁆ L'
I : LieIdeal R L
J : LieIdeal R L'
h : range f = ⊤
⊢ ↑⊤ = ⊤
Theorem: Flow.omegaLimit_image_eq
File: Mathlib/Dynamics/OmegaLimit.lean

tactic: simp [image_image, ← map_add]
state_before: τ : Type u_1
inst✝³ : TopologicalSpace τ
inst✝² : AddCommGroup τ
inst✝¹ : TopologicalAddGroup τ
α : Type u_2
inst✝ : TopologicalSpace α
f : Filter τ
ϕ : Flow τ α
s : Set α
hf : ∀ (t : τ), Tendsto (fun x => x + t) f f
t : τ
⊢ ω f ϕ.toFun s = ω f ϕ.toFun (toFun ϕ (-t) '' (toFun ϕ t '' s))
Theorem: BoxIntegral.Prepartition.mem_split_iff
File: Mathlib/Analysis/BoxIntegral/Partition/Split.lean

tactic: simp [split]
state_before: ι : Type u_1
M : Type ?u.24493
n : ℕ
I J : Box ι
i : ι
x : ℝ
⊢ J ∈ split I i x ↔ ↑J = Box.splitLower I i x ∨ ↑J = Box.splitUpper I i x
Theorem: MeasureTheory.snormEssSup_const
File: Mathlib/MeasureTheory/Function/LpSeminorm.lean

tactic: rw [snormEssSup, essSup_const _ hμ]
state_before: α : Type u_1
E : Type ?u.1108115
F : Type u_2
G : Type ?u.1108121
m m0 : MeasurableSpace α
p : ℝ≥0∞
q : ℝ
μ ν : Measure α
inst✝² : NormedAddCommGroup E
inst✝¹ : NormedAddCommGroup F
inst✝ : NormedAddCommGroup G
c : F
hμ : μ ≠ 0
⊢ snormEssSup (fun x => c) μ = ↑‖c‖₊
Theorem: Matrix.IsAdjMatrix.apply_ne_one_iff
File: Mathlib/Combinatorics/SimpleGraph/AdjMatrix.lean

tactic: obtain h | h := h.zero_or_one i j <;> simp [h]
state_before: V : Type u_2
α : Type u_1
β : Type ?u.3595
A : Matrix V V α
inst✝¹ : MulZeroOneClass α
inst✝ : Nontrivial α
h : IsAdjMatrix A
i j : V
⊢ ¬A i j = 1 ↔ A i j = 0
Theorem: Icc_subset_segment
File: Mathlib/Analysis/Convex/Segment.lean

tactic: rintro z ⟨hxz, hyz⟩
state_before: 𝕜 : Type u_1
E : Type ?u.284099
F : Type ?u.284102
G : Type ?u.284105
ι : Type ?u.284108
π : ι → Type ?u.284113
inst✝ : LinearOrderedField 𝕜
x y z : 𝕜
⊢ Icc x y ⊆ [x-[𝕜]y]

tactic: obtain rfl | h := (hxz.trans hyz).eq_or_lt
state_before: case intro
𝕜 : Type u_1
E : Type ?u.284099
F : Type ?u.284102
G : Type ?u.284105
ι : Type ?u.284108
π : ι → Type ?u.284113
inst✝ : LinearOrderedField 𝕜
x y z✝ z : 𝕜
hxz : x ≤ z
hyz : z ≤ y
⊢ z ∈ [x-[𝕜]y]

tactic: rw [← sub_nonneg] at hxz hyz
state_before: case intro.inr
𝕜 : Type u_1
E : Type ?u.284099
F : Type ?u.284102
G : Type ?u.284105
ι : Type ?u.284108
π : ι → Type ?u.284113
inst✝ : LinearOrderedField 𝕜
x y z✝ z : 𝕜
hxz : x ≤ z
hyz : z ≤ y
h : x < y
⊢ z ∈ [x-[𝕜]y]

tactic: rw [← sub_pos] at h
state_before: case intro.inr
𝕜 : Type u_1
E : Type ?u.284099
F : Type ?u.284102
G : Type ?u.284105
ι : Type ?u.284108
π : ι → Type ?u.284113
inst✝ : LinearOrderedField 𝕜
x y z✝ z : 𝕜
hxz✝ : x ≤ z
hxz : 0 ≤ z - x
hyz✝ : z ≤ y
hyz : 0 ≤ y - z
h : x < y
⊢ z ∈ [x-[𝕜]y]

tactic: refine' ⟨(y - z) / (y - x), (z - x) / (y - x), div_nonneg hyz h.le, div_nonneg hxz h.le, _, _⟩
state_before: case intro.inr
𝕜 : Type u_1
E : Type ?u.284099
F : Type ?u.284102
G : Type ?u.284105
ι : Type ?u.284108
π : ι → Type ?u.284113
inst✝ : LinearOrderedField 𝕜
x y z✝ z : 𝕜
hxz✝ : x ≤ z
hxz : 0 ≤ z - x
hyz✝ : z ≤ y
hyz : 0 ≤ y - z
h✝ : x < y
h : 0 < y - x
⊢ z ∈ [x-[𝕜]y]

tactic: rw [segment_same]
state_before: case intro.inl
𝕜 : Type u_1
E : Type ?u.284099
F : Type ?u.284102
G : Type ?u.284105
ι : Type ?u.284108
π : ι → Type ?u.284113
inst✝ : LinearOrderedField 𝕜
x z✝ z : 𝕜
hxz : x ≤ z
hyz : z ≤ x
⊢ z ∈ [x-[𝕜]x]

tactic: exact hyz.antisymm hxz
state_before: case intro.inl
𝕜 : Type u_1
E : Type ?u.284099
F : Type ?u.284102
G : Type ?u.284105
ι : Type ?u.284108
π : ι → Type ?u.284113
inst✝ : LinearOrderedField 𝕜
x z✝ z : 𝕜
hxz : x ≤ z
hyz : z ≤ x
⊢ z ∈ {x}

tactic: rw [← add_div, sub_add_sub_cancel, div_self h.ne']
state_before: case intro.inr.refine'_1
𝕜 : Type u_1
E : Type ?u.284099
F : Type ?u.284102
G : Type ?u.284105
ι : Type ?u.284108
π : ι → Type ?u.284113
inst✝ : LinearOrderedField 𝕜
x y z✝ z : 𝕜
hxz✝ : x ≤ z
hxz : 0 ≤ z - x
hyz✝ : z ≤ y
hyz : 0 ≤ y - z
h✝ : x < y
h : 0 < y - x
⊢ (y - z) / (y - x) + (z - x) / (y - x) = 1

tactic: rw [smul_eq_mul, smul_eq_mul, ← mul_div_right_comm, ← mul_div_right_comm, ← add_div,
  div_eq_iff h.ne', add_comm, sub_mul, sub_mul, mul_comm x, sub_add_sub_cancel, mul_sub]
state_before: case intro.inr.refine'_2
𝕜 : Type u_1
E : Type ?u.284099
F : Type ?u.284102
G : Type ?u.284105
ι : Type ?u.284108
π : ι → Type ?u.284113
inst✝ : LinearOrderedField 𝕜
x y z✝ z : 𝕜
hxz✝ : x ≤ z
hxz : 0 ≤ z - x
hyz✝ : z ≤ y
hyz : 0 ≤ y - z
h✝ : x < y
h : 0 < y - x
⊢ ((y - z) / (y - x)) • x + ((z - x) / (y - x)) • y = z
Theorem: Nat.Prime.prod_properDivisors
File: Mathlib/NumberTheory/Divisors.lean

tactic: simp [h.properDivisors]
state_before: n : ℕ
α : Type u_1
inst✝ : CommMonoid α
p : ℕ
f : ℕ → α
h : Prime p
⊢ ∏ x in Nat.properDivisors p, f x = f 1
Theorem: CategoryTheory.Iso.inv_eq_inv
File: Mathlib/CategoryTheory/Iso.lean

tactic: rw [ext h]
state_before: C : Type u
inst✝ : Category C
X Y Z : C
f✝ g✝ : X ≅ Y
X✝ Y✝ : C
f g : X✝ ≅ Y✝
h : f.hom = g.hom
⊢ f.inv = g.inv
Theorem: Int.zero_fdiv
File: Std/Data/Int/DivMod.lean

tactic: cases b <;> rfl
state_before: b : Int
⊢ fdiv 0 b = 0
Theorem: AffineIndependent.not_mem_affineSpan_diff
File: Mathlib/LinearAlgebra/AffineSpace/Independent.lean

tactic: simp [ha]
state_before: k : Type u_1
V : Type u_2
P : Type u_3
inst✝⁴ : Ring k
inst✝³ : AddCommGroup V
inst✝² : Module k V
inst✝¹ : AffineSpace V P
ι : Type u_4
inst✝ : Nontrivial k
p : ι → P
ha : AffineIndependent k p
i : ι
s : Set ι
⊢ ¬p i ∈ affineSpan k (p '' (s \ {i}))
Theorem: CategoryTheory.Limits.limit.map_pre'
File: Mathlib/CategoryTheory/Limits/HasLimits.lean

tactic: ext1
state_before: J : Type u₁
inst✝⁴ : Category J
K : Type u₂
inst✝³ : Category K
C : Type u
inst✝² : Category C
F✝ : J ⥤ C
inst✝¹ : HasLimitsOfShape J C
G : J ⥤ C
α✝ : F✝ ⟶ G
inst✝ : HasLimitsOfShape K C
F : J ⥤ C
E₁ E₂ : K ⥤ J
α : E₁ ⟶ E₂
⊢ pre F E₂ = pre F E₁ ≫ lim.map (whiskerRight α F)

tactic: simp [← category.assoc]
state_before: case w
J : Type u₁
inst✝⁴ : Category J
K : Type u₂
inst✝³ : Category K
C : Type u
inst✝² : Category C
F✝ : J ⥤ C
inst✝¹ : HasLimitsOfShape J C
G : J ⥤ C
α✝ : F✝ ⟶ G
inst✝ : HasLimitsOfShape K C
F : J ⥤ C
E₁ E₂ : K ⥤ J
α : E₁ ⟶ E₂
j✝ : K
⊢ pre F E₂ ≫ π (E₂ ⋙ F) j✝ = (pre F E₁ ≫ lim.map (whiskerRight α F)) ≫ π (E₂ ⋙ F) j✝
Theorem: Polynomial.nextCoeff_map
File: Mathlib/Data/Polynomial/Monic.lean

tactic: unfold nextCoeff
state_before: R : Type u
S : Type v
a b : R
m n : ℕ
ι : Type y
inst✝¹ : Semiring R
inst✝ : Semiring S
f : R →+* S
hf : Injective ↑f
p : R[X]
⊢ nextCoeff (map f p) = ↑f (nextCoeff p)

tactic: rw [natDegree_map_eq_of_injective hf]
state_before: R : Type u
S : Type v
a b : R
m n : ℕ
ι : Type y
inst✝¹ : Semiring R
inst✝ : Semiring S
f : R →+* S
hf : Injective ↑f
p : R[X]
⊢ (if natDegree (map f p) = 0 then 0 else coeff (map f p) (natDegree (map f p) - 1)) =
    ↑f (if natDegree p = 0 then 0 else coeff p (natDegree p - 1))

tactic: split_ifs <;> simp [*]
state_before: R : Type u
S : Type v
a b : R
m n : ℕ
ι : Type y
inst✝¹ : Semiring R
inst✝ : Semiring S
f : R →+* S
hf : Injective ↑f
p : R[X]
⊢ (if natDegree p = 0 then 0 else coeff (map f p) (natDegree p - 1)) =
    ↑f (if natDegree p = 0 then 0 else coeff p (natDegree p - 1))
Theorem: List.support_formPerm_le
File: Mathlib/GroupTheory/Perm/List.lean

tactic: intro x hx
state_before: α : Type u_1
β : Type ?u.746484
inst✝¹ : DecidableEq α
l : List α
x : α
inst✝ : Fintype α
⊢ support (formPerm l) ≤ toFinset l

tactic: have hx' : x ∈ { x | formPerm l x ≠ x } := by simpa using hx
state_before: α : Type u_1
β : Type ?u.746484
inst✝¹ : DecidableEq α
l : List α
x✝ : α
inst✝ : Fintype α
x : α
hx : x ∈ support (formPerm l)
⊢ x ∈ toFinset l

tactic: simpa using support_formPerm_le' _ hx'
state_before: α : Type u_1
β : Type ?u.746484
inst✝¹ : DecidableEq α
l : List α
x✝ : α
inst✝ : Fintype α
x : α
hx : x ∈ support (formPerm l)
hx' : x ∈ {x | ↑(formPerm l) x ≠ x}
⊢ x ∈ toFinset l

tactic: simpa using hx
state_before: α : Type u_1
β : Type ?u.746484
inst✝¹ : DecidableEq α
l : List α
x✝ : α
inst✝ : Fintype α
x : α
hx : x ∈ support (formPerm l)
⊢ x ∈ {x | ↑(formPerm l) x ≠ x}
Theorem: Substring.ValidFor.foldr
File: Std/Data/String/Lemmas.lean

tactic: simp [-List.append_assoc, Substring.foldr, foldrAux_of_valid]
state_before: α : Type u_1
l m r : List Char
f : Char → α → α
init : α
⊢ Substring.foldr f init
      { str := { data := l ++ m ++ r }, startPos := { byteIdx := utf8Len l },
        stopPos := { byteIdx := utf8Len l + utf8Len m } } =
    List.foldr f init m
Theorem: Finset.exists_lt_of_prod_lt'
File: Mathlib/Algebra/BigOperators/Order.lean

tactic: contrapose! Hlt with Hle
state_before: ι : Type u_2
α : Type ?u.143423
β : Type ?u.143426
M : Type u_1
N : Type ?u.143432
G : Type ?u.143435
k : Type ?u.143438
R : Type ?u.143441
inst✝ : LinearOrderedCancelCommMonoid M
f g : ι → M
s t : Finset ι
Hlt : ∏ i in s, f i < ∏ i in s, g i
⊢ ∃ i, i ∈ s ∧ f i < g i

tactic: exact prod_le_prod' Hle
state_before: ι : Type u_2
α : Type ?u.143423
β : Type ?u.143426
M : Type u_1
N : Type ?u.143432
G : Type ?u.143435
k : Type ?u.143438
R : Type ?u.143441
inst✝ : LinearOrderedCancelCommMonoid M
f g : ι → M
s t : Finset ι
Hle : ∀ (i : ι), i ∈ s → g i ≤ f i
⊢ ∏ i in s, g i ≤ ∏ i in s, f i
Theorem: OrderIso.toRelIsoLT_ofRelIsoLT
File: Mathlib/Order/Hom/Basic.lean

tactic: ext
state_before: F : Type ?u.91547
α✝ : Type ?u.91550
β✝ : Type ?u.91553
γ : Type ?u.91556
δ : Type ?u.91559
inst✝⁴ : Preorder α✝
inst✝³ : Preorder β✝
inst✝² : Preorder γ
α : Type u_1
β : Type u_2
inst✝¹ : PartialOrder α
inst✝ : PartialOrder β
e : (fun x x_1 => x < x_1) ≃r fun x x_1 => x < x_1
⊢ toRelIsoLT (ofRelIsoLT e) = e

tactic: simp
state_before: case h
F : Type ?u.91547
α✝ : Type ?u.91550
β✝ : Type ?u.91553
γ : Type ?u.91556
δ : Type ?u.91559
inst✝⁴ : Preorder α✝
inst✝³ : Preorder β✝
inst✝² : Preorder γ
α : Type u_1
β : Type u_2
inst✝¹ : PartialOrder α
inst✝ : PartialOrder β
e : (fun x x_1 => x < x_1) ≃r fun x x_1 => x < x_1
x✝ : α
⊢ ↑(toRelIsoLT (ofRelIsoLT e)) x✝ = ↑e x✝
Theorem: ContinuousOn.tendstoUniformly
File: Mathlib/Topology/UniformSpace/Compact.lean

tactic: rcases LocallyCompactSpace.local_compact_nhds _ _ hxU with ⟨K, hxK, hKU, hK⟩
state_before: α : Type u_1
β : Type u_2
γ : Type u_3
inst✝⁴ : UniformSpace α
inst✝³ : UniformSpace β
inst✝² : LocallyCompactSpace α
inst✝¹ : CompactSpace β
inst✝ : UniformSpace γ
f : α → β → γ
x : α
U : Set α
hxU : U ∈ 𝓝 x
h : ContinuousOn (↿f) (U ×ˢ univ)
⊢ TendstoUniformly f (f x) (𝓝 x)

tactic: have : UniformContinuousOn (↿f) (K ×ˢ univ) :=
  IsCompact.uniformContinuousOn_of_continuous (hK.prod isCompact_univ)
    (h.mono <| prod_mono hKU Subset.rfl)
state_before: case intro.intro.intro
α : Type u_1
β : Type u_2
γ : Type u_3
inst✝⁴ : UniformSpace α
inst✝³ : UniformSpace β
inst✝² : LocallyCompactSpace α
inst✝¹ : CompactSpace β
inst✝ : UniformSpace γ
f : α → β → γ
x : α
U : Set α
hxU : U ∈ 𝓝 x
h : ContinuousOn (↿f) (U ×ˢ univ)
K : Set α
hxK : K ∈ 𝓝 x
hKU : K ⊆ U
hK : IsCompact K
⊢ TendstoUniformly f (f x) (𝓝 x)

tactic: exact this.tendstoUniformly hxK
state_before: case intro.intro.intro
α : Type u_1
β : Type u_2
γ : Type u_3
inst✝⁴ : UniformSpace α
inst✝³ : UniformSpace β
inst✝² : LocallyCompactSpace α
inst✝¹ : CompactSpace β
inst✝ : UniformSpace γ
f : α → β → γ
x : α
U : Set α
hxU : U ∈ 𝓝 x
h : ContinuousOn (↿f) (U ×ˢ univ)
K : Set α
hxK : K ∈ 𝓝 x
hKU : K ⊆ U
hK : IsCompact K
this : UniformContinuousOn (↿f) (K ×ˢ univ)
⊢ TendstoUniformly f (f x) (𝓝 x)
Theorem: Polynomial.eval_int_cast
File: Mathlib/Data/Polynomial/Eval.lean

tactic: simp only [← C_eq_int_cast, eval_C]
state_before: R : Type u
S : Type v
T : Type w
ι : Type y
a b : R
m n✝ : ℕ
inst✝ : Ring R
p q r : R[X]
n : ℤ
x : R
⊢ eval x ↑n = ↑n
Theorem: Set.mul_mem_center
File: Mathlib/GroupTheory/Subsemigroup/Center.lean

tactic: rw [mul_assoc, ← hb g, ← mul_assoc, ha g, mul_assoc]
state_before: M : Type u_1
inst✝ : Semigroup M
a b : M
ha : a ∈ center M
hb : b ∈ center M
g : M
⊢ g * (a * b) = a * b * g
Theorem: Array.foldrM_eq_reverse_foldlM_data
File: Std/Data/Array/Init/Lemmas.lean

tactic: have : arr = #[] ∨ 0 < arr.size :=
  match arr with | ⟨[]⟩ => .inl rfl | ⟨a::l⟩ => .inr (Nat.zero_lt_succ _)
state_before: m : Type u_1 → Type u_2
α : Type u_3
β : Type u_1
inst✝ : Monad m
f : α → β → m β
init : β
arr : Array α
⊢ foldrM f init arr (size arr) = List.foldlM (fun x y => f y x) init (List.reverse arr.data)

tactic: match arr, this with | _, .inl rfl => rfl | arr, .inr h => ?_
state_before: m : Type u_1 → Type u_2
α : Type u_3
β : Type u_1
inst✝ : Monad m
f : α → β → m β
init : β
arr : Array α
this : arr = #[] ∨ 0 < size arr
⊢ foldrM f init arr (size arr) = List.foldlM (fun x y => f y x) init (List.reverse arr.data)

tactic: simp [foldrM, h, ← foldrM_eq_reverse_foldlM_data.aux, List.take_length]
state_before: m : Type u_1 → Type u_2
α : Type u_3
β : Type u_1
inst✝ : Monad m
f : α → β → m β
init : β
arr✝ : Array α
this : arr✝ = #[] ∨ 0 < size arr✝
arr : Array α
h : 0 < size arr
⊢ foldrM f init arr (size arr) = List.foldlM (fun x y => f y x) init (List.reverse arr.data)

tactic: rfl
state_before: m : Type u_1 → Type u_2
α : Type u_3
β : Type u_1
inst✝ : Monad m
f : α → β → m β
init : β
arr : Array α
this : arr = #[] ∨ 0 < size arr
⊢ foldrM f init #[] (size #[]) = List.foldlM (fun x y => f y x) init (List.reverse #[].data)
Theorem: Mathlib.Meta.NormNum.isRat_div
File: Mathlib/Tactic/NormNum/Basic.lean

tactic: simp [div_eq_mul_inv]
state_before: α : Type u_1
inst✝ : DivisionRing α
x✝³ x✝² : α
x✝¹ : ℤ
x✝ : ℕ
h : IsRat (x✝³ * x✝²⁻¹) x✝¹ x✝
⊢ IsRat (x✝³ / x✝²) x✝¹ x✝

tactic: exact h
state_before: α : Type u_1
inst✝ : DivisionRing α
x✝³ x✝² : α
x✝¹ : ℤ
x✝ : ℕ
h : IsRat (x✝³ * x✝²⁻¹) x✝¹ x✝
⊢ IsRat (x✝³ * x✝²⁻¹) x✝¹ x✝