1337xyz1337xyz/leandojo-benchmark4-v10 huggingface dataset:
Theorem: DirectSum.IsInternal.collectedBasis_repr_of_mem_ne
File: Mathlib/Algebra/DirectSum/Module.lean

tactic: change (sigmaFinsuppLequivDFinsupp R).symm (DFinsupp.mapRange _ (fun i ↦ map_zero _) _) _ = _
state_before: R : Type u
inst✝² : Semiring R
ι : Type v
dec_ι : DecidableEq ι
M : Type u_1
inst✝¹ : AddCommMonoid M
inst✝ : Module R M
A : ι → Submodule R M
h : IsInternal A
α : ι → Type u_2
v : (i : ι) → Basis (α i) R ↥(A i)
x : M
i j : ι
hij : i ≠ j
a : α j
hx : x ∈ A i
⊢ ((h.collectedBasis v).repr x) ⟨j, a⟩ = 0
state_after: R : Type u
inst✝² : Semiring R
ι : Type v
dec_ι : DecidableEq ι
M : Type u_1
inst✝¹ : AddCommMonoid M
inst✝ : Module R M
A : ι → Submodule R M
h : IsInternal A
α : ι → Type u_2
v : (i : ι) → Basis (α i) R ↥(A i)
x : M
i j : ι
hij : i ≠ j
a : α j
hx : x ∈ A i
⊢ ((sigmaFinsuppLequivDFinsupp R).symm
        (DFinsupp.mapRange (fun i => ⇑(v i).repr) ⋯ (↑(LinearEquiv.ofBijective (coeLinearMap A) h).symm x)))
      ⟨j, a⟩ =
    0

tactic: simp [h.ofBijective_coeLinearMap_of_mem_ne hij hx]
state_before: R : Type u
inst✝² : Semiring R
ι : Type v
dec_ι : DecidableEq ι
M : Type u_1
inst✝¹ : AddCommMonoid M
inst✝ : Module R M
A : ι → Submodule R M
h : IsInternal A
α : ι → Type u_2
v : (i : ι) → Basis (α i) R ↥(A i)
x : M
i j : ι
hij : i ≠ j
a : α j
hx : x ∈ A i
⊢ ((sigmaFinsuppLequivDFinsupp R).symm
        (DFinsupp.mapRange (fun i => ⇑(v i).repr) ⋯ (↑(LinearEquiv.ofBijective (coeLinearMap A) h).symm x)))
      ⟨j, a⟩ =
    0
state_after: no goals
Theorem: Filter.seq_pure
File: Mathlib/Order/Filter/Basic.lean

tactic: refine le_antisymm (le_map fun s hs => ?_) (le_seq fun s hs t ht => ?_)
state_before: α : Type u
β : Type v
γ : Type w
δ : Type u_1
ι : Sort x
l : Filter α
f : Filter (α → β)
a : α
⊢ f.seq (pure a) = map (fun g => g a) f
state_after: case refine_1
α : Type u
β : Type v
γ : Type w
δ : Type u_1
ι : Sort x
l : Filter α
f : Filter (α → β)
a : α
s : Set (α → β)
hs : s ∈ f
⊢ (fun g => g a) '' s ∈ f.seq (pure a)

case refine_2
α : Type u
β : Type v
γ : Type w
δ : Type u_1
ι : Sort x
l : Filter α
f : Filter (α → β)
a : α
s : Set (α → β)
hs : s ∈ f
t : Set α
ht : t ∈ pure a
⊢ s.seq t ∈ map (fun g => g a) f

tactic: rw [← seq_singleton]
state_before: case refine_1
α : Type u
β : Type v
γ : Type w
δ : Type u_1
ι : Sort x
l : Filter α
f : Filter (α → β)
a : α
s : Set (α → β)
hs : s ∈ f
⊢ (fun g => g a) '' s ∈ f.seq (pure a)
state_after: case refine_1
α : Type u
β : Type v
γ : Type w
δ : Type u_1
ι : Sort x
l : Filter α
f : Filter (α → β)
a : α
s : Set (α → β)
hs : s ∈ f
⊢ s.seq {a} ∈ f.seq (pure a)

tactic: exact seq_mem_seq hs singleton_mem_pure
state_before: case refine_1
α : Type u
β : Type v
γ : Type w
δ : Type u_1
ι : Sort x
l : Filter α
f : Filter (α → β)
a : α
s : Set (α → β)
hs : s ∈ f
⊢ s.seq {a} ∈ f.seq (pure a)
state_after: no goals

tactic: refine sets_of_superset (map (fun g : α → β => g a) f) (image_mem_map hs) ?_
state_before: case refine_2
α : Type u
β : Type v
γ : Type w
δ : Type u_1
ι : Sort x
l : Filter α
f : Filter (α → β)
a : α
s : Set (α → β)
hs : s ∈ f
t : Set α
ht : t ∈ pure a
⊢ s.seq t ∈ map (fun g => g a) f
state_after: case refine_2
α : Type u
β : Type v
γ : Type w
δ : Type u_1
ι : Sort x
l : Filter α
f : Filter (α → β)
a : α
s : Set (α → β)
hs : s ∈ f
t : Set α
ht : t ∈ pure a
⊢ (fun g => g a) '' s ⊆ s.seq t

tactic: rintro b ⟨g, hg, rfl⟩
state_before: case refine_2
α : Type u
β : Type v
γ : Type w
δ : Type u_1
ι : Sort x
l : Filter α
f : Filter (α → β)
a : α
s : Set (α → β)
hs : s ∈ f
t : Set α
ht : t ∈ pure a
⊢ (fun g => g a) '' s ⊆ s.seq t
state_after: case refine_2.intro.intro
α : Type u
β : Type v
γ : Type w
δ : Type u_1
ι : Sort x
l : Filter α
f : Filter (α → β)
a : α
s : Set (α → β)
hs : s ∈ f
t : Set α
ht : t ∈ pure a
g : α → β
hg : g ∈ s
⊢ (fun g => g a) g ∈ s.seq t

tactic: exact ⟨g, hg, a, ht, rfl⟩
state_before: case refine_2.intro.intro
α : Type u
β : Type v
γ : Type w
δ : Type u_1
ι : Sort x
l : Filter α
f : Filter (α → β)
a : α
s : Set (α → β)
hs : s ∈ f
t : Set α
ht : t ∈ pure a
g : α → β
hg : g ∈ s
⊢ (fun g => g a) g ∈ s.seq t
state_after: no goals
Theorem: UniformSpace.Completion.dist_comm
File: Mathlib/Topology/MetricSpace/Completion.lean

tactic: refine induction_on₂ x y ?_ ?_
state_before: α : Type u
β : Type v
inst✝ : PseudoMetricSpace α
x y : Completion α
⊢ dist x y = dist y x
state_after: case refine_1
α : Type u
β : Type v
inst✝ : PseudoMetricSpace α
x y : Completion α
⊢ IsClosed {x | dist x.1 x.2 = dist x.2 x.1}

case refine_2
α : Type u
β : Type v
inst✝ : PseudoMetricSpace α
x y : Completion α
⊢ ∀ (a b : α), dist (↑α a) (↑α b) = dist (↑α b) (↑α a)

tactic: exact isClosed_eq (Completion.continuous_dist continuous_fst continuous_snd)
    (Completion.continuous_dist continuous_snd continuous_fst)
state_before: case refine_1
α : Type u
β : Type v
inst✝ : PseudoMetricSpace α
x y : Completion α
⊢ IsClosed {x | dist x.1 x.2 = dist x.2 x.1}
state_after: no goals

tactic: intro a b
state_before: case refine_2
α : Type u
β : Type v
inst✝ : PseudoMetricSpace α
x y : Completion α
⊢ ∀ (a b : α), dist (↑α a) (↑α b) = dist (↑α b) (↑α a)
state_after: case refine_2
α : Type u
β : Type v
inst✝ : PseudoMetricSpace α
x y : Completion α
a b : α
⊢ dist (↑α a) (↑α b) = dist (↑α b) (↑α a)

tactic: rw [Completion.dist_eq, Completion.dist_eq, dist_comm]
state_before: case refine_2
α : Type u
β : Type v
inst✝ : PseudoMetricSpace α
x y : Completion α
a b : α
⊢ dist (↑α a) (↑α b) = dist (↑α b) (↑α a)
state_after: no goals
Theorem: Ioi_mem_nhdsSet_Ici_iff
File: Mathlib/Topology/Order/NhdsSet.lean

tactic: rw [isOpen_Ioi.mem_nhdsSet, Ici_subset_Ioi]
state_before: α : Type u_1
inst✝² : LinearOrder α
inst✝¹ : TopologicalSpace α
inst✝ : OrderClosedTopology α
a b c d : α
⊢ Ioi a ∈ 𝓝ˢ (Ici b) ↔ a < b
state_after: no goals
Theorem: Real.natCast_lt_toNNReal
File: Mathlib/Data/NNReal/Basic.lean

tactic: simpa only [not_le] using toNNReal_le_natCast.not
state_before: r : ℝ
n : ℕ
⊢ ↑n < r.toNNReal ↔ ↑n < r
state_after: no goals
Theorem: Multiset.toFinset_singleton
File: Mathlib/Data/Finset/Basic.lean

tactic: rw [← cons_zero, toFinset_cons, toFinset_zero, LawfulSingleton.insert_emptyc_eq]
state_before: α : Type u_1
β : Type u_2
γ : Type u_3
inst✝ : DecidableEq α
s t : Multiset α
a : α
⊢ {a}.toFinset = {a}
state_after: no goals
Theorem: ProbabilityTheory.kernel.ext_iff'
File: Mathlib/Probability/Kernel/Basic.lean

tactic: simp_rw [ext_iff, Measure.ext_iff]
state_before: α : Type u_1
β : Type u_2
ι : Type u_3
mα : MeasurableSpace α
mβ : MeasurableSpace β
κ η : ↥(kernel α β)
⊢ κ = η ↔ ∀ (a : α) (s : Set β), MeasurableSet s → (κ a) s = (η a) s
state_after: no goals
Theorem: IsCompact.mul_closure_one_eq_closure
File: Mathlib/Topology/Algebra/Group/Basic.lean

tactic: apply Subset.antisymm ?_ ?_
state_before: G : Type w
H : Type x
α : Type u
β : Type v
inst✝² : TopologicalSpace G
inst✝¹ : Group G
inst✝ : TopologicalGroup G
s t K : Set G
hK : IsCompact K
⊢ K * closure {1} = closure K
state_after: G : Type w
H : Type x
α : Type u
β : Type v
inst✝² : TopologicalSpace G
inst✝¹ : Group G
inst✝ : TopologicalGroup G
s t K : Set G
hK : IsCompact K
⊢ K * closure {1} ⊆ closure K

G : Type w
H : Type x
α : Type u
β : Type v
inst✝² : TopologicalSpace G
inst✝¹ : Group G
inst✝ : TopologicalGroup G
s t K : Set G
hK : IsCompact K
⊢ closure K ⊆ K * closure {1}

tactic: calc
K * (closure {1} : Set G) ⊆ closure K * (closure {1} : Set G) :=
  smul_subset_smul_right subset_closure
_ ⊆ closure (K * ({1} : Set G)) := smul_set_closure_subset _ _
_ = closure K := by simp
state_before: G : Type w
H : Type x
α : Type u
β : Type v
inst✝² : TopologicalSpace G
inst✝¹ : Group G
inst✝ : TopologicalGroup G
s t K : Set G
hK : IsCompact K
⊢ K * closure {1} ⊆ closure K
state_after: no goals

tactic: simp
state_before: G : Type w
H : Type x
α : Type u
β : Type v
inst✝² : TopologicalSpace G
inst✝¹ : Group G
inst✝ : TopologicalGroup G
s t K : Set G
hK : IsCompact K
⊢ closure (K * {1}) = closure K
state_after: no goals

tactic: have : IsClosed (K * (closure {1} : Set G)) :=
  IsClosed.smul_left_of_isCompact isClosed_closure hK
state_before: G : Type w
H : Type x
α : Type u
β : Type v
inst✝² : TopologicalSpace G
inst✝¹ : Group G
inst✝ : TopologicalGroup G
s t K : Set G
hK : IsCompact K
⊢ closure K ⊆ K * closure {1}
state_after: G : Type w
H : Type x
α : Type u
β : Type v
inst✝² : TopologicalSpace G
inst✝¹ : Group G
inst✝ : TopologicalGroup G
s t K : Set G
hK : IsCompact K
this : IsClosed (K * closure {1})
⊢ closure K ⊆ K * closure {1}

tactic: rw [IsClosed.closure_subset_iff this]
state_before: G : Type w
H : Type x
α : Type u
β : Type v
inst✝² : TopologicalSpace G
inst✝¹ : Group G
inst✝ : TopologicalGroup G
s t K : Set G
hK : IsCompact K
this : IsClosed (K * closure {1})
⊢ closure K ⊆ K * closure {1}
state_after: G : Type w
H : Type x
α : Type u
β : Type v
inst✝² : TopologicalSpace G
inst✝¹ : Group G
inst✝ : TopologicalGroup G
s t K : Set G
hK : IsCompact K
this : IsClosed (K * closure {1})
⊢ K ⊆ K * closure {1}

tactic: exact subset_mul_closure_one K
state_before: G : Type w
H : Type x
α : Type u
β : Type v
inst✝² : TopologicalSpace G
inst✝¹ : Group G
inst✝ : TopologicalGroup G
s t K : Set G
hK : IsCompact K
this : IsClosed (K * closure {1})
⊢ K ⊆ K * closure {1}
state_after: no goals
Theorem: Stirling.tendsto_stirlingSeq_sqrt_pi
File: Mathlib/Analysis/SpecialFunctions/Stirling.lean

tactic: obtain ⟨a, hapos, halimit⟩ := stirlingSeq_has_pos_limit_a
state_before: ⊢ Tendsto stirlingSeq atTop (𝓝 √π)
state_after: case intro.intro
a : ℝ
hapos : 0 < a
halimit : Tendsto stirlingSeq atTop (𝓝 a)
⊢ Tendsto stirlingSeq atTop (𝓝 √π)

tactic: have hπ : π / 2 = a ^ 2 / 2 :=
  tendsto_nhds_unique Wallis.tendsto_W_nhds_pi_div_two (second_wallis_limit a hapos.ne' halimit)
state_before: case intro.intro
a : ℝ
hapos : 0 < a
halimit : Tendsto stirlingSeq atTop (𝓝 a)
⊢ Tendsto stirlingSeq atTop (𝓝 √π)
state_after: case intro.intro
a : ℝ
hapos : 0 < a
halimit : Tendsto stirlingSeq atTop (𝓝 a)
hπ : π / 2 = a ^ 2 / 2
⊢ Tendsto stirlingSeq atTop (𝓝 √π)

tactic: rwa [(div_left_inj' (two_ne_zero' ℝ)).mp hπ, sqrt_sq hapos.le]
state_before: case intro.intro
a : ℝ
hapos : 0 < a
halimit : Tendsto stirlingSeq atTop (𝓝 a)
hπ : π / 2 = a ^ 2 / 2
⊢ Tendsto stirlingSeq atTop (𝓝 √π)
state_after: no goals
Theorem: Fin.lt_succAbove_iff_lt_castSucc
File: Mathlib/Data/Fin/Basic.lean

tactic: rw [lt_succAbove_iff_le_castSucc, le_castSucc_iff]
state_before: n m : ℕ
p✝ : Fin (n + 1)
i✝ j : Fin n
p : Fin (n + 1)
i : Fin n
⊢ p < p.succAbove i ↔ p < i.succ
state_after: no goals
Theorem: MeasureTheory.L1.ofReal_norm_eq_lintegral
File: Mathlib/MeasureTheory/Function/L1Space.lean

tactic: rw [norm_def, ENNReal.ofReal_toReal]
state_before: α : Type u_1
β : Type u_2
γ : Type u_3
δ : Type u_4
m : MeasurableSpace α
μ ν : Measure α
inst✝² : MeasurableSpace δ
inst✝¹ : NormedAddCommGroup β
inst✝ : NormedAddCommGroup γ
f : ↥(Lp β 1 μ)
⊢ ENNReal.ofReal ‖f‖ = ∫⁻ (x : α), ↑‖↑↑f x‖₊ ∂μ
state_after: α : Type u_1
β : Type u_2
γ : Type u_3
δ : Type u_4
m : MeasurableSpace α
μ ν : Measure α
inst✝² : MeasurableSpace δ
inst✝¹ : NormedAddCommGroup β
inst✝ : NormedAddCommGroup γ
f : ↥(Lp β 1 μ)
⊢ ∫⁻ (a : α), ↑‖↑↑f a‖₊ ∂μ ≠ ⊤

tactic: exact ne_of_lt (hasFiniteIntegral_coeFn f)
state_before: α : Type u_1
β : Type u_2
γ : Type u_3
δ : Type u_4
m : MeasurableSpace α
μ ν : Measure α
inst✝² : MeasurableSpace δ
inst✝¹ : NormedAddCommGroup β
inst✝ : NormedAddCommGroup γ
f : ↥(Lp β 1 μ)
⊢ ∫⁻ (a : α), ↑‖↑↑f a‖₊ ∂μ ≠ ⊤
state_after: no goals
Theorem: Relation.TransGen.lift
File: Mathlib/Logic/Relation.lean

tactic: induction hab with
| single hac => exact TransGen.single (h a _ hac)
| tail _ hcd hac => exact TransGen.tail hac (h _ _ 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 : α
p : β → β → Prop
a b : α
f : α → β
h : ∀ (a b : α), r a b → p (f a) (f b)
hab : TransGen r a b
⊢ TransGen p (f a) (f b)
state_after: no goals

tactic: exact TransGen.single (h a _ hac)
state_before: case single
α : Type u_1
β : Type u_2
γ : Type u_3
δ : Type u_4
ε : Type u_5
ζ : Type u_6
r : α → α → Prop
a✝ b✝¹ c d : α
p : β → β → Prop
a b : α
f : α → β
h : ∀ (a b : α), r a b → p (f a) (f b)
b✝ : α
hac : r a b✝
⊢ TransGen p (f a) (f b✝)
state_after: no goals

tactic: exact TransGen.tail hac (h _ _ 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 : α
p : β → β → Prop
a b : α
f : α → β
h : ∀ (a b : α), r a b → p (f a) (f b)
b✝ c✝ : α
a✝ : TransGen r a b✝
hcd : r b✝ c✝
hac : TransGen p (f a) (f b✝)
⊢ TransGen p (f a) (f c✝)
state_after: no goals
Theorem: NNReal.inner_le_Lp_mul_Lp_of_norm_eq_zero
File: Mathlib/Analysis/MeanInequalities.lean

tactic: simp only [hf, hpq.ne_zero, one_div, sum_eq_zero_iff, zero_rpow, zero_mul,
  inv_eq_zero, Ne, not_false_iff, le_zero_iff, mul_eq_zero]
state_before: ι : Type u
s : Finset ι
f g : ι → ℝ≥0
p q : ℝ
hpq : p.IsConjExponent q
hf : ∑ i ∈ s, f i ^ p = 0
⊢ ∑ i ∈ s, f i * g i ≤ (∑ i ∈ s, f i ^ p) ^ (1 / p) * (∑ i ∈ s, g i ^ q) ^ (1 / q)
state_after: ι : Type u
s : Finset ι
f g : ι → ℝ≥0
p q : ℝ
hpq : p.IsConjExponent q
hf : ∑ i ∈ s, f i ^ p = 0
⊢ ∀ x ∈ s, f x = 0 ∨ g x = 0

tactic: intro i his
state_before: ι : Type u
s : Finset ι
f g : ι → ℝ≥0
p q : ℝ
hpq : p.IsConjExponent q
hf : ∑ i ∈ s, f i ^ p = 0
⊢ ∀ x ∈ s, f x = 0 ∨ g x = 0
state_after: ι : Type u
s : Finset ι
f g : ι → ℝ≥0
p q : ℝ
hpq : p.IsConjExponent q
hf : ∑ i ∈ s, f i ^ p = 0
i : ι
his : i ∈ s
⊢ f i = 0 ∨ g i = 0

tactic: left
state_before: ι : Type u
s : Finset ι
f g : ι → ℝ≥0
p q : ℝ
hpq : p.IsConjExponent q
hf : ∑ i ∈ s, f i ^ p = 0
i : ι
his : i ∈ s
⊢ f i = 0 ∨ g i = 0
state_after: case h
ι : Type u
s : Finset ι
f g : ι → ℝ≥0
p q : ℝ
hpq : p.IsConjExponent q
hf : ∑ i ∈ s, f i ^ p = 0
i : ι
his : i ∈ s
⊢ f i = 0

tactic: rw [sum_eq_zero_iff] at hf
state_before: case h
ι : Type u
s : Finset ι
f g : ι → ℝ≥0
p q : ℝ
hpq : p.IsConjExponent q
hf : ∑ i ∈ s, f i ^ p = 0
i : ι
his : i ∈ s
⊢ f i = 0
state_after: case h
ι : Type u
s : Finset ι
f g : ι → ℝ≥0
p q : ℝ
hpq : p.IsConjExponent q
hf : ∀ x ∈ s, f x ^ p = 0
i : ι
his : i ∈ s
⊢ f i = 0

tactic: exact (rpow_eq_zero_iff.mp (hf i his)).left
state_before: case h
ι : Type u
s : Finset ι
f g : ι → ℝ≥0
p q : ℝ
hpq : p.IsConjExponent q
hf : ∀ x ∈ s, f x ^ p = 0
i : ι
his : i ∈ s
⊢ f i = 0
state_after: no goals
Theorem: Int.alternating_sum_range_choose
File: Mathlib/Data/Nat/Choose/Sum.lean

tactic: cases n with
| zero => simp
| succ n =>
  have h := add_pow (-1 : ℤ) 1 n.succ
  simp only [one_pow, mul_one, add_left_neg] at h
  rw [← h, zero_pow n.succ_ne_zero, if_neg (Nat.succ_ne_zero n)]
state_before: R : Type u_1
n : ℕ
⊢ ∑ m ∈ range (n + 1), (-1) ^ m * ↑(n.choose m) = if n = 0 then 1 else 0
state_after: no goals

tactic: simp
state_before: case zero
R : Type u_1
⊢ ∑ m ∈ range (0 + 1), (-1) ^ m * ↑(Nat.choose 0 m) = if 0 = 0 then 1 else 0
state_after: no goals

tactic: have h := add_pow (-1 : ℤ) 1 n.succ
state_before: case succ
R : Type u_1
n : ℕ
⊢ ∑ m ∈ range (n + 1 + 1), (-1) ^ m * ↑((n + 1).choose m) = if n + 1 = 0 then 1 else 0
state_after: case succ
R : Type u_1
n : ℕ
h : (-1 + 1) ^ n.succ = ∑ m ∈ range (n.succ + 1), (-1) ^ m * 1 ^ (n.succ - m) * ↑(n.succ.choose m)
⊢ ∑ m ∈ range (n + 1 + 1), (-1) ^ m * ↑((n + 1).choose m) = if n + 1 = 0 then 1 else 0

tactic: simp only [one_pow, mul_one, add_left_neg] at h
state_before: case succ
R : Type u_1
n : ℕ
h : (-1 + 1) ^ n.succ = ∑ m ∈ range (n.succ + 1), (-1) ^ m * 1 ^ (n.succ - m) * ↑(n.succ.choose m)
⊢ ∑ m ∈ range (n + 1 + 1), (-1) ^ m * ↑((n + 1).choose m) = if n + 1 = 0 then 1 else 0
state_after: case succ
R : Type u_1
n : ℕ
h : 0 ^ n.succ = ∑ x ∈ range (n.succ + 1), (-1) ^ x * ↑(n.succ.choose x)
⊢ ∑ m ∈ range (n + 1 + 1), (-1) ^ m * ↑((n + 1).choose m) = if n + 1 = 0 then 1 else 0

tactic: rw [← h, zero_pow n.succ_ne_zero, if_neg (Nat.succ_ne_zero n)]
state_before: case succ
R : Type u_1
n : ℕ
h : 0 ^ n.succ = ∑ x ∈ range (n.succ + 1), (-1) ^ x * ↑(n.succ.choose x)
⊢ ∑ m ∈ range (n + 1 + 1), (-1) ^ m * ↑((n + 1).choose m) = if n + 1 = 0 then 1 else 0
state_after: no goals
Theorem: ContinuousLinearMap.coe_eq_id
File: Mathlib/Topology/Algebra/Module/Basic.lean

tactic: rw [← coe_id, coe_inj]
state_before: R₁ : Type u_1
R₂ : Type u_2
R₃ : Type u_3
inst✝¹⁶ : Semiring R₁
inst✝¹⁵ : Semiring R₂
inst✝¹⁴ : Semiring R₃
σ₁₂ : R₁ →+* R₂
σ₂₃ : R₂ →+* R₃
σ₁₃ : R₁ →+* R₃
M₁ : Type u_4
inst✝¹³ : TopologicalSpace M₁
inst✝¹² : AddCommMonoid M₁
M'₁ : Type u_5
inst✝¹¹ : TopologicalSpace M'₁
inst✝¹⁰ : AddCommMonoid M'₁
M₂ : Type u_6
inst✝⁹ : TopologicalSpace M₂
inst✝⁸ : AddCommMonoid M₂
M₃ : Type u_7
inst✝⁷ : TopologicalSpace M₃
inst✝⁶ : AddCommMonoid M₃
M₄ : Type u_8
inst✝⁵ : TopologicalSpace M₄
inst✝⁴ : AddCommMonoid M₄
inst✝³ : Module R₁ M₁
inst✝² : Module R₁ M'₁
inst✝¹ : Module R₂ M₂
inst✝ : Module R₃ M₃
f : M₁ →L[R₁] M₁
⊢ ↑f = LinearMap.id ↔ f = id R₁ M₁
state_after: no goals
Theorem: Units.add_eq_mul_one_add_div
File: Mathlib/Algebra/Ring/Units.lean

tactic: rw [mul_add, mul_one, ← mul_assoc, Units.mul_inv, one_mul]
state_before: α : Type u
β : Type v
γ : Type w
R : Type x
inst✝ : Semiring R
a : Rˣ
b : R
⊢ ↑a + b = ↑a * (1 + ↑a⁻¹ * b)
state_after: no goals
Theorem: Finset.exists_mem_ne
File: Mathlib/Data/Finset/Card.lean

tactic: have : Nonempty α := ⟨a⟩
state_before: α : Type u_1
β : Type u_2
R : Type u_3
s t u : Finset α
f : α → β
n : ℕ
hs : 1 < s.card
a : α
⊢ ∃ b ∈ s, b ≠ a
state_after: α : Type u_1
β : Type u_2
R : Type u_3
s t u : Finset α
f : α → β
n : ℕ
hs : 1 < s.card
a : α
this : Nonempty α
⊢ ∃ b ∈ s, b ≠ a

tactic: by_contra!
state_before: α : Type u_1
β : Type u_2
R : Type u_3
s t u : Finset α
f : α → β
n : ℕ
hs : 1 < s.card
a : α
this : Nonempty α
⊢ ∃ b ∈ s, b ≠ a
state_after: α : Type u_1
β : Type u_2
R : Type u_3
s t u : Finset α
f : α → β
n : ℕ
hs : 1 < s.card
a : α
this✝ : Nonempty α
this : ∀ b ∈ s, b = a
⊢ False

tactic: exact hs.not_le (card_le_one_iff_subset_singleton.2 ⟨a, subset_singleton_iff'.2 this⟩)
state_before: α : Type u_1
β : Type u_2
R : Type u_3
s t u : Finset α
f : α → β
n : ℕ
hs : 1 < s.card
a : α
this✝ : Nonempty α
this : ∀ b ∈ s, b = a
⊢ False
state_after: no goals
Theorem: Real.arccos_neg_one
File: Mathlib/Analysis/SpecialFunctions/Trigonometric/Inverse.lean

tactic: simp [arccos, add_halves]
state_before: x y : ℝ
⊢ arccos (-1) = π
state_after: no goals
Theorem: torusIntegral_dim0
File: Mathlib/MeasureTheory/Integral/TorusIntegral.lean

tactic: simp only [torusIntegral, Fin.prod_univ_zero, one_smul,
  Subsingleton.elim (fun _ : Fin 0 => 2 * π) 0, Icc_self, Measure.restrict_singleton, volume_pi,
  integral_smul_measure, integral_dirac, Measure.pi_of_empty (fun _ : Fin 0 ↦ volume) 0,
  Measure.dirac_apply_of_mem (mem_singleton _), Subsingleton.elim (torusMap c R 0) c]
state_before: n : ℕ
E : Type u_1
inst✝² : NormedAddCommGroup E
inst✝¹ : NormedSpace ℂ E
inst✝ : CompleteSpace E
f✝ g : (Fin n → ℂ) → E
c✝ : Fin n → ℂ
R✝ : Fin n → ℝ
f : (Fin 0 → ℂ) → E
c : Fin 0 → ℂ
R : Fin 0 → ℝ
⊢ (∯ (x : Fin 0 → ℂ) in T(c, R), f x) = f c
state_after: no goals
Theorem: Finset.erase_union_distrib
File: Mathlib/Data/Finset/Basic.lean

tactic: simp_rw [erase_eq, union_sdiff_distrib]
state_before: α : Type u_1
β : Type u_2
γ : Type u_3
inst✝ : DecidableEq α
s✝ t✝ u v : Finset α
a✝ b : α
s t : Finset α
a : α
⊢ (s ∪ t).erase a = s.erase a ∪ t.erase a
state_after: no goals
Theorem: Set.abs_sub_le_of_uIcc_subset_uIcc
File: Mathlib/Data/Set/Pointwise/Interval.lean

tactic: rw [← max_sub_min_eq_abs, ← max_sub_min_eq_abs]
state_before: α : Type u_1
inst✝ : LinearOrderedAddCommGroup α
a b c d : α
h : [[c, d]] ⊆ [[a, b]]
⊢ |d - c| ≤ |b - a|
state_after: α : Type u_1
inst✝ : LinearOrderedAddCommGroup α
a b c d : α
h : [[c, d]] ⊆ [[a, b]]
⊢ max c d - min c d ≤ max a b - min a b

tactic: rw [uIcc_subset_uIcc_iff_le] at h
state_before: α : Type u_1
inst✝ : LinearOrderedAddCommGroup α
a b c d : α
h : [[c, d]] ⊆ [[a, b]]
⊢ max c d - min c d ≤ max a b - min a b
state_after: α : Type u_1
inst✝ : LinearOrderedAddCommGroup α
a b c d : α
h : min a b ≤ min c d ∧ max c d ≤ max a b
⊢ max c d - min c d ≤ max a b - min a b

tactic: exact sub_le_sub h.2 h.1
state_before: α : Type u_1
inst✝ : LinearOrderedAddCommGroup α
a b c d : α
h : min a b ≤ min c d ∧ max c d ≤ max a b
⊢ max c d - min c d ≤ max a b - min a b
state_after: no goals
Theorem: Linarith.mul_zero_eq
File: Mathlib/Tactic/Linarith/Lemmas.lean

tactic: simp [h]
state_before: α : Type u_1
R : α → α → Prop
inst✝ : Semiring α
a b : α
x✝ : R a 0
h : b = 0
⊢ a * b = 0
state_after: no goals
Theorem: SimpleGraph.ComponentCompl.mem_of_adj
File: Mathlib/Combinatorics/SimpleGraph/Ends/Defs.lean

tactic: rw [← h, ConnectedComponent.eq]
state_before: V : Type u
G : SimpleGraph V
K L L' M : Set V
C : G.ComponentCompl K
c d : V
x✝ : c ∈ C
dnK : d ∉ K
cd : G.Adj c d
cnK : c ∉ K
h : G.componentComplMk cnK = C
⊢ G.componentComplMk dnK = C
state_after: V : Type u
G : SimpleGraph V
K L L' M : Set V
C : G.ComponentCompl K
c d : V
x✝ : c ∈ C
dnK : d ∉ K
cd : G.Adj c d
cnK : c ∉ K
h : G.componentComplMk cnK = C
⊢ (induce Kᶜ G).Reachable ⟨d, dnK⟩ ⟨c, cnK⟩

tactic: exact Adj.reachable cd.symm
state_before: V : Type u
G : SimpleGraph V
K L L' M : Set V
C : G.ComponentCompl K
c d : V
x✝ : c ∈ C
dnK : d ∉ K
cd : G.Adj c d
cnK : c ∉ K
h : G.componentComplMk cnK = C
⊢ (induce Kᶜ G).Reachable ⟨d, dnK⟩ ⟨c, cnK⟩
state_after: no goals
Theorem: connectedComponentIn_mono
File: Mathlib/Topology/Connected/Basic.lean

tactic: by_cases hx : x ∈ F
state_before: α : Type u
β : Type v
ι : Type u_1
π : ι → Type u_2
inst✝ : TopologicalSpace α
s t u v : Set α
x : α
F G : Set α
h : F ⊆ G
⊢ connectedComponentIn F x ⊆ connectedComponentIn G x
state_after: case pos
α : Type u
β : Type v
ι : Type u_1
π : ι → Type u_2
inst✝ : TopologicalSpace α
s t u v : Set α
x : α
F G : Set α
h : F ⊆ G
hx : x ∈ F
⊢ connectedComponentIn F x ⊆ connectedComponentIn G x

case neg
α : Type u
β : Type v
ι : Type u_1
π : ι → Type u_2
inst✝ : TopologicalSpace α
s t u v : Set α
x : α
F G : Set α
h : F ⊆ G
hx : x ∉ F
⊢ connectedComponentIn F x ⊆ connectedComponentIn G x

tactic: rw [connectedComponentIn_eq_image hx, connectedComponentIn_eq_image (h hx), ←
  show ((↑) : G → α) ∘ inclusion h = (↑) from rfl, image_comp]
state_before: case pos
α : Type u
β : Type v
ι : Type u_1
π : ι → Type u_2
inst✝ : TopologicalSpace α
s t u v : Set α
x : α
F G : Set α
h : F ⊆ G
hx : x ∈ F
⊢ connectedComponentIn F x ⊆ connectedComponentIn G x
state_after: case pos
α : Type u
β : Type v
ι : Type u_1
π : ι → Type u_2
inst✝ : TopologicalSpace α
s t u v : Set α
x : α
F G : Set α
h : F ⊆ G
hx : x ∈ F
⊢ Subtype.val '' (inclusion h '' connectedComponent ⟨x, hx⟩) ⊆ Subtype.val '' connectedComponent ⟨x, ⋯⟩

tactic: exact image_subset _ ((continuous_inclusion h).image_connectedComponent_subset ⟨x, hx⟩)
state_before: case pos
α : Type u
β : Type v
ι : Type u_1
π : ι → Type u_2
inst✝ : TopologicalSpace α
s t u v : Set α
x : α
F G : Set α
h : F ⊆ G
hx : x ∈ F
⊢ Subtype.val '' (inclusion h '' connectedComponent ⟨x, hx⟩) ⊆ Subtype.val '' connectedComponent ⟨x, ⋯⟩
state_after: no goals

tactic: rw [connectedComponentIn_eq_empty hx]
state_before: case neg
α : Type u
β : Type v
ι : Type u_1
π : ι → Type u_2
inst✝ : TopologicalSpace α
s t u v : Set α
x : α
F G : Set α
h : F ⊆ G
hx : x ∉ F
⊢ connectedComponentIn F x ⊆ connectedComponentIn G x
state_after: case neg
α : Type u
β : Type v
ι : Type u_1
π : ι → Type u_2
inst✝ : TopologicalSpace α
s t u v : Set α
x : α
F G : Set α
h : F ⊆ G
hx : x ∉ F
⊢ ∅ ⊆ connectedComponentIn G x

tactic: exact Set.empty_subset _
state_before: case neg
α : Type u
β : Type v
ι : Type u_1
π : ι → Type u_2
inst✝ : TopologicalSpace α
s t u v : Set α
x : α
F G : Set α
h : F ⊆ G
hx : x ∉ F
⊢ ∅ ⊆ connectedComponentIn G x
state_after: no goals