1337xyz1337xyz/leandojo-benchmark4-v10 huggingface dataset:
Theorem: IsLocalHomeomorphOn.comp
File: Mathlib/Topology/IsLocalHomeomorph.lean

tactic: intro x hx
state_before: X : Type u_1
Y : Type u_2
Z : Type u_3
inst✝² : TopologicalSpace X
inst✝¹ : TopologicalSpace Y
inst✝ : TopologicalSpace Z
g : Y → Z
f : X → Y
s : Set X
t : Set Y
hg : IsLocalHomeomorphOn g t
hf : IsLocalHomeomorphOn f s
h : Set.MapsTo f s t
⊢ IsLocalHomeomorphOn (g ∘ f) s
state_after: X : Type u_1
Y : Type u_2
Z : Type u_3
inst✝² : TopologicalSpace X
inst✝¹ : TopologicalSpace Y
inst✝ : TopologicalSpace Z
g : Y → Z
f : X → Y
s : Set X
t : Set Y
hg : IsLocalHomeomorphOn g t
hf : IsLocalHomeomorphOn f s
h : Set.MapsTo f s t
x : X
hx : x ∈ s
⊢ ∃ e, x ∈ e.source ∧ g ∘ f = ↑e

tactic: obtain ⟨eg, hxg, rfl⟩ := hg (f x) (h hx)
state_before: X : Type u_1
Y : Type u_2
Z : Type u_3
inst✝² : TopologicalSpace X
inst✝¹ : TopologicalSpace Y
inst✝ : TopologicalSpace Z
g : Y → Z
f : X → Y
s : Set X
t : Set Y
hg : IsLocalHomeomorphOn g t
hf : IsLocalHomeomorphOn f s
h : Set.MapsTo f s t
x : X
hx : x ∈ s
⊢ ∃ e, x ∈ e.source ∧ g ∘ f = ↑e
state_after: case intro.intro
X : Type u_1
Y : Type u_2
Z : Type u_3
inst✝² : TopologicalSpace X
inst✝¹ : TopologicalSpace Y
inst✝ : TopologicalSpace Z
f : X → Y
s : Set X
t : Set Y
hf : IsLocalHomeomorphOn f s
h : Set.MapsTo f s t
x : X
hx : x ∈ s
eg : PartialHomeomorph Y Z
hxg : f x ∈ eg.source
hg : IsLocalHomeomorphOn (↑eg) t
⊢ ∃ e, x ∈ e.source ∧ ↑eg ∘ f = ↑e

tactic: obtain ⟨ef, hxf, rfl⟩ := hf x hx
state_before: case intro.intro
X : Type u_1
Y : Type u_2
Z : Type u_3
inst✝² : TopologicalSpace X
inst✝¹ : TopologicalSpace Y
inst✝ : TopologicalSpace Z
f : X → Y
s : Set X
t : Set Y
hf : IsLocalHomeomorphOn f s
h : Set.MapsTo f s t
x : X
hx : x ∈ s
eg : PartialHomeomorph Y Z
hxg : f x ∈ eg.source
hg : IsLocalHomeomorphOn (↑eg) t
⊢ ∃ e, x ∈ e.source ∧ ↑eg ∘ f = ↑e
state_after: case intro.intro.intro.intro
X : Type u_1
Y : Type u_2
Z : Type u_3
inst✝² : TopologicalSpace X
inst✝¹ : TopologicalSpace Y
inst✝ : TopologicalSpace Z
s : Set X
t : Set Y
x : X
hx : x ∈ s
eg : PartialHomeomorph Y Z
hg : IsLocalHomeomorphOn (↑eg) t
ef : PartialHomeomorph X Y
hxf : x ∈ ef.source
hf : IsLocalHomeomorphOn (↑ef) s
h : Set.MapsTo (↑ef) s t
hxg : ↑ef x ∈ eg.source
⊢ ∃ e, x ∈ e.source ∧ ↑eg ∘ ↑ef = ↑e

tactic: exact ⟨ef.trans eg, ⟨hxf, hxg⟩, rfl⟩
state_before: case intro.intro.intro.intro
X : Type u_1
Y : Type u_2
Z : Type u_3
inst✝² : TopologicalSpace X
inst✝¹ : TopologicalSpace Y
inst✝ : TopologicalSpace Z
s : Set X
t : Set Y
x : X
hx : x ∈ s
eg : PartialHomeomorph Y Z
hg : IsLocalHomeomorphOn (↑eg) t
ef : PartialHomeomorph X Y
hxf : x ∈ ef.source
hf : IsLocalHomeomorphOn (↑ef) s
h : Set.MapsTo (↑ef) s t
hxg : ↑ef x ∈ eg.source
⊢ ∃ e, x ∈ e.source ∧ ↑eg ∘ ↑ef = ↑e
state_after: no goals
Theorem: ProperCone.map_id
File: Mathlib/Analysis/Convex/Cone/Proper.lean

tactic: simpa using IsClosed.closure_eq K.isClosed
state_before: E : Type u_1
inst✝⁵ : NormedAddCommGroup E
inst✝⁴ : InnerProductSpace ℝ E
F : Type u_2
inst✝³ : NormedAddCommGroup F
inst✝² : InnerProductSpace ℝ F
G : Type u_3
inst✝¹ : NormedAddCommGroup G
inst✝ : InnerProductSpace ℝ G
K : ProperCone ℝ E
⊢ ↑(map (ContinuousLinearMap.id ℝ E) K) = ↑K
state_after: no goals
Theorem: LinearMap.det_zero''
File: Mathlib/LinearAlgebra/FreeModule/Determinant.lean

tactic: letI : Nonempty (Module.Free.ChooseBasisIndex R M) := (Module.Free.chooseBasis R M).index_nonempty
state_before: R : Type u_1
M : Type u_2
inst✝⁵ : CommRing R
inst✝⁴ : AddCommGroup M
inst✝³ : Module R M
inst✝² : Module.Free R M
inst✝¹ : Module.Finite R M
inst✝ : Nontrivial M
⊢ LinearMap.det 0 = 0
state_after: R : Type u_1
M : Type u_2
inst✝⁵ : CommRing R
inst✝⁴ : AddCommGroup M
inst✝³ : Module R M
inst✝² : Module.Free R M
inst✝¹ : Module.Finite R M
inst✝ : Nontrivial M
this : Nonempty (Module.Free.ChooseBasisIndex R M) := Basis.index_nonempty (Module.Free.chooseBasis R M)
⊢ LinearMap.det 0 = 0

tactic: nontriviality R
state_before: R : Type u_1
M : Type u_2
inst✝⁵ : CommRing R
inst✝⁴ : AddCommGroup M
inst✝³ : Module R M
inst✝² : Module.Free R M
inst✝¹ : Module.Finite R M
inst✝ : Nontrivial M
this : Nonempty (Module.Free.ChooseBasisIndex R M) := Basis.index_nonempty (Module.Free.chooseBasis R M)
⊢ LinearMap.det 0 = 0
state_after: R : Type u_1
M : Type u_2
inst✝⁵ : CommRing R
inst✝⁴ : AddCommGroup M
inst✝³ : Module R M
inst✝² : Module.Free R M
inst✝¹ : Module.Finite R M
inst✝ : Nontrivial M
this : Nonempty (Module.Free.ChooseBasisIndex R M) := Basis.index_nonempty (Module.Free.chooseBasis R M)
a✝ : Nontrivial R
⊢ LinearMap.det 0 = 0

tactic: exact LinearMap.det_zero' (Module.Free.chooseBasis R M)
state_before: R : Type u_1
M : Type u_2
inst✝⁵ : CommRing R
inst✝⁴ : AddCommGroup M
inst✝³ : Module R M
inst✝² : Module.Free R M
inst✝¹ : Module.Finite R M
inst✝ : Nontrivial M
this : Nonempty (Module.Free.ChooseBasisIndex R M) := Basis.index_nonempty (Module.Free.chooseBasis R M)
a✝ : Nontrivial R
⊢ LinearMap.det 0 = 0
state_after: no goals
Theorem: IsometryEquiv.preimage_emetric_closedBall
File: Mathlib/Topology/MetricSpace/Isometry.lean

tactic: rw [← h.isometry.preimage_emetric_closedBall (h.symm x) r, h.apply_symm_apply]
state_before: ι : Type u_1
α : Type u
β : Type v
γ : Type w
inst✝² : PseudoEMetricSpace α
inst✝¹ : PseudoEMetricSpace β
inst✝ : PseudoEMetricSpace γ
h : α ≃ᵢ β
x : β
r : ℝ≥0∞
⊢ ⇑h ⁻¹' EMetric.closedBall x r = EMetric.closedBall (h.symm x) r
state_after: no goals
Theorem: Cardinal.ciSup_mul_ciSup
File: Mathlib/SetTheory/Cardinal/Ordinal.lean

tactic: simp_rw [Cardinal.ciSup_mul f, Cardinal.mul_ciSup g]
state_before: ι : Type u
ι' : Type w
f : ι → Cardinal.{v}
g : ι' → Cardinal.{v}
⊢ (⨆ i, f i) * ⨆ j, g j = ⨆ i, ⨆ j, f i * g j
state_after: no goals
Theorem: PartENat.card_le_one_iff_subsingleton
File: Mathlib/SetTheory/Cardinal/Finite.lean

tactic: rw [← le_one_iff_subsingleton]
state_before: α✝ : Type u_1
β : Type u_2
α : Type u_3
⊢ card α ≤ 1 ↔ Subsingleton α
state_after: α✝ : Type u_1
β : Type u_2
α : Type u_3
⊢ card α ≤ 1 ↔ #α ≤ 1

tactic: conv_rhs => rw [← Nat.cast_one]
state_before: α✝ : Type u_1
β : Type u_2
α : Type u_3
⊢ card α ≤ 1 ↔ #α ≤ 1
state_after: α✝ : Type u_1
β : Type u_2
α : Type u_3
⊢ card α ≤ 1 ↔ #α ≤ ↑1

tactic: rw [← Cardinal.toPartENat_le_natCast_iff]
state_before: α✝ : Type u_1
β : Type u_2
α : Type u_3
⊢ card α ≤ 1 ↔ #α ≤ ↑1
state_after: α✝ : Type u_1
β : Type u_2
α : Type u_3
⊢ card α ≤ 1 ↔ toPartENat #α ≤ ↑1

tactic: simp only [PartENat.card, Nat.cast_one]
state_before: α✝ : Type u_1
β : Type u_2
α : Type u_3
⊢ card α ≤ 1 ↔ toPartENat #α ≤ ↑1
state_after: no goals
Theorem: map_ratCast
File: Mathlib/Data/Rat/Cast/Defs.lean

tactic: rw [cast_def, map_div₀, map_intCast, map_natCast, cast_def]
state_before: F : Type u_1
ι : Type u_2
α : Type u_3
β : Type u_4
inst✝³ : FunLike F α β
inst✝² : DivisionRing α
inst✝¹ : DivisionRing β
inst✝ : RingHomClass F α β
f : F
q : ℚ
⊢ f ↑q = ↑q
state_after: no goals
Theorem: Set.range_enumerateCountable_subset
File: Mathlib/Data/Set/Countable.lean

tactic: refine range_subset_iff.mpr (fun n ↦ ?_)
state_before: α : Type u
β : Type v
γ : Type w
ι : Sort x
s : Set α
h : s.Countable
default : α
⊢ range (enumerateCountable h default) ⊆ insert default s
state_after: α : Type u
β : Type v
γ : Type w
ι : Sort x
s : Set α
h : s.Countable
default : α
n : ℕ
⊢ enumerateCountable h default n ∈ insert default s

tactic: rw [enumerateCountable]
state_before: α : Type u
β : Type v
γ : Type w
ι : Sort x
s : Set α
h : s.Countable
default : α
n : ℕ
⊢ enumerateCountable h default n ∈ insert default s
state_after: α : Type u
β : Type v
γ : Type w
ι : Sort x
s : Set α
h : s.Countable
default : α
n : ℕ
⊢ (match decode n with
    | some y => ↑y
    | none => default) ∈
    insert default s

tactic: match @decode s (Countable.toEncodable h) n with
| none => exact mem_insert _ _
| some val => simp
state_before: α : Type u
β : Type v
γ : Type w
ι : Sort x
s : Set α
h : s.Countable
default : α
n : ℕ
⊢ (match decode n with
    | some y => ↑y
    | none => default) ∈
    insert default s
state_after: no goals

tactic: exact mem_insert _ _
state_before: α : Type u
β : Type v
γ : Type w
ι : Sort x
s : Set α
h : s.Countable
default : α
n : ℕ
⊢ (match none with
    | some y => ↑y
    | none => default) ∈
    insert default s
state_after: no goals

tactic: simp
state_before: α : Type u
β : Type v
γ : Type w
ι : Sort x
s : Set α
h : s.Countable
default : α
n : ℕ
val : ↑s
⊢ (match some val with
    | some y => ↑y
    | none => default) ∈
    insert default s
state_after: no goals
Theorem: ball_normSeminorm
File: Mathlib/Analysis/Seminorm.lean

tactic: ext x r y
state_before: R : Type u_1
R' : Type u_2
𝕜 : Type u_3
𝕜₂ : Type u_4
𝕜₃ : Type u_5
𝕝 : Type u_6
E : Type u_7
E₂ : Type u_8
E₃ : Type u_9
F : Type u_10
G : Type u_11
ι : Type u_12
inst✝² : NormedField 𝕜
inst✝¹ : SeminormedAddCommGroup E
inst✝ : NormedSpace 𝕜 E
r : ℝ
⊢ (normSeminorm 𝕜 E).ball = Metric.ball
state_after: case h.h.h
R : Type u_1
R' : Type u_2
𝕜 : Type u_3
𝕜₂ : Type u_4
𝕜₃ : Type u_5
𝕝 : Type u_6
E : Type u_7
E₂ : Type u_8
E₃ : Type u_9
F : Type u_10
G : Type u_11
ι : Type u_12
inst✝² : NormedField 𝕜
inst✝¹ : SeminormedAddCommGroup E
inst✝ : NormedSpace 𝕜 E
r✝ : ℝ
x : E
r : ℝ
y : E
⊢ y ∈ (normSeminorm 𝕜 E).ball x r ↔ y ∈ Metric.ball x r

tactic: simp only [Seminorm.mem_ball, Metric.mem_ball, coe_normSeminorm, dist_eq_norm]
state_before: case h.h.h
R : Type u_1
R' : Type u_2
𝕜 : Type u_3
𝕜₂ : Type u_4
𝕜₃ : Type u_5
𝕝 : Type u_6
E : Type u_7
E₂ : Type u_8
E₃ : Type u_9
F : Type u_10
G : Type u_11
ι : Type u_12
inst✝² : NormedField 𝕜
inst✝¹ : SeminormedAddCommGroup E
inst✝ : NormedSpace 𝕜 E
r✝ : ℝ
x : E
r : ℝ
y : E
⊢ y ∈ (normSeminorm 𝕜 E).ball x r ↔ y ∈ Metric.ball x r
state_after: no goals
Theorem: Ideal.injective_quotient_le_comap_map
File: Mathlib/RingTheory/Ideal/Over.lean

tactic: refine quotientMap_injective' (le_of_eq ?_)
state_before: R : Type u_1
inst✝¹ : CommRing R
S : Type u_2
inst✝ : CommRing S
f : R →+* S
I J : Ideal S
P : Ideal R[X]
⊢ Function.Injective
    ⇑(quotientMap (map (mapRingHom (Quotient.mk (comap C P))) P) (mapRingHom (Quotient.mk (comap C P))) ⋯)
state_after: R : Type u_1
inst✝¹ : CommRing R
S : Type u_2
inst✝ : CommRing S
f : R →+* S
I J : Ideal S
P : Ideal R[X]
⊢ comap (mapRingHom (Quotient.mk (comap C P))) (map (mapRingHom (Quotient.mk (comap C P))) P) = P

tactic: rw [comap_map_of_surjective (mapRingHom (Ideal.Quotient.mk (P.comap (C : R →+* R[X]))))
    (map_surjective (Ideal.Quotient.mk (P.comap (C : R →+* R[X]))) Ideal.Quotient.mk_surjective)]
state_before: R : Type u_1
inst✝¹ : CommRing R
S : Type u_2
inst✝ : CommRing S
f : R →+* S
I J : Ideal S
P : Ideal R[X]
⊢ comap (mapRingHom (Quotient.mk (comap C P))) (map (mapRingHom (Quotient.mk (comap C P))) P) = P
state_after: R : Type u_1
inst✝¹ : CommRing R
S : Type u_2
inst✝ : CommRing S
f : R →+* S
I J : Ideal S
P : Ideal R[X]
⊢ P ⊔ comap (mapRingHom (Quotient.mk (comap C P))) ⊥ = P

tactic: refine le_antisymm (sup_le le_rfl ?_) (le_sup_of_le_left le_rfl)
state_before: R : Type u_1
inst✝¹ : CommRing R
S : Type u_2
inst✝ : CommRing S
f : R →+* S
I J : Ideal S
P : Ideal R[X]
⊢ P ⊔ comap (mapRingHom (Quotient.mk (comap C P))) ⊥ = P
state_after: R : Type u_1
inst✝¹ : CommRing R
S : Type u_2
inst✝ : CommRing S
f : R →+* S
I J : Ideal S
P : Ideal R[X]
⊢ comap (mapRingHom (Quotient.mk (comap C P))) ⊥ ≤ P

tactic: refine fun p hp =>
  polynomial_mem_ideal_of_coeff_mem_ideal P p fun n => Ideal.Quotient.eq_zero_iff_mem.mp ?_
state_before: R : Type u_1
inst✝¹ : CommRing R
S : Type u_2
inst✝ : CommRing S
f : R →+* S
I J : Ideal S
P : Ideal R[X]
⊢ comap (mapRingHom (Quotient.mk (comap C P))) ⊥ ≤ P
state_after: R : Type u_1
inst✝¹ : CommRing R
S : Type u_2
inst✝ : CommRing S
f : R →+* S
I J : Ideal S
P : Ideal R[X]
p : R[X]
hp : p ∈ comap (mapRingHom (Quotient.mk (comap C P))) ⊥
n : ℕ
⊢ (Quotient.mk (comap C P)) (p.coeff n) = 0

tactic: simpa only [coeff_map, coe_mapRingHom] using ext_iff.mp (Ideal.mem_bot.mp (mem_comap.mp hp)) n
state_before: R : Type u_1
inst✝¹ : CommRing R
S : Type u_2
inst✝ : CommRing S
f : R →+* S
I J : Ideal S
P : Ideal R[X]
p : R[X]
hp : p ∈ comap (mapRingHom (Quotient.mk (comap C P))) ⊥
n : ℕ
⊢ (Quotient.mk (comap C P)) (p.coeff n) = 0
state_after: no goals
Theorem: ProbabilityTheory.kernel.const_bind_eq_comp_const
File: Mathlib/Probability/Kernel/Invariance.lean

tactic: ext a s hs
state_before: α : Type u_1
β : Type u_2
γ : Type u_3
mα : MeasurableSpace α
mβ : MeasurableSpace β
mγ : MeasurableSpace γ
κ : ↥(kernel α β)
μ : Measure α
⊢ const α (μ.bind ⇑κ) = κ ∘ₖ const α μ
state_after: case h.h
α : Type u_1
β : Type u_2
γ : Type u_3
mα : MeasurableSpace α
mβ : MeasurableSpace β
mγ : MeasurableSpace γ
κ : ↥(kernel α β)
μ : Measure α
a : α
s : Set β
hs : MeasurableSet s
⊢ ((const α (μ.bind ⇑κ)) a) s = ((κ ∘ₖ const α μ) a) s

tactic: simp_rw [comp_apply' _ _ _ hs, const_apply, Measure.bind_apply hs (kernel.measurable _)]
state_before: case h.h
α : Type u_1
β : Type u_2
γ : Type u_3
mα : MeasurableSpace α
mβ : MeasurableSpace β
mγ : MeasurableSpace γ
κ : ↥(kernel α β)
μ : Measure α
a : α
s : Set β
hs : MeasurableSet s
⊢ ((const α (μ.bind ⇑κ)) a) s = ((κ ∘ₖ const α μ) a) s
state_after: no goals
Theorem: SimpleGraph.mul_adjMatrix_apply
File: Mathlib/Combinatorics/SimpleGraph/AdjMatrix.lean

tactic: simp [mul_apply, neighborFinset_eq_filter, sum_filter, adj_comm]
state_before: V : Type u_1
α : Type u_2
β : Type u_3
G : SimpleGraph V
inst✝² : DecidableRel G.Adj
inst✝¹ : Fintype V
inst✝ : NonAssocSemiring α
M : Matrix V V α
v w : V
⊢ (M * adjMatrix α G) v w = ∑ u ∈ G.neighborFinset w, M v u
state_after: no goals
Theorem: CategoryTheory.Limits.coprod.diag_comp
File: Mathlib/CategoryTheory/Limits/Shapes/BinaryProducts.lean

tactic: simp
state_before: C : Type u
inst✝¹ : Category.{v, u} C
X✝ Y✝ X Y : C
inst✝ : HasBinaryCoproduct X X
f : X ⟶ Y
⊢ codiag X ≫ f = desc f f
state_after: no goals
Theorem: Matrix.blockDiagonal'_smul
File: Mathlib/Data/Matrix/Block.lean

tactic: ext
state_before: l : Type u_1
m : Type u_2
n : Type u_3
o : Type u_4
p : Type u_5
q : Type u_6
m' : o → Type u_7
n' : o → Type u_8
p' : o → Type u_9
R✝ : Type u_10
S : Type u_11
α : Type u_12
β : Type u_13
inst✝³ : DecidableEq o
R : Type u_14
inst✝² : Semiring R
inst✝¹ : AddCommMonoid α
inst✝ : Module R α
x : R
M : (i : o) → Matrix (m' i) (n' i) α
⊢ blockDiagonal' (x • M) = x • blockDiagonal' M
state_after: case a
l : Type u_1
m : Type u_2
n : Type u_3
o : Type u_4
p : Type u_5
q : Type u_6
m' : o → Type u_7
n' : o → Type u_8
p' : o → Type u_9
R✝ : Type u_10
S : Type u_11
α : Type u_12
β : Type u_13
inst✝³ : DecidableEq o
R : Type u_14
inst✝² : Semiring R
inst✝¹ : AddCommMonoid α
inst✝ : Module R α
x : R
M : (i : o) → Matrix (m' i) (n' i) α
i✝ : (i : o) × m' i
j✝ : (i : o) × n' i
⊢ blockDiagonal' (x • M) i✝ j✝ = (x • blockDiagonal' M) i✝ j✝

tactic: simp only [blockDiagonal'_apply, Pi.smul_apply, smul_apply]
state_before: case a
l : Type u_1
m : Type u_2
n : Type u_3
o : Type u_4
p : Type u_5
q : Type u_6
m' : o → Type u_7
n' : o → Type u_8
p' : o → Type u_9
R✝ : Type u_10
S : Type u_11
α : Type u_12
β : Type u_13
inst✝³ : DecidableEq o
R : Type u_14
inst✝² : Semiring R
inst✝¹ : AddCommMonoid α
inst✝ : Module R α
x : R
M : (i : o) → Matrix (m' i) (n' i) α
i✝ : (i : o) × m' i
j✝ : (i : o) × n' i
⊢ blockDiagonal' (x • M) i✝ j✝ = (x • blockDiagonal' M) i✝ j✝
state_after: case a
l : Type u_1
m : Type u_2
n : Type u_3
o : Type u_4
p : Type u_5
q : Type u_6
m' : o → Type u_7
n' : o → Type u_8
p' : o → Type u_9
R✝ : Type u_10
S : Type u_11
α : Type u_12
β : Type u_13
inst✝³ : DecidableEq o
R : Type u_14
inst✝² : Semiring R
inst✝¹ : AddCommMonoid α
inst✝ : Module R α
x : R
M : (i : o) → Matrix (m' i) (n' i) α
i✝ : (i : o) × m' i
j✝ : (i : o) × n' i
⊢ (if h : i✝.fst = j✝.fst then x • M i✝.fst i✝.snd (cast ⋯ j✝.snd) else 0) =
    x • if h : i✝.fst = j✝.fst then M i✝.fst i✝.snd (cast ⋯ j✝.snd) else 0

tactic: split_ifs <;> simp
state_before: case a
l : Type u_1
m : Type u_2
n : Type u_3
o : Type u_4
p : Type u_5
q : Type u_6
m' : o → Type u_7
n' : o → Type u_8
p' : o → Type u_9
R✝ : Type u_10
S : Type u_11
α : Type u_12
β : Type u_13
inst✝³ : DecidableEq o
R : Type u_14
inst✝² : Semiring R
inst✝¹ : AddCommMonoid α
inst✝ : Module R α
x : R
M : (i : o) → Matrix (m' i) (n' i) α
i✝ : (i : o) × m' i
j✝ : (i : o) × n' i
⊢ (if h : i✝.fst = j✝.fst then x • M i✝.fst i✝.snd (cast ⋯ j✝.snd) else 0) =
    x • if h : i✝.fst = j✝.fst then M i✝.fst i✝.snd (cast ⋯ j✝.snd) else 0
state_after: no goals
Theorem: Linarith.lt_of_eq_of_lt
File: Mathlib/Tactic/Linarith/Lemmas.lean

tactic: simp [*]
state_before: α : Type u_1
inst✝ : OrderedSemiring α
a b : α
ha : a = 0
hb : b < 0
⊢ a + b < 0
state_after: no goals
Theorem: MeasureTheory.Measure.count_injective_image
File: Mathlib/MeasureTheory/Measure/Count.lean

tactic: by_cases hs : s.Finite
state_before: α : Type u_1
β : Type u_2
inst✝³ : MeasurableSpace α
inst✝² : MeasurableSpace β
s✝ : Set α
inst✝¹ : MeasurableSingletonClass α
inst✝ : MeasurableSingletonClass β
f : β → α
hf : Function.Injective f
s : Set β
⊢ count (f '' s) = count s
state_after: case pos
α : Type u_1
β : Type u_2
inst✝³ : MeasurableSpace α
inst✝² : MeasurableSpace β
s✝ : Set α
inst✝¹ : MeasurableSingletonClass α
inst✝ : MeasurableSingletonClass β
f : β → α
hf : Function.Injective f
s : Set β
hs : s.Finite
⊢ count (f '' s) = count s

case neg
α : Type u_1
β : Type u_2
inst✝³ : MeasurableSpace α
inst✝² : MeasurableSpace β
s✝ : Set α
inst✝¹ : MeasurableSingletonClass α
inst✝ : MeasurableSingletonClass β
f : β → α
hf : Function.Injective f
s : Set β
hs : ¬s.Finite
⊢ count (f '' s) = count s

tactic: rw [count_apply_infinite hs]
state_before: case neg
α : Type u_1
β : Type u_2
inst✝³ : MeasurableSpace α
inst✝² : MeasurableSpace β
s✝ : Set α
inst✝¹ : MeasurableSingletonClass α
inst✝ : MeasurableSingletonClass β
f : β → α
hf : Function.Injective f
s : Set β
hs : ¬s.Finite
⊢ count (f '' s) = count s
state_after: case neg
α : Type u_1
β : Type u_2
inst✝³ : MeasurableSpace α
inst✝² : MeasurableSpace β
s✝ : Set α
inst✝¹ : MeasurableSingletonClass α
inst✝ : MeasurableSingletonClass β
f : β → α
hf : Function.Injective f
s : Set β
hs : ¬s.Finite
⊢ count (f '' s) = ⊤

tactic: rw [← finite_image_iff hf.injOn] at hs
state_before: case neg
α : Type u_1
β : Type u_2
inst✝³ : MeasurableSpace α
inst✝² : MeasurableSpace β
s✝ : Set α
inst✝¹ : MeasurableSingletonClass α
inst✝ : MeasurableSingletonClass β
f : β → α
hf : Function.Injective f
s : Set β
hs : ¬s.Finite
⊢ count (f '' s) = ⊤
state_after: case neg
α : Type u_1
β : Type u_2
inst✝³ : MeasurableSpace α
inst✝² : MeasurableSpace β
s✝ : Set α
inst✝¹ : MeasurableSingletonClass α
inst✝ : MeasurableSingletonClass β
f : β → α
hf : Function.Injective f
s : Set β
hs : ¬(f '' s).Finite
⊢ count (f '' s) = ⊤

tactic: rw [count_apply_infinite hs]
state_before: case neg
α : Type u_1
β : Type u_2
inst✝³ : MeasurableSpace α
inst✝² : MeasurableSpace β
s✝ : Set α
inst✝¹ : MeasurableSingletonClass α
inst✝ : MeasurableSingletonClass β
f : β → α
hf : Function.Injective f
s : Set β
hs : ¬(f '' s).Finite
⊢ count (f '' s) = ⊤
state_after: no goals

tactic: exact count_injective_image' hf hs.measurableSet (Finite.image f hs).measurableSet
state_before: case pos
α : Type u_1
β : Type u_2
inst✝³ : MeasurableSpace α
inst✝² : MeasurableSpace β
s✝ : Set α
inst✝¹ : MeasurableSingletonClass α
inst✝ : MeasurableSingletonClass β
f : β → α
hf : Function.Injective f
s : Set β
hs : s.Finite
⊢ count (f '' s) = count s
state_after: no goals
Theorem: tsum_const_smul''
File: Mathlib/Topology/Algebra/InfiniteSum/Module.lean

tactic: rcases eq_or_ne g 0 with rfl | hg
state_before: α : Type u_1
β : Type u_2
γ✝ : Type u_3
δ : Type u_4
inst✝⁸ : Monoid γ✝
inst✝⁷ : TopologicalSpace α
inst✝⁶ : AddCommMonoid α
inst✝⁵ : DistribMulAction γ✝ α
inst✝⁴ : ContinuousConstSMul γ✝ α
f : β → α
γ : Type u_5
inst✝³ : DivisionRing γ
inst✝² : Module γ α
inst✝¹ : ContinuousConstSMul γ α
inst✝ : T2Space α
g : γ
⊢ ∑' (i : β), g • f i = g • ∑' (i : β), f i
state_after: case inl
α : Type u_1
β : Type u_2
γ✝ : Type u_3
δ : Type u_4
inst✝⁸ : Monoid γ✝
inst✝⁷ : TopologicalSpace α
inst✝⁶ : AddCommMonoid α
inst✝⁵ : DistribMulAction γ✝ α
inst✝⁴ : ContinuousConstSMul γ✝ α
f : β → α
γ : Type u_5
inst✝³ : DivisionRing γ
inst✝² : Module γ α
inst✝¹ : ContinuousConstSMul γ α
inst✝ : T2Space α
⊢ ∑' (i : β), 0 • f i = 0 • ∑' (i : β), f i

case inr
α : Type u_1
β : Type u_2
γ✝ : Type u_3
δ : Type u_4
inst✝⁸ : Monoid γ✝
inst✝⁷ : TopologicalSpace α
inst✝⁶ : AddCommMonoid α
inst✝⁵ : DistribMulAction γ✝ α
inst✝⁴ : ContinuousConstSMul γ✝ α
f : β → α
γ : Type u_5
inst✝³ : DivisionRing γ
inst✝² : Module γ α
inst✝¹ : ContinuousConstSMul γ α
inst✝ : T2Space α
g : γ
hg : g ≠ 0
⊢ ∑' (i : β), g • f i = g • ∑' (i : β), f i

tactic: simp
state_before: case inl
α : Type u_1
β : Type u_2
γ✝ : Type u_3
δ : Type u_4
inst✝⁸ : Monoid γ✝
inst✝⁷ : TopologicalSpace α
inst✝⁶ : AddCommMonoid α
inst✝⁵ : DistribMulAction γ✝ α
inst✝⁴ : ContinuousConstSMul γ✝ α
f : β → α
γ : Type u_5
inst✝³ : DivisionRing γ
inst✝² : Module γ α
inst✝¹ : ContinuousConstSMul γ α
inst✝ : T2Space α
⊢ ∑' (i : β), 0 • f i = 0 • ∑' (i : β), f i
state_after: no goals

tactic: exact tsum_const_smul' (Units.mk0 g hg)
state_before: case inr
α : Type u_1
β : Type u_2
γ✝ : Type u_3
δ : Type u_4
inst✝⁸ : Monoid γ✝
inst✝⁷ : TopologicalSpace α
inst✝⁶ : AddCommMonoid α
inst✝⁵ : DistribMulAction γ✝ α
inst✝⁴ : ContinuousConstSMul γ✝ α
f : β → α
γ : Type u_5
inst✝³ : DivisionRing γ
inst✝² : Module γ α
inst✝¹ : ContinuousConstSMul γ α
inst✝ : T2Space α
g : γ
hg : g ≠ 0
⊢ ∑' (i : β), g • f i = g • ∑' (i : β), f i
state_after: no goals
Theorem: Finset.left_mem_Ico
File: Mathlib/Order/Interval/Finset/Basic.lean

tactic: simp only [mem_Ico, true_and_iff, le_refl]
state_before: ι : Type u_1
α : Type u_2
inst✝¹ : Preorder α
inst✝ : LocallyFiniteOrder α
a a₁ a₂ b b₁ b₂ c x : α
⊢ a ∈ Ico a b ↔ a < b
state_after: no goals
Theorem: WithTop.top_mul
File: Mathlib/Algebra/Order/Ring/WithTop.lean

tactic: rw [top_mul', if_neg hb]
state_before: α : Type u_1
inst✝¹ : DecidableEq α
inst✝ : MulZeroClass α
a b : WithTop α
hb : b ≠ 0
⊢ ⊤ * b = ⊤
state_after: no goals
Theorem: NormedAddGroupHom.antilipschitz_of_norm_ge
File: Mathlib/Analysis/Normed/Group/Hom.lean

tactic: simpa only [dist_eq_norm, map_sub] using h (x - y)
state_before: V : Type u_1
V₁ : Type u_2
V₂ : Type u_3
V₃ : Type u_4
inst✝³ : SeminormedAddCommGroup V
inst✝² : SeminormedAddCommGroup V₁
inst✝¹ : SeminormedAddCommGroup V₂
inst✝ : SeminormedAddCommGroup V₃
f g : NormedAddGroupHom V₁ V₂
K : ℝ≥0
h : ∀ (x : V₁), ‖x‖ ≤ ↑K * ‖f x‖
x y : V₁
⊢ dist x y ≤ ↑K * dist (f x) (f y)
state_after: no goals
Theorem: eq_div_of_mul_eq''
File: Mathlib/Algebra/Group/Basic.lean

tactic: simp [h.symm]
state_before: α : Type u_1
β : Type u_2
G : Type u_3
M : Type u_4
inst✝ : CommGroup G
a b c d : G
h : c * a = b
⊢ a = b / c
state_after: no goals
Theorem: AffineBasis.toMatrix_row_sum_one
File: Mathlib/LinearAlgebra/AffineSpace/Matrix.lean

tactic: simp
state_before: ι : Type u₁
k : Type u₂
V : Type u₃
P : Type u₄
inst✝⁴ : AddCommGroup V
inst✝³ : AffineSpace V P
inst✝² : Ring k
inst✝¹ : Module k V
b : AffineBasis ι k P
ι' : Type u_1
inst✝ : Fintype ι
q : ι' → P
i : ι'
⊢ ∑ j : ι, b.toMatrix q i j = 1
state_after: no goals
Theorem: List.disjoint_left
File: .lake/packages/batteries/Batteries/Data/List/Lemmas.lean

tactic: simp [Disjoint]
state_before: α✝ : Type u_1
l₁ l₂ : List α✝
⊢ l₁.Disjoint l₂ ↔ ∀ ⦃a : α✝⦄, a ∈ l₁ → ¬a ∈ l₂
state_after: no goals