1337xyz1337xyz/leandojo-benchmark4-v10 huggingface dataset:
Theorem: Continuous.map_eq_borel
File: Mathlib/MeasureTheory/Constructions/Polish.lean

tactic: borelize Y
state_before: α : Type u_1
ι : Type u_2
X : Type u_3
Y : Type u_4
inst✝⁶ : TopologicalSpace X
inst✝⁵ : PolishSpace X
inst✝⁴ : MeasurableSpace X
inst✝³ : BorelSpace X
inst✝² : TopologicalSpace Y
inst✝¹ : T0Space Y
inst✝ : SecondCountableTopology Y
f : X → Y
hf : Continuous f
hsurj : Surjective f
⊢ MeasurableSpace.map f inst✝⁴ = borel Y
state_after: α : Type u_1
ι : Type u_2
X : Type u_3
Y : Type u_4
inst✝⁶ : TopologicalSpace X
inst✝⁵ : PolishSpace X
inst✝⁴ : MeasurableSpace X
inst✝³ : BorelSpace X
inst✝² : TopologicalSpace Y
inst✝¹ : T0Space Y
inst✝ : SecondCountableTopology Y
f : X → Y
hf : Continuous f
hsurj : Surjective f
this✝¹ : MeasurableSpace Y := borel Y
this✝ : BorelSpace Y
⊢ MeasurableSpace.map f inst✝⁴ = borel Y

tactic: exact hf.measurable.map_measurableSpace_eq hsurj
state_before: α : Type u_1
ι : Type u_2
X : Type u_3
Y : Type u_4
inst✝⁶ : TopologicalSpace X
inst✝⁵ : PolishSpace X
inst✝⁴ : MeasurableSpace X
inst✝³ : BorelSpace X
inst✝² : TopologicalSpace Y
inst✝¹ : T0Space Y
inst✝ : SecondCountableTopology Y
f : X → Y
hf : Continuous f
hsurj : Surjective f
this✝¹ : MeasurableSpace Y := borel Y
this✝ : BorelSpace Y
⊢ MeasurableSpace.map f inst✝⁴ = borel Y
state_after: no goals
Theorem: Stirling.stirlingSeq_zero
File: Mathlib/Analysis/SpecialFunctions/Stirling.lean

tactic: rw [stirlingSeq, cast_zero, mul_zero, Real.sqrt_zero, zero_mul, div_zero]
state_before: ⊢ stirlingSeq 0 = 0
state_after: no goals
Theorem: forall_eq_apply_imp_iff'
File: Mathlib/Logic/Basic.lean

tactic: simp
state_before: α : Sort u_1
β : Sort u_2
p✝ q : α → Prop
f : α → β
p : β → Prop
⊢ (∀ (a : α) (b : β), b = f a → p b) ↔ ∀ (a : α), p (f a)
state_after: no goals
Theorem: multipliable_iff_of_multipliable_div
File: Mathlib/Topology/Algebra/InfiniteSum/Group.lean

tactic: simpa only [inv_div] using hfg.inv
state_before: α : Type u_1
β : Type u_2
γ : Type u_3
δ : Type u_4
inst✝² : CommGroup α
inst✝¹ : TopologicalSpace α
inst✝ : TopologicalGroup α
f g : β → α
a a₁ a₂ : α
hfg : Multipliable fun b => f b / g b
hf : Multipliable f
⊢ Multipliable fun b => g b / f b
state_after: no goals
Theorem: Polynomial.degree_mul_C
File: Mathlib/Algebra/Polynomial/Degree/Lemmas.lean

tactic: rw [degree_mul, degree_C a0, add_zero]
state_before: R : Type u
S : Type v
ι : Type w
a✝ b : R
m n : ℕ
inst✝¹ : Semiring R
inst✝ : NoZeroDivisors R
p q : R[X]
a : R
a0 : a ≠ 0
⊢ (p * C a).degree = p.degree
state_after: no goals
Theorem: Nat.one_div_pos_of_nat
File: Mathlib/Data/Nat/Cast/Field.lean

tactic: rw [one_div]
state_before: α : Type u_1
inst✝ : LinearOrderedSemifield α
n : ℕ
⊢ 0 < 1 / (↑n + 1)
state_after: α : Type u_1
inst✝ : LinearOrderedSemifield α
n : ℕ
⊢ 0 < (↑n + 1)⁻¹

tactic: exact inv_pos_of_nat
state_before: α : Type u_1
inst✝ : LinearOrderedSemifield α
n : ℕ
⊢ 0 < (↑n + 1)⁻¹
state_after: no goals
Theorem: InnerProductGeometry.angle_sub_pos_of_inner_eq_zero
File: Mathlib/Geometry/Euclidean/Angle/Unoriented/RightAngle.lean

tactic: rw [← neg_eq_zero, ← inner_neg_right] at h
state_before: V : Type u_1
inst✝¹ : NormedAddCommGroup V
inst✝ : InnerProductSpace ℝ V
x y : V
h : ⟪x, y⟫_ℝ = 0
h0 : x = 0 ∨ y ≠ 0
⊢ 0 < angle x (x - y)
state_after: V : Type u_1
inst✝¹ : NormedAddCommGroup V
inst✝ : InnerProductSpace ℝ V
x y : V
h : ⟪x, -y⟫_ℝ = 0
h0 : x = 0 ∨ y ≠ 0
⊢ 0 < angle x (x - y)

tactic: rw [← neg_ne_zero] at h0
state_before: V : Type u_1
inst✝¹ : NormedAddCommGroup V
inst✝ : InnerProductSpace ℝ V
x y : V
h : ⟪x, -y⟫_ℝ = 0
h0 : x = 0 ∨ y ≠ 0
⊢ 0 < angle x (x - y)
state_after: V : Type u_1
inst✝¹ : NormedAddCommGroup V
inst✝ : InnerProductSpace ℝ V
x y : V
h : ⟪x, -y⟫_ℝ = 0
h0 : x = 0 ∨ -y ≠ 0
⊢ 0 < angle x (x - y)

tactic: rw [sub_eq_add_neg]
state_before: V : Type u_1
inst✝¹ : NormedAddCommGroup V
inst✝ : InnerProductSpace ℝ V
x y : V
h : ⟪x, -y⟫_ℝ = 0
h0 : x = 0 ∨ -y ≠ 0
⊢ 0 < angle x (x - y)
state_after: V : Type u_1
inst✝¹ : NormedAddCommGroup V
inst✝ : InnerProductSpace ℝ V
x y : V
h : ⟪x, -y⟫_ℝ = 0
h0 : x = 0 ∨ -y ≠ 0
⊢ 0 < angle x (x + -y)

tactic: exact angle_add_pos_of_inner_eq_zero h h0
state_before: V : Type u_1
inst✝¹ : NormedAddCommGroup V
inst✝ : InnerProductSpace ℝ V
x y : V
h : ⟪x, -y⟫_ℝ = 0
h0 : x = 0 ∨ -y ≠ 0
⊢ 0 < angle x (x + -y)
state_after: no goals
Theorem: Mathlib.Tactic.Ring.pow_zero
File: Mathlib/Tactic/Ring/Basic.lean

tactic: simp
state_before: u : Lean.Level
R : Type u_1
α : Q(Type u)
sα : Q(CommSemiring «$α»)
inst✝ : CommSemiring R
a : R
⊢ a ^ 0 = Nat.rawCast 1 + 0
state_after: no goals
Theorem: Nat.doubleFactorial_add_one
File: Mathlib/Data/Nat/Factorial/DoubleFactorial.lean

tactic: cases n <;> rfl
state_before: n : ℕ
⊢ (n + 1)‼ = (n + 1) * (n - 1)‼
state_after: no goals
Theorem: CategoryTheory.IsHomLift.comp_lift_id_right'
File: Mathlib/CategoryTheory/FiberedCategory/HomLift.lean

tactic: obtain rfl : S = T := by rw [← codomain_eq p f φ, domain_eq p (𝟙 T) ψ]
state_before: 𝒮 : Type u₁
𝒳 : Type u₂
inst✝³ : Category.{v₁, u₂} 𝒳
inst✝² : Category.{v₂, u₁} 𝒮
p : 𝒳 ⥤ 𝒮
R S : 𝒮
a b c : 𝒳
f : R ⟶ S
φ : a ⟶ b
inst✝¹ : p.IsHomLift f φ
T : 𝒮
ψ : b ⟶ c
inst✝ : p.IsHomLift (𝟙 T) ψ
⊢ p.IsHomLift f (φ ≫ ψ)
state_after: 𝒮 : Type u₁
𝒳 : Type u₂
inst✝³ : Category.{v₁, u₂} 𝒳
inst✝² : Category.{v₂, u₁} 𝒮
p : 𝒳 ⥤ 𝒮
R S : 𝒮
a b c : 𝒳
f : R ⟶ S
φ : a ⟶ b
inst✝¹ : p.IsHomLift f φ
ψ : b ⟶ c
inst✝ : p.IsHomLift (𝟙 S) ψ
⊢ p.IsHomLift f (φ ≫ ψ)

tactic: infer_instance
state_before: 𝒮 : Type u₁
𝒳 : Type u₂
inst✝³ : Category.{v₁, u₂} 𝒳
inst✝² : Category.{v₂, u₁} 𝒮
p : 𝒳 ⥤ 𝒮
R S : 𝒮
a b c : 𝒳
f : R ⟶ S
φ : a ⟶ b
inst✝¹ : p.IsHomLift f φ
ψ : b ⟶ c
inst✝ : p.IsHomLift (𝟙 S) ψ
⊢ p.IsHomLift f (φ ≫ ψ)
state_after: no goals

tactic: rw [← codomain_eq p f φ, domain_eq p (𝟙 T) ψ]
state_before: 𝒮 : Type u₁
𝒳 : Type u₂
inst✝³ : Category.{v₁, u₂} 𝒳
inst✝² : Category.{v₂, u₁} 𝒮
p : 𝒳 ⥤ 𝒮
R S : 𝒮
a b c : 𝒳
f : R ⟶ S
φ : a ⟶ b
inst✝¹ : p.IsHomLift f φ
T : 𝒮
ψ : b ⟶ c
inst✝ : p.IsHomLift (𝟙 T) ψ
⊢ S = T
state_after: no goals
Theorem: AlgebraicTopology.DoldKan.map_PInfty_f
File: Mathlib/AlgebraicTopology/DoldKan/PInfty.lean

tactic: simp only [PInfty_f, map_P]
state_before: C : Type u_1
inst✝⁴ : Category.{u_4, u_1} C
inst✝³ : Preadditive C
X✝ : SimplicialObject C
D : Type u_2
inst✝² : Category.{u_3, u_2} D
inst✝¹ : Preadditive D
G : C ⥤ D
inst✝ : G.Additive
X : SimplicialObject C
n : ℕ
⊢ PInfty.f n = G.map (PInfty.f n)
state_after: no goals
Theorem: LieSubmodule.iInf_coe_toSubmodule
File: Mathlib/Algebra/Lie/Submodule.lean

tactic: rw [iInf, sInf_coe_toSubmodule]
state_before: R : Type u
L : Type v
M : Type w
inst✝⁶ : CommRing R
inst✝⁵ : LieRing L
inst✝⁴ : LieAlgebra R L
inst✝³ : AddCommGroup M
inst✝² : Module R M
inst✝¹ : LieRingModule L M
inst✝ : LieModule R L M
N N' : LieSubmodule R L M
I J : LieIdeal R L
ι : Sort u_1
p : ι → LieSubmodule R L M
⊢ ↑(⨅ i, p i) = ⨅ i, ↑(p i)
state_after: R : Type u
L : Type v
M : Type w
inst✝⁶ : CommRing R
inst✝⁵ : LieRing L
inst✝⁴ : LieAlgebra R L
inst✝³ : AddCommGroup M
inst✝² : Module R M
inst✝¹ : LieRingModule L M
inst✝ : LieModule R L M
N N' : LieSubmodule R L M
I J : LieIdeal R L
ι : Sort u_1
p : ι → LieSubmodule R L M
⊢ sInf {x | ∃ s ∈ range fun i => p i, ↑s = x} = ⨅ i, ↑(p i)

tactic: ext
state_before: R : Type u
L : Type v
M : Type w
inst✝⁶ : CommRing R
inst✝⁵ : LieRing L
inst✝⁴ : LieAlgebra R L
inst✝³ : AddCommGroup M
inst✝² : Module R M
inst✝¹ : LieRingModule L M
inst✝ : LieModule R L M
N N' : LieSubmodule R L M
I J : LieIdeal R L
ι : Sort u_1
p : ι → LieSubmodule R L M
⊢ sInf {x | ∃ s ∈ range fun i => p i, ↑s = x} = ⨅ i, ↑(p i)
state_after: case h
R : Type u
L : Type v
M : Type w
inst✝⁶ : CommRing R
inst✝⁵ : LieRing L
inst✝⁴ : LieAlgebra R L
inst✝³ : AddCommGroup M
inst✝² : Module R M
inst✝¹ : LieRingModule L M
inst✝ : LieModule R L M
N N' : LieSubmodule R L M
I J : LieIdeal R L
ι : Sort u_1
p : ι → LieSubmodule R L M
x✝ : M
⊢ x✝ ∈ sInf {x | ∃ s ∈ range fun i => p i, ↑s = x} ↔ x✝ ∈ ⨅ i, ↑(p i)

tactic: simp
state_before: case h
R : Type u
L : Type v
M : Type w
inst✝⁶ : CommRing R
inst✝⁵ : LieRing L
inst✝⁴ : LieAlgebra R L
inst✝³ : AddCommGroup M
inst✝² : Module R M
inst✝¹ : LieRingModule L M
inst✝ : LieModule R L M
N N' : LieSubmodule R L M
I J : LieIdeal R L
ι : Sort u_1
p : ι → LieSubmodule R L M
x✝ : M
⊢ x✝ ∈ sInf {x | ∃ s ∈ range fun i => p i, ↑s = x} ↔ x✝ ∈ ⨅ i, ↑(p i)
state_after: no goals
Theorem: UpperHalfPlane.dist_eq_iff_eq_sinh
File: Mathlib/Analysis/Complex/UpperHalfPlane/Metric.lean

tactic: rw [← div_left_inj' (two_ne_zero' ℝ), ← sinh_inj, sinh_half_dist]
state_before: z w : ℍ
r R : ℝ
⊢ dist z w = r ↔ dist ↑z ↑w / (2 * √(z.im * w.im)) = sinh (r / 2)
state_after: no goals
Theorem: PowerSeries.coeff_zero_X
File: Mathlib/RingTheory/PowerSeries/Basic.lean

tactic: erw [coeff, Finsupp.single_zero, X, MvPowerSeries.coeff_zero_X]
state_before: R : Type u_1
inst✝ : Semiring R
⊢ (coeff R 0) X = 0
state_after: no goals
Theorem: Subalgebra.toNonUnitalSubalgebra_toSubalgebra
File: Mathlib/Algebra/Algebra/Subalgebra/Unitization.lean

tactic: cases S
state_before: R : Type u_1
A : Type u_2
inst✝² : CommSemiring R
inst✝¹ : Semiring A
inst✝ : Algebra R A
S : Subalgebra R A
⊢ S.toNonUnitalSubalgebra.toSubalgebra ⋯ = S
state_after: case mk
R : Type u_1
A : Type u_2
inst✝² : CommSemiring R
inst✝¹ : Semiring A
inst✝ : Algebra R A
toSubsemiring✝ : Subsemiring A
algebraMap_mem'✝ : ∀ (r : R), (algebraMap R A) r ∈ toSubsemiring✝.carrier
⊢ { toSubsemiring := toSubsemiring✝, algebraMap_mem' := algebraMap_mem'✝ }.toNonUnitalSubalgebra.toSubalgebra ⋯ =
    { toSubsemiring := toSubsemiring✝, algebraMap_mem' := algebraMap_mem'✝ }

tactic: rfl
state_before: case mk
R : Type u_1
A : Type u_2
inst✝² : CommSemiring R
inst✝¹ : Semiring A
inst✝ : Algebra R A
toSubsemiring✝ : Subsemiring A
algebraMap_mem'✝ : ∀ (r : R), (algebraMap R A) r ∈ toSubsemiring✝.carrier
⊢ { toSubsemiring := toSubsemiring✝, algebraMap_mem' := algebraMap_mem'✝ }.toNonUnitalSubalgebra.toSubalgebra ⋯ =
    { toSubsemiring := toSubsemiring✝, algebraMap_mem' := algebraMap_mem'✝ }
state_after: no goals
Theorem: ZMod.card
File: Mathlib/Data/ZMod/Defs.lean

tactic: cases n with
| zero => exact (not_finite (ZMod 0)).elim
| succ n => convert Fintype.card_fin (n + 1) using 2
state_before: n : ℕ
inst✝ : Fintype (ZMod n)
⊢ Fintype.card (ZMod n) = n
state_after: no goals

tactic: exact (not_finite (ZMod 0)).elim
state_before: case zero
inst✝ : Fintype (ZMod 0)
⊢ Fintype.card (ZMod 0) = 0
state_after: no goals

tactic: convert Fintype.card_fin (n + 1) using 2
state_before: case succ
n : ℕ
inst✝ : Fintype (ZMod (n + 1))
⊢ Fintype.card (ZMod (n + 1)) = n + 1
state_after: no goals
Theorem: circleIntegral.integral_sub
File: Mathlib/MeasureTheory/Integral/CircleIntegral.lean

tactic: simp only [circleIntegral, smul_sub, intervalIntegral.integral_sub hf.out hg.out]
state_before: E : Type u_1
inst✝² : NormedAddCommGroup E
inst✝¹ : NormedSpace ℂ E
inst✝ : CompleteSpace E
f g : ℂ → E
c : ℂ
R : ℝ
hf : CircleIntegrable f c R
hg : CircleIntegrable g c R
⊢ (∮ (z : ℂ) in C(c, R), f z - g z) = (∮ (z : ℂ) in C(c, R), f z) - ∮ (z : ℂ) in C(c, R), g z
state_after: no goals
Theorem: left_mem_segment
File: Mathlib/Analysis/Convex/Segment.lean

tactic: rw [zero_smul, one_smul, add_zero]
state_before: 𝕜 : Type u_1
E : Type u_2
F : Type u_3
G : Type u_4
ι : Type u_5
π : ι → Type u_6
inst✝² : OrderedSemiring 𝕜
inst✝¹ : AddCommMonoid E
inst✝ : MulActionWithZero 𝕜 E
x y : E
⊢ 1 • x + 0 • y = x
state_after: no goals
Theorem: CategoryTheory.Preadditive.isSeparating_iff
File: Mathlib/CategoryTheory/Preadditive/Generator.lean

tactic: simpa only [Limits.comp_zero] using hf
state_before: C : Type u
inst✝¹ : Category.{v, u} C
inst✝ : Preadditive C
𝒢 : Set C
h𝒢 : IsSeparating 𝒢
X Y : C
f : X ⟶ Y
hf : ∀ G ∈ 𝒢, ∀ (h : G ⟶ X), h ≫ f = 0
⊢ ∀ G ∈ 𝒢, ∀ (h : G ⟶ X), h ≫ f = h ≫ 0
state_after: no goals

tactic: simpa only [Preadditive.comp_sub, sub_eq_zero] using hfg
state_before: C : Type u
inst✝¹ : Category.{v, u} C
inst✝ : Preadditive C
𝒢 : Set C
h𝒢 : ∀ ⦃X Y : C⦄ (f : X ⟶ Y), (∀ G ∈ 𝒢, ∀ (h : G ⟶ X), h ≫ f = 0) → f = 0
X Y : C
f g : X ⟶ Y
hfg : ∀ G ∈ 𝒢, ∀ (h : G ⟶ X), h ≫ f = h ≫ g
⊢ ∀ G ∈ 𝒢, ∀ (h : G ⟶ X), h ≫ (f - g) = 0
state_after: no goals
Theorem: MeasureTheory.IsStoppingTime.max
File: Mathlib/Probability/Process/Stopping.lean

tactic: intro i
state_before: Ω : Type u_1
β : Type u_2
ι : Type u_3
m : MeasurableSpace Ω
inst✝ : LinearOrder ι
f : Filtration ι m
τ π : Ω → ι
hτ : IsStoppingTime f τ
hπ : IsStoppingTime f π
⊢ IsStoppingTime f fun ω => max (τ ω) (π ω)
state_after: Ω : Type u_1
β : Type u_2
ι : Type u_3
m : MeasurableSpace Ω
inst✝ : LinearOrder ι
f : Filtration ι m
τ π : Ω → ι
hτ : IsStoppingTime f τ
hπ : IsStoppingTime f π
i : ι
⊢ MeasurableSet {ω | (fun ω => max (τ ω) (π ω)) ω ≤ i}

tactic: simp_rw [max_le_iff, Set.setOf_and]
state_before: Ω : Type u_1
β : Type u_2
ι : Type u_3
m : MeasurableSpace Ω
inst✝ : LinearOrder ι
f : Filtration ι m
τ π : Ω → ι
hτ : IsStoppingTime f τ
hπ : IsStoppingTime f π
i : ι
⊢ MeasurableSet {ω | (fun ω => max (τ ω) (π ω)) ω ≤ i}
state_after: Ω : Type u_1
β : Type u_2
ι : Type u_3
m : MeasurableSpace Ω
inst✝ : LinearOrder ι
f : Filtration ι m
τ π : Ω → ι
hτ : IsStoppingTime f τ
hπ : IsStoppingTime f π
i : ι
⊢ MeasurableSet ({a | τ a ≤ i} ∩ {a | π a ≤ i})

tactic: exact (hτ i).inter (hπ i)
state_before: Ω : Type u_1
β : Type u_2
ι : Type u_3
m : MeasurableSpace Ω
inst✝ : LinearOrder ι
f : Filtration ι m
τ π : Ω → ι
hτ : IsStoppingTime f τ
hπ : IsStoppingTime f π
i : ι
⊢ MeasurableSet ({a | τ a ≤ i} ∩ {a | π a ≤ i})
state_after: no goals
Theorem: Relation.TransGen.trans_left
File: Mathlib/Logic/Relation.lean

tactic: induction hbc with
| refl => assumption
| tail _ hcd hac => exact hac.tail hcd
state_before: α : Type u_1
β : Type u_2
γ : Type u_3
δ : Type u_4
ε : Type u_5
ζ : Type u_6
r : α → α → Prop
a b c d : α
hab : TransGen r a b
hbc : ReflTransGen r b c
⊢ TransGen r a c
state_after: no goals

tactic: assumption
state_before: case refl
α : Type u_1
β : Type u_2
γ : Type u_3
δ : Type u_4
ε : Type u_5
ζ : Type u_6
r : α → α → Prop
a b c d : α
hab : TransGen r a b
⊢ TransGen r a b
state_after: no goals

tactic: exact hac.tail hcd
state_before: case tail
α : Type u_1
β : Type u_2
γ : Type u_3
δ : Type u_4
ε : Type u_5
ζ : Type u_6
r : α → α → Prop
a b c d : α
hab : TransGen r a b
b✝ c✝ : α
a✝ : ReflTransGen r b b✝
hcd : r b✝ c✝
hac : TransGen r a b✝
⊢ TransGen r a c✝
state_after: no goals
Theorem: Filter.tendsto_add_atTop_iff_nat
File: Mathlib/Order/Filter/AtTopBot.lean

tactic: rw [← tendsto_map'_iff, map_add_atTop_eq_nat]
state_before: ι : Type u_1
ι' : Type u_2
α : Type u_3
β : Type u_4
γ : Type u_5
f : ℕ → α
l : Filter α
k : ℕ
⊢ Tendsto (f ∘ fun n => n + k) atTop l ↔ Tendsto f atTop l
state_after: no goals
Theorem: Function.Semiconj.trans
File: Mathlib/Logic/Function/Conjugate.lean

tactic: simp only [comp_apply, hab.eq, hbc.eq]
state_before: α : Type u_1
β : Type u_2
γ : Type u_3
f fab : α → β
fbc : β → γ
ga ga' : α → α
gb gb' : β → β
gc gc' : γ → γ
hab : Semiconj fab ga gb
hbc : Semiconj fbc gb gc
x : α
⊢ (fbc ∘ fab) (ga x) = gc ((fbc ∘ fab) x)
state_after: no goals
Theorem: Ordinal.lt_bsup
File: Mathlib/SetTheory/Ordinal/Arithmetic.lean

tactic: simpa only [not_forall, not_le] using not_congr (@bsup_le_iff.{_, v} _ f a)
state_before: α : Type u_1
β : Type u_2
γ : Type u_3
r : α → α → Prop
s : β → β → Prop
t : γ → γ → Prop
o : Ordinal.{u}
f : (a : Ordinal.{u}) → a < o → Ordinal.{max u v}
a : Ordinal.{max u v}
⊢ a < o.bsup f ↔ ∃ i, ∃ (hi : i < o), a < f i hi
state_after: no goals
Theorem: Matrix.mulVec_add
File: Mathlib/Data/Matrix/Basic.lean

tactic: ext
state_before: l : Type u_1
m : Type u_2
n : Type u_3
o : Type u_4
m' : o → Type u_5
n' : o → Type u_6
R : Type u_7
S : Type u_8
α : Type v
β : Type w
γ : Type u_9
inst✝¹ : NonUnitalNonAssocSemiring α
inst✝ : Fintype n
A : Matrix m n α
x y : n → α
⊢ A *ᵥ (x + y) = A *ᵥ x + A *ᵥ y
state_after: case h
l : Type u_1
m : Type u_2
n : Type u_3
o : Type u_4
m' : o → Type u_5
n' : o → Type u_6
R : Type u_7
S : Type u_8
α : Type v
β : Type w
γ : Type u_9
inst✝¹ : NonUnitalNonAssocSemiring α
inst✝ : Fintype n
A : Matrix m n α
x y : n → α
x✝ : m
⊢ (A *ᵥ (x + y)) x✝ = (A *ᵥ x + A *ᵥ y) x✝

tactic: apply dotProduct_add
state_before: case h
l : Type u_1
m : Type u_2
n : Type u_3
o : Type u_4
m' : o → Type u_5
n' : o → Type u_6
R : Type u_7
S : Type u_8
α : Type v
β : Type w
γ : Type u_9
inst✝¹ : NonUnitalNonAssocSemiring α
inst✝ : Fintype n
A : Matrix m n α
x y : n → α
x✝ : m
⊢ (A *ᵥ (x + y)) x✝ = (A *ᵥ x + A *ᵥ y) x✝
state_after: no goals
Theorem: CategoryTheory.ShortComplex.Exact.op
File: Mathlib/Algebra/Homology/ShortComplex/Exact.lean

tactic: obtain ⟨h, z⟩ := h
state_before: C : Type u_1
D : Type u_2
inst✝³ : Category.{u_3, u_1} C
inst✝² : Category.{?u.19424, u_2} D
inst✝¹ : HasZeroMorphisms C
inst✝ : HasZeroMorphisms D
S S₁ S₂ : ShortComplex C
h : S.Exact
⊢ S.op.Exact
state_after: case mk.intro
C : Type u_1
D : Type u_2
inst✝³ : Category.{u_3, u_1} C
inst✝² : Category.{?u.19424, u_2} D
inst✝¹ : HasZeroMorphisms C
inst✝ : HasZeroMorphisms D
S S₁ S₂ : ShortComplex C
h : S.HomologyData
z : IsZero h.left.H
⊢ S.op.Exact

tactic: exact ⟨⟨h.op, (IsZero.of_iso z h.iso.symm).op⟩⟩
state_before: case mk.intro
C : Type u_1
D : Type u_2
inst✝³ : Category.{u_3, u_1} C
inst✝² : Category.{?u.19424, u_2} D
inst✝¹ : HasZeroMorphisms C
inst✝ : HasZeroMorphisms D
S S₁ S₂ : ShortComplex C
h : S.HomologyData
z : IsZero h.left.H
⊢ S.op.Exact
state_after: no goals
Theorem: DFinsupp.update_eq_single_add_erase
File: Mathlib/Data/DFinsupp/Basic.lean

tactic: ext j
state_before: ι : Type u
γ : Type w
β✝ : ι → Type v
β₁ : ι → Type v₁
β₂ : ι → Type v₂
inst✝² : DecidableEq ι
inst✝¹ : (i : ι) → Zero (β✝ i)
s : Finset ι
x : (i : ↑↑s) → β✝ ↑i
i✝ : ι
f✝ : Π₀ (i : ι), β✝ i
b✝ : β✝ i✝
j : ι
β : ι → Type u_1
inst✝ : (i : ι) → AddZeroClass (β i)
f : Π₀ (i : ι), β i
i : ι
b : β i
⊢ update i f b = single i b + erase i f
state_after: case h
ι : Type u
γ : Type w
β✝ : ι → Type v
β₁ : ι → Type v₁
β₂ : ι → Type v₂
inst✝² : DecidableEq ι
inst✝¹ : (i : ι) → Zero (β✝ i)
s : Finset ι
x : (i : ↑↑s) → β✝ ↑i
i✝ : ι
f✝ : Π₀ (i : ι), β✝ i
b✝ : β✝ i✝
j✝ : ι
β : ι → Type u_1
inst✝ : (i : ι) → AddZeroClass (β i)
f : Π₀ (i : ι), β i
i : ι
b : β i
j : ι
⊢ (update i f b) j = (single i b + erase i f) j

tactic: rcases eq_or_ne i j with (rfl | h)
state_before: case h
ι : Type u
γ : Type w
β✝ : ι → Type v
β₁ : ι → Type v₁
β₂ : ι → Type v₂
inst✝² : DecidableEq ι
inst✝¹ : (i : ι) → Zero (β✝ i)
s : Finset ι
x : (i : ↑↑s) → β✝ ↑i
i✝ : ι
f✝ : Π₀ (i : ι), β✝ i
b✝ : β✝ i✝
j✝ : ι
β : ι → Type u_1
inst✝ : (i : ι) → AddZeroClass (β i)
f : Π₀ (i : ι), β i
i : ι
b : β i
j : ι
⊢ (update i f b) j = (single i b + erase i f) j
state_after: case h.inl
ι : Type u
γ : Type w
β✝ : ι → Type v
β₁ : ι → Type v₁
β₂ : ι → Type v₂
inst✝² : DecidableEq ι
inst✝¹ : (i : ι) → Zero (β✝ i)
s : Finset ι
x : (i : ↑↑s) → β✝ ↑i
i✝ : ι
f✝ : Π₀ (i : ι), β✝ i
b✝ : β✝ i✝
j : ι
β : ι → Type u_1
inst✝ : (i : ι) → AddZeroClass (β i)
f : Π₀ (i : ι), β i
i : ι
b : β i
⊢ (update i f b) i = (single i b + erase i f) i

case h.inr
ι : Type u
γ : Type w
β✝ : ι → Type v
β₁ : ι → Type v₁
β₂ : ι → Type v₂
inst✝² : DecidableEq ι
inst✝¹ : (i : ι) → Zero (β✝ i)
s : Finset ι
x : (i : ↑↑s) → β✝ ↑i
i✝ : ι
f✝ : Π₀ (i : ι), β✝ i
b✝ : β✝ i✝
j✝ : ι
β : ι → Type u_1
inst✝ : (i : ι) → AddZeroClass (β i)
f : Π₀ (i : ι), β i
i : ι
b : β i
j : ι
h : i ≠ j
⊢ (update i f b) j = (single i b + erase i f) j

tactic: simp
state_before: case h.inl
ι : Type u
γ : Type w
β✝ : ι → Type v
β₁ : ι → Type v₁
β₂ : ι → Type v₂
inst✝² : DecidableEq ι
inst✝¹ : (i : ι) → Zero (β✝ i)
s : Finset ι
x : (i : ↑↑s) → β✝ ↑i
i✝ : ι
f✝ : Π₀ (i : ι), β✝ i
b✝ : β✝ i✝
j : ι
β : ι → Type u_1
inst✝ : (i : ι) → AddZeroClass (β i)
f : Π₀ (i : ι), β i
i : ι
b : β i
⊢ (update i f b) i = (single i b + erase i f) i
state_after: no goals

tactic: simp [Function.update_noteq h.symm, h, erase_ne, h.symm]
state_before: case h.inr
ι : Type u
γ : Type w
β✝ : ι → Type v
β₁ : ι → Type v₁
β₂ : ι → Type v₂
inst✝² : DecidableEq ι
inst✝¹ : (i : ι) → Zero (β✝ i)
s : Finset ι
x : (i : ↑↑s) → β✝ ↑i
i✝ : ι
f✝ : Π₀ (i : ι), β✝ i
b✝ : β✝ i✝
j✝ : ι
β : ι → Type u_1
inst✝ : (i : ι) → AddZeroClass (β i)
f : Π₀ (i : ι), β i
i : ι
b : β i
j : ι
h : i ≠ j
⊢ (update i f b) j = (single i b + erase i f) j
state_after: no goals
Theorem: Odd.zpow_neg_iff
File: Mathlib/Algebra/Order/Field/Power.lean

tactic: obtain ⟨k, rfl⟩ := hn
state_before: α : Type u_1
inst✝ : LinearOrderedField α
a b c d : α
n : ℤ
hn : Odd n
ha : a < 0
⊢ a ^ n < 0
state_after: case intro
α : Type u_1
inst✝ : LinearOrderedField α
a b c d : α
ha : a < 0
k : ℤ
⊢ a ^ (2 * k + 1) < 0

tactic: rw [zpow_add_one₀ ha.ne]
state_before: case intro
α : Type u_1
inst✝ : LinearOrderedField α
a b c d : α
ha : a < 0
k : ℤ
⊢ a ^ (2 * k + 1) < 0
state_after: case intro
α : Type u_1
inst✝ : LinearOrderedField α
a b c d : α
ha : a < 0
k : ℤ
⊢ a ^ (2 * k) * a < 0

tactic: exact mul_neg_of_pos_of_neg (Even.zpow_pos (even_two_mul _) ha.ne) ha
state_before: case intro
α : Type u_1
inst✝ : LinearOrderedField α
a b c d : α
ha : a < 0
k : ℤ
⊢ a ^ (2 * k) * a < 0
state_after: no goals
Theorem: iteratedDeriv_one
File: Mathlib/Analysis/Calculus/IteratedDeriv/Defs.lean

tactic: ext x
state_before: 𝕜 : Type u_1
inst✝⁴ : NontriviallyNormedField 𝕜
F : Type u_2
inst✝³ : NormedAddCommGroup F
inst✝² : NormedSpace 𝕜 F
E : Type u_3
inst✝¹ : NormedAddCommGroup E
inst✝ : NormedSpace 𝕜 E
n : ℕ
f : 𝕜 → F
s : Set 𝕜
x : 𝕜
⊢ iteratedDeriv 1 f = deriv f
state_after: case h
𝕜 : Type u_1
inst✝⁴ : NontriviallyNormedField 𝕜
F : Type u_2
inst✝³ : NormedAddCommGroup F
inst✝² : NormedSpace 𝕜 F
E : Type u_3
inst✝¹ : NormedAddCommGroup E
inst✝ : NormedSpace 𝕜 E
n : ℕ
f : 𝕜 → F
s : Set 𝕜
x✝ x : 𝕜
⊢ iteratedDeriv 1 f x = deriv f x

tactic: simp [iteratedDeriv]
state_before: case h
𝕜 : Type u_1
inst✝⁴ : NontriviallyNormedField 𝕜
F : Type u_2
inst✝³ : NormedAddCommGroup F
inst✝² : NormedSpace 𝕜 F
E : Type u_3
inst✝¹ : NormedAddCommGroup E
inst✝ : NormedSpace 𝕜 E
n : ℕ
f : 𝕜 → F
s : Set 𝕜
x✝ x : 𝕜
⊢ iteratedDeriv 1 f x = deriv f x
state_after: case h
𝕜 : Type u_1
inst✝⁴ : NontriviallyNormedField 𝕜
F : Type u_2
inst✝³ : NormedAddCommGroup F
inst✝² : NormedSpace 𝕜 F
E : Type u_3
inst✝¹ : NormedAddCommGroup E
inst✝ : NormedSpace 𝕜 E
n : ℕ
f : 𝕜 → F
s : Set 𝕜
x✝ x : 𝕜
⊢ (fderiv 𝕜 f x) 1 = deriv f x

tactic: rfl
state_before: case h
𝕜 : Type u_1
inst✝⁴ : NontriviallyNormedField 𝕜
F : Type u_2
inst✝³ : NormedAddCommGroup F
inst✝² : NormedSpace 𝕜 F
E : Type u_3
inst✝¹ : NormedAddCommGroup E
inst✝ : NormedSpace 𝕜 E
n : ℕ
f : 𝕜 → F
s : Set 𝕜
x✝ x : 𝕜
⊢ (fderiv 𝕜 f x) 1 = deriv f x
state_after: no goals
Theorem: Ordinal.nadd_nmul
File: Mathlib/SetTheory/Ordinal/NaturalOps.lean

tactic: rw [nmul_comm, nmul_nadd, nmul_comm, nmul_comm c]
state_before: a✝ b✝ c✝ d : Ordinal.{u}
a b c : Ordinal.{u_1}
⊢ (a ♯ b) ⨳ c = a ⨳ c ♯ b ⨳ c
state_after: no goals
Theorem: isRoot_of_unity_iff
File: Mathlib/RingTheory/Polynomial/Cyclotomic/Roots.lean

tactic: rw [← mem_nthRoots h, nthRoots, mem_roots <| X_pow_sub_C_ne_zero h _, C_1, ←
    prod_cyclotomic_eq_X_pow_sub_one h, isRoot_prod]
state_before: R✝ : Type u_1
inst✝³ : CommRing R✝
n : ℕ
inst✝² : IsDomain R✝
h : 0 < n
R : Type u_2
inst✝¹ : CommRing R
inst✝ : IsDomain R
ζ : R
⊢ ζ ^ n = 1 ↔ ∃ i ∈ n.divisors, (cyclotomic i R).IsRoot ζ
state_after: no goals