tasksource/leandojo huggingface dataset:
Theorem: Doset.eq_of_not_disjoint
File: Mathlib/GroupTheory/DoubleCoset.lean

tactic: rw [disjoint_comm] at h
state_before: G : Type u_1
inst✝¹ : Group G
α : Type ?u.10571
inst✝ : Mul α
J : Subgroup G
g : G
H K : Subgroup G
a b : G
h : ¬Disjoint (doset a ↑H ↑K) (doset b ↑H ↑K)
⊢ doset a ↑H ↑K = doset b ↑H ↑K

tactic: have ha : a ∈ doset b H K := mem_doset_of_not_disjoint h
state_before: G : Type u_1
inst✝¹ : Group G
α : Type ?u.10571
inst✝ : Mul α
J : Subgroup G
g : G
H K : Subgroup G
a b : G
h : ¬Disjoint (doset b ↑H ↑K) (doset a ↑H ↑K)
⊢ doset a ↑H ↑K = doset b ↑H ↑K

tactic: apply doset_eq_of_mem ha
state_before: G : Type u_1
inst✝¹ : Group G
α : Type ?u.10571
inst✝ : Mul α
J : Subgroup G
g : G
H K : Subgroup G
a b : G
h : ¬Disjoint (doset b ↑H ↑K) (doset a ↑H ↑K)
ha : a ∈ doset b ↑H ↑K
⊢ doset a ↑H ↑K = doset b ↑H ↑K
Theorem: constantCoeff_wittPolynomial
File: Mathlib/RingTheory/WittVector/WittPolynomial.lean

tactic: simp only [wittPolynomial, map_sum, constantCoeff_monomial]
state_before: p : ℕ
R : Type u_1
inst✝² : CommRing R
inst✝¹ : DecidableEq R
S : Type ?u.75140
inst✝ : CommRing S
hp : Fact (Nat.Prime p)
n : ℕ
⊢ ↑constantCoeff (W_ R n) = 0

tactic: rw [sum_eq_zero]
state_before: p : ℕ
R : Type u_1
inst✝² : CommRing R
inst✝¹ : DecidableEq R
S : Type ?u.75140
inst✝ : CommRing S
hp : Fact (Nat.Prime p)
n : ℕ
⊢ (∑ x in range (n + 1), if single x (p ^ (n - x)) = 0 then ↑p ^ x else 0) = 0

tactic: rintro i _
state_before: p : ℕ
R : Type u_1
inst✝² : CommRing R
inst✝¹ : DecidableEq R
S : Type ?u.75140
inst✝ : CommRing S
hp : Fact (Nat.Prime p)
n : ℕ
⊢ ∀ (x : ℕ), x ∈ range (n + 1) → (if single x (p ^ (n - x)) = 0 then ↑p ^ x else 0) = 0

tactic: rw [if_neg]
state_before: p : ℕ
R : Type u_1
inst✝² : CommRing R
inst✝¹ : DecidableEq R
S : Type ?u.75140
inst✝ : CommRing S
hp : Fact (Nat.Prime p)
n i : ℕ
a✝ : i ∈ range (n + 1)
⊢ (if single i (p ^ (n - i)) = 0 then ↑p ^ i else 0) = 0

tactic: rw [Finsupp.single_eq_zero]
state_before: case hnc
p : ℕ
R : Type u_1
inst✝² : CommRing R
inst✝¹ : DecidableEq R
S : Type ?u.75140
inst✝ : CommRing S
hp : Fact (Nat.Prime p)
n i : ℕ
a✝ : i ∈ range (n + 1)
⊢ ¬single i (p ^ (n - i)) = 0

tactic: exact ne_of_gt (pow_pos hp.1.pos _)
state_before: case hnc
p : ℕ
R : Type u_1
inst✝² : CommRing R
inst✝¹ : DecidableEq R
S : Type ?u.75140
inst✝ : CommRing S
hp : Fact (Nat.Prime p)
n i : ℕ
a✝ : i ∈ range (n + 1)
⊢ ¬p ^ (n - i) = 0
Theorem: intervalIntegral.norm_integral_le_of_norm_le_const_ae
File: Mathlib/MeasureTheory/Integral/IntervalIntegral.lean

tactic: rw [norm_integral_eq_norm_integral_Ioc]
state_before: ι : Type ?u.12289686
𝕜 : Type ?u.12289689
E : Type u_1
F : Type ?u.12289695
A : Type ?u.12289698
inst✝² : NormedAddCommGroup E
inst✝¹ : CompleteSpace E
inst✝ : NormedSpace ℝ E
a✝ b✝ : ℝ
f✝ g : ℝ → E
μ : MeasureTheory.Measure ℝ
a b C : ℝ
f : ℝ → E
h : ∀ᵐ (x : ℝ), x ∈ Ι a b → ‖f x‖ ≤ C
⊢ ‖∫ (x : ℝ) in a..b, f x‖ ≤ C * abs (b - a)

tactic: convert norm_set_integral_le_of_norm_le_const_ae'' _ measurableSet_Ioc h using 1
state_before: ι : Type ?u.12289686
𝕜 : Type ?u.12289689
E : Type u_1
F : Type ?u.12289695
A : Type ?u.12289698
inst✝² : NormedAddCommGroup E
inst✝¹ : CompleteSpace E
inst✝ : NormedSpace ℝ E
a✝ b✝ : ℝ
f✝ g : ℝ → E
μ : MeasureTheory.Measure ℝ
a b C : ℝ
f : ℝ → E
h : ∀ᵐ (x : ℝ), x ∈ Ι a b → ‖f x‖ ≤ C
⊢ ‖∫ (x : ℝ) in Ι a b, f x‖ ≤ C * abs (b - a)

tactic: rw [Real.volume_Ioc, max_sub_min_eq_abs, ENNReal.toReal_ofReal (abs_nonneg _)]
state_before: case h.e'_4
ι : Type ?u.12289686
𝕜 : Type ?u.12289689
E : Type u_1
F : Type ?u.12289695
A : Type ?u.12289698
inst✝² : NormedAddCommGroup E
inst✝¹ : CompleteSpace E
inst✝ : NormedSpace ℝ E
a✝ b✝ : ℝ
f✝ g : ℝ → E
μ : MeasureTheory.Measure ℝ
a b C : ℝ
f : ℝ → E
h : ∀ᵐ (x : ℝ), x ∈ Ι a b → ‖f x‖ ≤ C
⊢ C * abs (b - a) = C * ENNReal.toReal (↑↑volume (Ioc (min a b) (max a b)))

tactic: simp only [Real.volume_Ioc, ENNReal.ofReal_lt_top]
state_before: ι : Type ?u.12289686
𝕜 : Type ?u.12289689
E : Type u_1
F : Type ?u.12289695
A : Type ?u.12289698
inst✝² : NormedAddCommGroup E
inst✝¹ : CompleteSpace E
inst✝ : NormedSpace ℝ E
a✝ b✝ : ℝ
f✝ g : ℝ → E
μ : MeasureTheory.Measure ℝ
a b C : ℝ
f : ℝ → E
h : ∀ᵐ (x : ℝ), x ∈ Ι a b → ‖f x‖ ≤ C
⊢ ↑↑volume (Ioc (min a b) (max a b)) < ⊤
Theorem: MeasureTheory.snorm_exponent_top
File: Mathlib/MeasureTheory/Function/LpSeminorm.lean

tactic: simp [snorm]
state_before: α : Type u_1
E : Type ?u.528018
F : Type u_2
G : Type ?u.528024
m m0 : MeasurableSpace α
p : ℝ≥0∞
q : ℝ
μ ν : Measure α
inst✝² : NormedAddCommGroup E
inst✝¹ : NormedAddCommGroup F
inst✝ : NormedAddCommGroup G
f : α → F
⊢ snorm f ⊤ μ = snormEssSup f μ
Theorem: Finpartition.IsEquipartition.card_part_le_average_add_one
File: Mathlib/Order/Partition/Equipartition.lean

tactic: rw [← P.sum_card_parts]
state_before: α : Type u_1
inst✝ : DecidableEq α
s t : Finset α
P : Finpartition s
hP : IsEquipartition P
ht : t ∈ P.parts
⊢ Finset.card t ≤ Finset.card s / Finset.card P.parts + 1

tactic: exact Finset.EquitableOn.le_add_one hP ht
state_before: α : Type u_1
inst✝ : DecidableEq α
s t : Finset α
P : Finpartition s
hP : IsEquipartition P
ht : t ∈ P.parts
⊢ Finset.card t ≤ (Finset.sum P.parts fun i => Finset.card i) / Finset.card P.parts + 1
Theorem: TopologicalSpace.countable_cover_nhds
File: Mathlib/Topology/Bases.lean

tactic: rcases isOpen_iUnion_countable (fun x => interior (f x)) fun x => isOpen_interior with
  ⟨s, hsc, hsU⟩
state_before: α : Type u
t : TopologicalSpace α
inst✝ : SecondCountableTopology α
f : α → Set α
hf : ∀ (x : α), f x ∈ 𝓝 x
⊢ ∃ s, Set.Countable s ∧ (⋃ (x : α) (_ : x ∈ s), f x) = univ

tactic: suffices : (⋃ x ∈ s, interior (f x)) = univ
state_before: case intro.intro
α : Type u
t : TopologicalSpace α
inst✝ : SecondCountableTopology α
f : α → Set α
hf : ∀ (x : α), f x ∈ 𝓝 x
s : Set α
hsc : Set.Countable s
hsU : (⋃ (i : α) (_ : i ∈ s), interior (f i)) = ⋃ (i : α), interior (f i)
⊢ ∃ s, Set.Countable s ∧ (⋃ (x : α) (_ : x ∈ s), f x) = univ

tactic: exact ⟨s, hsc, flip eq_univ_of_subset this <| iUnion₂_mono fun _ _ => interior_subset⟩
state_before: case intro.intro
α : Type u
t : TopologicalSpace α
inst✝ : SecondCountableTopology α
f : α → Set α
hf : ∀ (x : α), f x ∈ 𝓝 x
s : Set α
hsc : Set.Countable s
hsU : (⋃ (i : α) (_ : i ∈ s), interior (f i)) = ⋃ (i : α), interior (f i)
this : (⋃ (x : α) (_ : x ∈ s), interior (f x)) = univ
⊢ ∃ s, Set.Countable s ∧ (⋃ (x : α) (_ : x ∈ s), f x) = univ

case this
α : Type u
t : TopologicalSpace α
inst✝ : SecondCountableTopology α
f : α → Set α
hf : ∀ (x : α), f x ∈ 𝓝 x
s : Set α
hsc : Set.Countable s
hsU : (⋃ (i : α) (_ : i ∈ s), interior (f i)) = ⋃ (i : α), interior (f i)
⊢ (⋃ (x : α) (_ : x ∈ s), interior (f x)) = univ

tactic: simp only [hsU, eq_univ_iff_forall, mem_iUnion]
state_before: case this
α : Type u
t : TopologicalSpace α
inst✝ : SecondCountableTopology α
f : α → Set α
hf : ∀ (x : α), f x ∈ 𝓝 x
s : Set α
hsc : Set.Countable s
hsU : (⋃ (i : α) (_ : i ∈ s), interior (f i)) = ⋃ (i : α), interior (f i)
⊢ (⋃ (x : α) (_ : x ∈ s), interior (f x)) = univ

tactic: exact fun x => ⟨x, mem_interior_iff_mem_nhds.2 (hf x)⟩
state_before: case this
α : Type u
t : TopologicalSpace α
inst✝ : SecondCountableTopology α
f : α → Set α
hf : ∀ (x : α), f x ∈ 𝓝 x
s : Set α
hsc : Set.Countable s
hsU : (⋃ (i : α) (_ : i ∈ s), interior (f i)) = ⋃ (i : α), interior (f i)
⊢ ∀ (x : α), ∃ i, x ∈ interior (f i)
Theorem: CategoryTheory.MonoidalCategory.tensor_right_iff
File: Mathlib/CategoryTheory/Monoidal/Category.lean

tactic: simp
state_before: C✝ : Type u
𝒞 : Category C✝
inst✝² : MonoidalCategory C✝
C : Type u
inst✝¹ : Category C
inst✝ : MonoidalCategory C
U V W X✝ Y✝ Z X Y : C
f g : X ⟶ Y
⊢ f ⊗ 𝟙 (𝟙_ C) = g ⊗ 𝟙 (𝟙_ C) ↔ f = g
Theorem: Dfinsupp.support_subset_iff
File: Mathlib/Data/Dfinsupp/Basic.lean

tactic: simp [Set.subset_def]
state_before: ι : Type u
γ : Type w
β : ι → Type v
β₁ : ι → Type v₁
β₂ : ι → Type v₂
dec : DecidableEq ι
inst✝¹ : (i : ι) → Zero (β i)
inst✝ : (i : ι) → (x : β i) → Decidable (x ≠ 0)
s : Set ι
f : Π₀ (i : ι), β i
⊢ ↑(support f) ⊆ s ↔ ∀ (i : ι), ¬i ∈ s → ↑f i = 0

tactic: exact forall_congr' fun i => not_imp_comm
state_before: ι : Type u
γ : Type w
β : ι → Type v
β₁ : ι → Type v₁
β₂ : ι → Type v₂
dec : DecidableEq ι
inst✝¹ : (i : ι) → Zero (β i)
inst✝ : (i : ι) → (x : β i) → Decidable (x ≠ 0)
s : Set ι
f : Π₀ (i : ι), β i
⊢ (∀ (x : ι), ¬↑f x = 0 → x ∈ s) ↔ ∀ (i : ι), ¬i ∈ s → ↑f i = 0
Theorem: Order.Ideal.mem_sInf
File: Mathlib/Order/Ideal.lean

tactic: simp_rw [← SetLike.mem_coe, coe_sInf, mem_iInter₂]
state_before: P : Type u_1
inst✝¹ : SemilatticeSup P
inst✝ : OrderBot P
x : P
I J K : Ideal P
S : Set (Ideal P)
⊢ x ∈ sInf S ↔ ∀ (s : Ideal P), s ∈ S → x ∈ s
Theorem: Nat.add_div_le_add_div
File: Mathlib/Data/Nat/ModEq.lean

tactic: simp [hc0]
state_before: m n a✝ b✝ c✝ d a b c : ℕ
hc0 : c = 0
⊢ a / c + b / c ≤ (a + b) / c

tactic: rw [Nat.add_div (Nat.pos_of_ne_zero hc0)]
state_before: m n a✝ b✝ c✝ d a b c : ℕ
hc0 : ¬c = 0
⊢ a / c + b / c ≤ (a + b) / c

tactic: exact Nat.le_add_right _ _
state_before: m n a✝ b✝ c✝ d a b c : ℕ
hc0 : ¬c = 0
⊢ a / c + b / c ≤ a / c + b / c + if c ≤ a % c + b % c then 1 else 0
Theorem: VitaliFamily.ae_tendsto_limRatioMeas
File: Mathlib/MeasureTheory/Covering/Differentiation.lean

tactic: filter_upwards [v.ae_tendsto_limRatio hρ, AEMeasurable.ae_eq_mk (v.aemeasurable_limRatio hρ)]
state_before: α : Type u_1
inst✝⁵ : MetricSpace α
m0 : MeasurableSpace α
μ : MeasureTheory.Measure α
v : VitaliFamily μ
E : Type ?u.3482095
inst✝⁴ : NormedAddCommGroup E
inst✝³ : SecondCountableTopology α
inst✝² : BorelSpace α
inst✝¹ : IsLocallyFiniteMeasure μ
ρ : MeasureTheory.Measure α
inst✝ : IsLocallyFiniteMeasure ρ
hρ : ρ ≪ μ
⊢ ∀ᵐ (x : α) ∂μ, Tendsto (fun a => ↑↑ρ a / ↑↑μ a) (filterAt v x) (𝓝 (limRatioMeas v hρ x))

tactic: intro x hx h'x
state_before: case h
α : Type u_1
inst✝⁵ : MetricSpace α
m0 : MeasurableSpace α
μ : MeasureTheory.Measure α
v : VitaliFamily μ
E : Type ?u.3482095
inst✝⁴ : NormedAddCommGroup E
inst✝³ : SecondCountableTopology α
inst✝² : BorelSpace α
inst✝¹ : IsLocallyFiniteMeasure μ
ρ : MeasureTheory.Measure α
inst✝ : IsLocallyFiniteMeasure ρ
hρ : ρ ≪ μ
⊢ ∀ (a : α),
    Tendsto (fun a => ↑↑ρ a / ↑↑μ a) (filterAt v a) (𝓝 (limRatio v ρ a)) →
      limRatio v ρ a = AEMeasurable.mk (limRatio v ρ) (_ : AEMeasurable (limRatio v ρ)) a →
        Tendsto (fun a => ↑↑ρ a / ↑↑μ a) (filterAt v a) (𝓝 (limRatioMeas v hρ a))

tactic: rwa [h'x] at hx
state_before: case h
α : Type u_1
inst✝⁵ : MetricSpace α
m0 : MeasurableSpace α
μ : MeasureTheory.Measure α
v : VitaliFamily μ
E : Type ?u.3482095
inst✝⁴ : NormedAddCommGroup E
inst✝³ : SecondCountableTopology α
inst✝² : BorelSpace α
inst✝¹ : IsLocallyFiniteMeasure μ
ρ : MeasureTheory.Measure α
inst✝ : IsLocallyFiniteMeasure ρ
hρ : ρ ≪ μ
x : α
hx : Tendsto (fun a => ↑↑ρ a / ↑↑μ a) (filterAt v x) (𝓝 (limRatio v ρ x))
h'x : limRatio v ρ x = AEMeasurable.mk (limRatio v ρ) (_ : AEMeasurable (limRatio v ρ)) x
⊢ Tendsto (fun a => ↑↑ρ a / ↑↑μ a) (filterAt v x) (𝓝 (limRatioMeas v hρ x))
Theorem: Equiv.sumCongr_refl
File: Mathlib/Logic/Equiv/Basic.lean

tactic: ext i
state_before: α : Type u_1
β : Type u_2
⊢ sumCongr (Equiv.refl α) (Equiv.refl β) = Equiv.refl (α ⊕ β)

tactic: cases i <;> rfl
state_before: case H
α : Type u_1
β : Type u_2
i : α ⊕ β
⊢ ↑(sumCongr (Equiv.refl α) (Equiv.refl β)) i = ↑(Equiv.refl (α ⊕ β)) i
Theorem: even_iff_exists_two_mul
File: Mathlib/Algebra/Parity.lean

tactic: simp [even_iff_exists_two_nsmul]
state_before: F : Type ?u.60474
α : Type u_1
β : Type ?u.60480
R : Type ?u.60483
inst✝¹ : Semiring α
inst✝ : Semiring β
m✝ n m : α
⊢ Even m ↔ ∃ c, m = 2 * c
Theorem: AList.empty_lookupFinsupp
File: Mathlib/Data/Finsupp/AList.lean

tactic: classical
  ext
  simp
state_before: α : Type u_1
M : Type u_2
inst✝ : Zero M
⊢ lookupFinsupp ∅ = 0

tactic: ext
state_before: α : Type u_1
M : Type u_2
inst✝ : Zero M
⊢ lookupFinsupp ∅ = 0

tactic: simp
state_before: case h
α : Type u_1
M : Type u_2
inst✝ : Zero M
a✝ : α
⊢ ↑(lookupFinsupp ∅) a✝ = ↑0 a✝
Theorem: padicNorm.mul
File: Mathlib/NumberTheory/Padics/PadicNorm.lean

tactic: simp [hq]
state_before: p : ℕ
hp : Fact (Nat.Prime p)
q r : ℚ
hq : q = 0
⊢ padicNorm p (q * r) = padicNorm p q * padicNorm p r

tactic: simp [hr]
state_before: p : ℕ
hp : Fact (Nat.Prime p)
q r : ℚ
hq : ¬q = 0
hr : r = 0
⊢ padicNorm p (q * r) = padicNorm p q * padicNorm p r

tactic: have : (p : ℚ) ≠ 0 := by simp [hp.1.ne_zero]
state_before: p : ℕ
hp : Fact (Nat.Prime p)
q r : ℚ
hq : ¬q = 0
hr : ¬r = 0
⊢ padicNorm p (q * r) = padicNorm p q * padicNorm p r

tactic: simp [padicNorm, *, padicValRat.mul, zpow_add₀ this, mul_comm]
state_before: p : ℕ
hp : Fact (Nat.Prime p)
q r : ℚ
hq : ¬q = 0
hr : ¬r = 0
this : ↑p ≠ 0
⊢ padicNorm p (q * r) = padicNorm p q * padicNorm p r

tactic: simp [hp.1.ne_zero]
state_before: p : ℕ
hp : Fact (Nat.Prime p)
q r : ℚ
hq : ¬q = 0
hr : ¬r = 0
⊢ ↑p ≠ 0
Theorem: Finset.map_toFinset
File: Mathlib/Data/Finset/Image.lean

tactic: simp only [mem_map, Multiset.mem_map, exists_prop, Multiset.mem_toFinset]
state_before: α : Type u_1
β : Type u_2
γ : Type ?u.15667
f : α ↪ β
s✝ : Finset α
inst✝¹ : DecidableEq α
inst✝ : DecidableEq β
s : Multiset α
x✝ : β
⊢ x✝ ∈ map f (toFinset s) ↔ x✝ ∈ toFinset (Multiset.map (↑f) s)
Theorem: PGame.add_moveLeft_inl
File: Mathlib/SetTheory/Game/PGame.lean

tactic: cases x
state_before: x y : PGame
i : LeftMoves x
⊢ moveLeft (x + y) (↑toLeftMovesAdd (Sum.inl i)) = moveLeft x i + y

tactic: cases y
state_before: case mk
y : PGame
α✝ β✝ : Type u_1
a✝¹ : α✝ → PGame
a✝ : β✝ → PGame
i : LeftMoves (mk α✝ β✝ a✝¹ a✝)
⊢ moveLeft (mk α✝ β✝ a✝¹ a✝ + y) (↑toLeftMovesAdd (Sum.inl i)) = moveLeft (mk α✝ β✝ a✝¹ a✝) i + y

tactic: rfl
state_before: case mk.mk
α✝¹ β✝¹ : Type u_1
a✝³ : α✝¹ → PGame
a✝² : β✝¹ → PGame
i : LeftMoves (mk α✝¹ β✝¹ a✝³ a✝²)
α✝ β✝ : Type u_1
a✝¹ : α✝ → PGame
a✝ : β✝ → PGame
⊢ moveLeft (mk α✝¹ β✝¹ a✝³ a✝² + mk α✝ β✝ a✝¹ a✝) (↑toLeftMovesAdd (Sum.inl i)) =
    moveLeft (mk α✝¹ β✝¹ a✝³ a✝²) i + mk α✝ β✝ a✝¹ a✝
Theorem: List.kextract_eq_dlookup_kerase
File: Mathlib/Data/List/Sigma.lean

tactic: simp [kextract]
state_before: α : Type u
β : α → Type v
l✝ l₁ l₂ : List (Sigma β)
inst✝ : DecidableEq α
a a' : α
b : β a'
l : List (Sigma β)
⊢ kextract a ({ fst := a', snd := b } :: l) =
    (dlookup a ({ fst := a', snd := b } :: l), kerase a ({ fst := a', snd := b } :: l))

tactic: dsimp
state_before: α : Type u
β : α → Type v
l✝ l₁ l₂ : List (Sigma β)
inst✝ : DecidableEq α
a a' : α
b : β a'
l : List (Sigma β)
⊢ (if h : a' = a then (some ((_ : { fst := a', snd := b }.fst = a) ▸ b), l)
    else ((kextract a l).fst, { fst := a', snd := b } :: (kextract a l).snd)) =
    (dlookup a ({ fst := a', snd := b } :: l), kerase a ({ fst := a', snd := b } :: l))

tactic: split_ifs with h
state_before: α : Type u
β : α → Type v
l✝ l₁ l₂ : List (Sigma β)
inst✝ : DecidableEq α
a a' : α
b : β a'
l : List (Sigma β)
⊢ (if h : a' = a then (some ((_ : a' = a) ▸ b), l)
    else ((kextract a l).fst, { fst := a', snd := b } :: (kextract a l).snd)) =
    (dlookup a ({ fst := a', snd := b } :: l), kerase a ({ fst := a', snd := b } :: l))

tactic: subst a'
state_before: case inl
α : Type u
β : α → Type v
l✝ l₁ l₂ : List (Sigma β)
inst✝ : DecidableEq α
a a' : α
b : β a'
l : List (Sigma β)
h : a' = a
⊢ (some ((_ : a' = a) ▸ b), l) = (dlookup a ({ fst := a', snd := b } :: l), kerase a ({ fst := a', snd := b } :: l))

tactic: simp [kerase]
state_before: case inl
α : Type u
β : α → Type v
l✝ l₁ l₂ : List (Sigma β)
inst✝ : DecidableEq α
a : α
l : List (Sigma β)
b : β a
⊢ (some ((_ : a = a) ▸ b), l) = (dlookup a ({ fst := a, snd := b } :: l), kerase a ({ fst := a, snd := b } :: l))

tactic: simp [kextract, Ne.symm h, kextract_eq_dlookup_kerase a l, kerase]
state_before: case inr
α : Type u
β : α → Type v
l✝ l₁ l₂ : List (Sigma β)
inst✝ : DecidableEq α
a a' : α
b : β a'
l : List (Sigma β)
h : ¬a' = a
⊢ ((kextract a l).fst, { fst := a', snd := b } :: (kextract a l).snd) =
    (dlookup a ({ fst := a', snd := b } :: l), kerase a ({ fst := a', snd := b } :: l))
Theorem: Finset.erase_union_of_mem
File: Mathlib/Data/Finset/Basic.lean

tactic: rw [← insert_erase (mem_union_right s ha), erase_union_distrib, ← union_insert, insert_erase ha]
state_before: α : Type u_1
β : Type ?u.265412
γ : Type ?u.265415
inst✝ : DecidableEq α
s✝ t u v : Finset α
a b : α
ha : a ∈ t
s : Finset α
⊢ erase s a ∪ t = s ∪ t
Theorem: Composition.index_exists
File: Mathlib/Combinatorics/Composition.lean

tactic: have n_pos : 0 < n := lt_of_le_of_lt (zero_le j) h
state_before: n : ℕ
c : Composition n
j : ℕ
h : j < n
⊢ ∃ i, j < sizeUpTo c (Nat.succ i) ∧ i < length c

tactic: have : 0 < c.blocks.sum := by rwa [← c.blocks_sum] at n_pos
state_before: n : ℕ
c : Composition n
j : ℕ
h : j < n
n_pos : 0 < n
⊢ ∃ i, j < sizeUpTo c (Nat.succ i) ∧ i < length c

tactic: have length_pos : 0 < c.blocks.length := length_pos_of_sum_pos (blocks c) this
state_before: n : ℕ
c : Composition n
j : ℕ
h : j < n
n_pos : 0 < n
this : 0 < sum c.blocks
⊢ ∃ i, j < sizeUpTo c (Nat.succ i) ∧ i < length c

tactic: refine' ⟨c.length.pred, _, Nat.pred_lt (ne_of_gt length_pos)⟩
state_before: n : ℕ
c : Composition n
j : ℕ
h : j < n
n_pos : 0 < n
this : 0 < sum c.blocks
length_pos : 0 < List.length c.blocks
⊢ ∃ i, j < sizeUpTo c (Nat.succ i) ∧ i < length c

tactic: have : c.length.pred.succ = c.length := Nat.succ_pred_eq_of_pos length_pos
state_before: n : ℕ
c : Composition n
j : ℕ
h : j < n
n_pos : 0 < n
this : 0 < sum c.blocks
length_pos : 0 < List.length c.blocks
⊢ j < sizeUpTo c (Nat.succ (Nat.pred (length c)))

tactic: simp [this, h]
state_before: n : ℕ
c : Composition n
j : ℕ
h : j < n
n_pos : 0 < n
this✝ : 0 < sum c.blocks
length_pos : 0 < List.length c.blocks
this : Nat.succ (Nat.pred (length c)) = length c
⊢ j < sizeUpTo c (Nat.succ (Nat.pred (length c)))

tactic: rwa [← c.blocks_sum] at n_pos
state_before: n : ℕ
c : Composition n
j : ℕ
h : j < n
n_pos : 0 < n
⊢ 0 < sum c.blocks
Theorem: nndist_edist
File: Mathlib/Topology/MetricSpace/Basic.lean

tactic: simp [edist_nndist]
state_before: α : Type u
β : Type v
X : Type ?u.19776
ι : Type ?u.19779
inst✝ : PseudoMetricSpace α
x y : α
⊢ nndist x y = ENNReal.toNNReal (edist x y)
Theorem: ContDiffBump.one_lt_rOut_div_rIn
File: Mathlib/Analysis/Calculus/BumpFunctionInner.lean

tactic: rw [one_lt_div f.rIn_pos]
state_before: E : Type u_1
X : Type ?u.67116
c : E
f : ContDiffBump c
⊢ 1 < f.rOut / f.rIn

tactic: exact f.rIn_lt_rOut
state_before: E : Type u_1
X : Type ?u.67116
c : E
f : ContDiffBump c
⊢ f.rIn < f.rOut
Theorem: LocalHomeomorph.replaceEquiv_eq_self
File: Mathlib/Topology/LocalHomeomorph.lean

tactic: cases e
state_before: α : Type u_1
β : Type u_2
γ : Type ?u.22794
δ : Type ?u.22797
inst✝³ : TopologicalSpace α
inst✝² : TopologicalSpace β
inst✝¹ : TopologicalSpace γ
inst✝ : TopologicalSpace δ
e✝ : LocalHomeomorph α β
e'✝ : LocalHomeomorph β γ
e : LocalHomeomorph α β
e' : LocalEquiv α β
h : e.toLocalEquiv = e'
⊢ replaceEquiv e e' h = e

tactic: subst e'
state_before: case mk
α : Type u_1
β : Type u_2
γ : Type ?u.22794
δ : Type ?u.22797
inst✝³ : TopologicalSpace α
inst✝² : TopologicalSpace β
inst✝¹ : TopologicalSpace γ
inst✝ : TopologicalSpace δ
e : LocalHomeomorph α β
e'✝ : LocalHomeomorph β γ
e' toLocalEquiv✝ : LocalEquiv α β
open_source✝ : IsOpen toLocalEquiv✝.source
open_target✝ : IsOpen toLocalEquiv✝.target
continuous_toFun✝ : ContinuousOn (↑toLocalEquiv✝) toLocalEquiv✝.source
continuous_invFun✝ : ContinuousOn toLocalEquiv✝.invFun toLocalEquiv✝.target
h :
  { toLocalEquiv := toLocalEquiv✝, open_source := open_source✝, open_target := open_target✝,
        continuous_toFun := continuous_toFun✝, continuous_invFun := continuous_invFun✝ }.toLocalEquiv =
    e'
⊢ replaceEquiv
      { toLocalEquiv := toLocalEquiv✝, open_source := open_source✝, open_target := open_target✝,
        continuous_toFun := continuous_toFun✝, continuous_invFun := continuous_invFun✝ }
      e' h =
    { toLocalEquiv := toLocalEquiv✝, open_source := open_source✝, open_target := open_target✝,
      continuous_toFun := continuous_toFun✝, continuous_invFun := continuous_invFun✝ }

tactic: rfl
state_before: case mk
α : Type u_1
β : Type u_2
γ : Type ?u.22794
δ : Type ?u.22797
inst✝³ : TopologicalSpace α
inst✝² : TopologicalSpace β
inst✝¹ : TopologicalSpace γ
inst✝ : TopologicalSpace δ
e : LocalHomeomorph α β
e' : LocalHomeomorph β γ
toLocalEquiv✝ : LocalEquiv α β
open_source✝ : IsOpen toLocalEquiv✝.source
open_target✝ : IsOpen toLocalEquiv✝.target
continuous_toFun✝ : ContinuousOn (↑toLocalEquiv✝) toLocalEquiv✝.source
continuous_invFun✝ : ContinuousOn toLocalEquiv✝.invFun toLocalEquiv✝.target
⊢ replaceEquiv
      { toLocalEquiv := toLocalEquiv✝, open_source := open_source✝, open_target := open_target✝,
        continuous_toFun := continuous_toFun✝, continuous_invFun := continuous_invFun✝ }
      { toLocalEquiv := toLocalEquiv✝, open_source := open_source✝, open_target := open_target✝,
          continuous_toFun := continuous_toFun✝, continuous_invFun := continuous_invFun✝ }.toLocalEquiv
      (_ :
        { toLocalEquiv := toLocalEquiv✝, open_source := open_source✝, open_target := open_target✝,
              continuous_toFun := continuous_toFun✝, continuous_invFun := continuous_invFun✝ }.toLocalEquiv =
          { toLocalEquiv := toLocalEquiv✝, open_source := open_source✝, open_target := open_target✝,
              continuous_toFun := continuous_toFun✝, continuous_invFun := continuous_invFun✝ }.toLocalEquiv) =
    { toLocalEquiv := toLocalEquiv✝, open_source := open_source✝, open_target := open_target✝,
      continuous_toFun := continuous_toFun✝, continuous_invFun := continuous_invFun✝ }
Theorem: Submodule.mem_sSup_of_directed
File: Mathlib/LinearAlgebra/Span.lean

tactic: have : Nonempty s := hs.to_subtype
state_before: R : Type u_2
R₂ : Type ?u.91322
K : Type ?u.91325
M : Type u_1
M₂ : Type ?u.91331
V : Type ?u.91334
S : Type ?u.91337
inst✝⁵ : Semiring R
inst✝⁴ : AddCommMonoid M
inst✝³ : Module R M
x : M
p p' : Submodule R M
inst✝² : Semiring R₂
σ₁₂ : R →+* R₂
inst✝¹ : AddCommMonoid M₂
inst✝ : Module R₂ M₂
s✝ t : Set M
s : Set (Submodule R M)
z : M
hs : Set.Nonempty s
hdir : DirectedOn (fun x x_1 => x ≤ x_1) s
⊢ z ∈ sSup s ↔ ∃ y, y ∈ s ∧ z ∈ y

tactic: simp only [sSup_eq_iSup', mem_iSup_of_directed _ hdir.directed_val, SetCoe.exists, Subtype.coe_mk,
  exists_prop]
state_before: R : Type u_2
R₂ : Type ?u.91322
K : Type ?u.91325
M : Type u_1
M₂ : Type ?u.91331
V : Type ?u.91334
S : Type ?u.91337
inst✝⁵ : Semiring R
inst✝⁴ : AddCommMonoid M
inst✝³ : Module R M
x : M
p p' : Submodule R M
inst✝² : Semiring R₂
σ₁₂ : R →+* R₂
inst✝¹ : AddCommMonoid M₂
inst✝ : Module R₂ M₂
s✝ t : Set M
s : Set (Submodule R M)
z : M
hs : Set.Nonempty s
hdir : DirectedOn (fun x x_1 => x ≤ x_1) s
this : Nonempty ↑s
⊢ z ∈ sSup s ↔ ∃ y, y ∈ s ∧ z ∈ y
Theorem: mem_openSegment_of_ne_left_right
File: Mathlib/Analysis/Convex/Segment.lean

tactic: rw [← insert_endpoints_openSegment] at hz
state_before: 𝕜 : Type u_2
E : Type u_1
F : Type ?u.46146
G : Type ?u.46149
ι : Type ?u.46152
π : ι → Type ?u.46157
inst✝² : OrderedSemiring 𝕜
inst✝¹ : AddCommMonoid E
inst✝ : Module 𝕜 E
s : Set E
x y z : E
hx : x ≠ z
hy : y ≠ z
hz : z ∈ [x-[𝕜]y]
⊢ z ∈ openSegment 𝕜 x y

tactic: exact (hz.resolve_left hx.symm).resolve_left hy.symm
state_before: 𝕜 : Type u_2
E : Type u_1
F : Type ?u.46146
G : Type ?u.46149
ι : Type ?u.46152
π : ι → Type ?u.46157
inst✝² : OrderedSemiring 𝕜
inst✝¹ : AddCommMonoid E
inst✝ : Module 𝕜 E
s : Set E
x y z : E
hx : x ≠ z
hy : y ≠ z
hz : z ∈ insert x (insert y (openSegment 𝕜 x y))
⊢ z ∈ openSegment 𝕜 x y
Theorem: LinearMap.range_rangeRestrict
File: Mathlib/LinearAlgebra/Basic.lean

tactic: simp [f.range_codRestrict _]
state_before: R : Type u_1
R₁ : Type ?u.1598122
R₂ : Type ?u.1598125
R₃ : Type ?u.1598128
R₄ : Type ?u.1598131
S : Type ?u.1598134
K : Type ?u.1598137
K₂ : Type ?u.1598140
M : Type u_2
M' : Type ?u.1598146
M₁ : Type ?u.1598149
M₂ : Type u_3
M₃ : Type ?u.1598155
M₄ : Type ?u.1598158
N : Type ?u.1598161
N₂ : Type ?u.1598164
ι : Type ?u.1598167
V : Type ?u.1598170
V₂ : Type ?u.1598173
inst✝⁴ : Semiring R
inst✝³ : AddCommMonoid M
inst✝² : AddCommMonoid M₂
inst✝¹ : Module R M
inst✝ : Module R M₂
f : M →ₗ[R] M₂
⊢ range (rangeRestrict f) = ⊤
Theorem: mul_sub_left_distrib
File: Mathlib/Algebra/Ring/Defs.lean

tactic: simpa only [sub_eq_add_neg, neg_mul_eq_mul_neg] using mul_add a b (-c)
state_before: α : Type u
β : Type v
γ : Type w
R : Type x
inst✝ : NonUnitalNonAssocRing α
a b c : α
⊢ a * (b - c) = a * b - a * c