1337xyz1337xyz/leandojo-benchmark4-v10 huggingface dataset:
Theorem: derived_le_lower_central
File: Mathlib/GroupTheory/Nilpotent.lean

tactic: induction' n with i ih
state_before: G : Type u_1
inst✝¹ : Group G
H : Subgroup G
inst✝ : H.Normal
n : ℕ
⊢ derivedSeries G n ≤ lowerCentralSeries G n
state_after: case zero
G : Type u_1
inst✝¹ : Group G
H : Subgroup G
inst✝ : H.Normal
⊢ derivedSeries G 0 ≤ lowerCentralSeries G 0

case succ
G : Type u_1
inst✝¹ : Group G
H : Subgroup G
inst✝ : H.Normal
i : ℕ
ih : derivedSeries G i ≤ lowerCentralSeries G i
⊢ derivedSeries G (i + 1) ≤ lowerCentralSeries G (i + 1)

tactic: simp
state_before: case zero
G : Type u_1
inst✝¹ : Group G
H : Subgroup G
inst✝ : H.Normal
⊢ derivedSeries G 0 ≤ lowerCentralSeries G 0
state_after: no goals

tactic: apply commutator_mono ih
state_before: case succ
G : Type u_1
inst✝¹ : Group G
H : Subgroup G
inst✝ : H.Normal
i : ℕ
ih : derivedSeries G i ≤ lowerCentralSeries G i
⊢ derivedSeries G (i + 1) ≤ lowerCentralSeries G (i + 1)
state_after: case succ
G : Type u_1
inst✝¹ : Group G
H : Subgroup G
inst✝ : H.Normal
i : ℕ
ih : derivedSeries G i ≤ lowerCentralSeries G i
⊢ derivedSeries G i ≤ ⊤

tactic: simp
state_before: case succ
G : Type u_1
inst✝¹ : Group G
H : Subgroup G
inst✝ : H.Normal
i : ℕ
ih : derivedSeries G i ≤ lowerCentralSeries G i
⊢ derivedSeries G i ≤ ⊤
state_after: no goals
Theorem: MeasureTheory.OuterMeasure.trim_sum_ge
File: Mathlib/MeasureTheory/OuterMeasure/Induced.lean

tactic: simp [trim_eq_iInf]
state_before: α : Type u_1
inst✝ : MeasurableSpace α
m✝ : OuterMeasure α
ι : Type u_2
m : ι → OuterMeasure α
s : Set α
⊢ (sum fun i => (m i).trim) s ≤ (sum m).trim s
state_after: α : Type u_1
inst✝ : MeasurableSpace α
m✝ : OuterMeasure α
ι : Type u_2
m : ι → OuterMeasure α
s : Set α
⊢ ∀ (i : Set α),
    s ⊆ i → MeasurableSet i → ∑' (i : ι), ⨅ t, ⨅ (_ : s ⊆ t), ⨅ (_ : MeasurableSet t), (m i) t ≤ ∑' (i_3 : ι), (m i_3) i

tactic: exact fun t st ht =>
  ENNReal.tsum_le_tsum fun i => iInf_le_of_le t <| iInf_le_of_le st <| iInf_le _ ht
state_before: α : Type u_1
inst✝ : MeasurableSpace α
m✝ : OuterMeasure α
ι : Type u_2
m : ι → OuterMeasure α
s : Set α
⊢ ∀ (i : Set α),
    s ⊆ i → MeasurableSet i → ∑' (i : ι), ⨅ t, ⨅ (_ : s ⊆ t), ⨅ (_ : MeasurableSet t), (m i) t ≤ ∑' (i_3 : ι), (m i_3) i
state_after: no goals
Theorem: Option.map₂_def
File: Mathlib/Data/Option/NAry.lean

tactic: cases a <;> rfl
state_before: α✝ : Type u_1
β✝ : Type u_2
γ✝ : Type u_3
δ : Type u_4
f✝ : α✝ → β✝ → γ✝
a✝ : Option α✝
b✝ : Option β✝
c : Option γ✝
α β γ : Type u
f : α → β → γ
a : Option α
b : Option β
⊢ map₂ f a b = Seq.seq (f <$> a) fun x => b
state_after: no goals
Theorem: ProbabilityTheory.kernel.IndepSets.iInter
File: Mathlib/Probability/Independence/Kernel.lean

tactic: intro t1 t2 ht1 ht2
state_before: α : Type u_1
Ω : Type u_2
ι : Type u_3
_mα : MeasurableSpace α
s : ι → Set (Set Ω)
s' : Set (Set Ω)
_mΩ : MeasurableSpace Ω
κ : ↥(kernel α Ω)
μ : Measure α
h : ∃ n, IndepSets (s n) s' κ μ
⊢ IndepSets (⋂ n, s n) s' κ μ
state_after: α : Type u_1
Ω : Type u_2
ι : Type u_3
_mα : MeasurableSpace α
s : ι → Set (Set Ω)
s' : Set (Set Ω)
_mΩ : MeasurableSpace Ω
κ : ↥(kernel α Ω)
μ : Measure α
h : ∃ n, IndepSets (s n) s' κ μ
t1 t2 : Set Ω
ht1 : t1 ∈ ⋂ n, s n
ht2 : t2 ∈ s'
⊢ ∀ᵐ (a : α) ∂μ, (κ a) (t1 ∩ t2) = (κ a) t1 * (κ a) t2

tactic: cases' h with n h
state_before: α : Type u_1
Ω : Type u_2
ι : Type u_3
_mα : MeasurableSpace α
s : ι → Set (Set Ω)
s' : Set (Set Ω)
_mΩ : MeasurableSpace Ω
κ : ↥(kernel α Ω)
μ : Measure α
h : ∃ n, IndepSets (s n) s' κ μ
t1 t2 : Set Ω
ht1 : t1 ∈ ⋂ n, s n
ht2 : t2 ∈ s'
⊢ ∀ᵐ (a : α) ∂μ, (κ a) (t1 ∩ t2) = (κ a) t1 * (κ a) t2
state_after: case intro
α : Type u_1
Ω : Type u_2
ι : Type u_3
_mα : MeasurableSpace α
s : ι → Set (Set Ω)
s' : Set (Set Ω)
_mΩ : MeasurableSpace Ω
κ : ↥(kernel α Ω)
μ : Measure α
t1 t2 : Set Ω
ht1 : t1 ∈ ⋂ n, s n
ht2 : t2 ∈ s'
n : ι
h : IndepSets (s n) s' κ μ
⊢ ∀ᵐ (a : α) ∂μ, (κ a) (t1 ∩ t2) = (κ a) t1 * (κ a) t2

tactic: exact h t1 t2 (Set.mem_iInter.mp ht1 n) ht2
state_before: case intro
α : Type u_1
Ω : Type u_2
ι : Type u_3
_mα : MeasurableSpace α
s : ι → Set (Set Ω)
s' : Set (Set Ω)
_mΩ : MeasurableSpace Ω
κ : ↥(kernel α Ω)
μ : Measure α
t1 t2 : Set Ω
ht1 : t1 ∈ ⋂ n, s n
ht2 : t2 ∈ s'
n : ι
h : IndepSets (s n) s' κ μ
⊢ ∀ᵐ (a : α) ∂μ, (κ a) (t1 ∩ t2) = (κ a) t1 * (κ a) t2
state_after: no goals
Theorem: Submodule.range_subtype
File: Mathlib/Algebra/Module/Submodule/Range.lean

tactic: simpa using map_comap_subtype p ⊤
state_before: R : Type u_1
R₂ : Type u_2
R₃ : Type u_3
K : Type u_4
K₂ : Type u_5
M : Type u_6
M₂ : Type u_7
M₃ : Type u_8
V : Type u_9
V₂ : Type u_10
inst✝⁷ : Semiring R
inst✝⁶ : Semiring R₂
inst✝⁵ : AddCommMonoid M
inst✝⁴ : AddCommMonoid M₂
inst✝³ : Module R M
inst✝² : Module R₂ M₂
p p' : Submodule R M
q : Submodule R₂ M₂
τ₁₂ : R →+* R₂
F : Type u_11
inst✝¹ : FunLike F M M₂
inst✝ : SemilinearMapClass F τ₁₂ M M₂
⊢ range p.subtype = p
state_after: no goals
Theorem: Equiv.Perm.sign_of_cycleType
File: Mathlib/GroupTheory/Perm/Cycle/Type.lean

tactic: rw [sign_of_cycleType']
state_before: α : Type u_1
inst✝¹ : Fintype α
inst✝ : DecidableEq α
f : Perm α
⊢ sign f = (-1) ^ (f.cycleType.sum + card f.cycleType)
state_after: α : Type u_1
inst✝¹ : Fintype α
inst✝ : DecidableEq α
f : Perm α
⊢ (Multiset.map (fun n => -(-1) ^ n) f.cycleType).prod = (-1) ^ (f.cycleType.sum + card f.cycleType)

tactic: induction' f.cycleType using Multiset.induction_on with a s ihs
state_before: α : Type u_1
inst✝¹ : Fintype α
inst✝ : DecidableEq α
f : Perm α
⊢ (Multiset.map (fun n => -(-1) ^ n) f.cycleType).prod = (-1) ^ (f.cycleType.sum + card f.cycleType)
state_after: case empty
α : Type u_1
inst✝¹ : Fintype α
inst✝ : DecidableEq α
f : Perm α
⊢ (Multiset.map (fun n => -(-1) ^ n) 0).prod = (-1) ^ (Multiset.sum 0 + card 0)

case cons
α : Type u_1
inst✝¹ : Fintype α
inst✝ : DecidableEq α
f : Perm α
a : ℕ
s : Multiset ℕ
ihs : (Multiset.map (fun n => -(-1) ^ n) s).prod = (-1) ^ (s.sum + card s)
⊢ (Multiset.map (fun n => -(-1) ^ n) (a ::ₘ s)).prod = (-1) ^ ((a ::ₘ s).sum + card (a ::ₘ s))

tactic: rfl
state_before: case empty
α : Type u_1
inst✝¹ : Fintype α
inst✝ : DecidableEq α
f : Perm α
⊢ (Multiset.map (fun n => -(-1) ^ n) 0).prod = (-1) ^ (Multiset.sum 0 + card 0)
state_after: no goals

tactic: rw [Multiset.map_cons, Multiset.prod_cons, Multiset.sum_cons, Multiset.card_cons, ihs]
state_before: case cons
α : Type u_1
inst✝¹ : Fintype α
inst✝ : DecidableEq α
f : Perm α
a : ℕ
s : Multiset ℕ
ihs : (Multiset.map (fun n => -(-1) ^ n) s).prod = (-1) ^ (s.sum + card s)
⊢ (Multiset.map (fun n => -(-1) ^ n) (a ::ₘ s)).prod = (-1) ^ ((a ::ₘ s).sum + card (a ::ₘ s))
state_after: case cons
α : Type u_1
inst✝¹ : Fintype α
inst✝ : DecidableEq α
f : Perm α
a : ℕ
s : Multiset ℕ
ihs : (Multiset.map (fun n => -(-1) ^ n) s).prod = (-1) ^ (s.sum + card s)
⊢ -(-1) ^ a * (-1) ^ (s.sum + card s) = (-1) ^ (a + s.sum + (card s + 1))

tactic: simp only [pow_add, pow_one, mul_neg_one, neg_mul, mul_neg, mul_assoc, mul_one]
state_before: case cons
α : Type u_1
inst✝¹ : Fintype α
inst✝ : DecidableEq α
f : Perm α
a : ℕ
s : Multiset ℕ
ihs : (Multiset.map (fun n => -(-1) ^ n) s).prod = (-1) ^ (s.sum + card s)
⊢ -(-1) ^ a * (-1) ^ (s.sum + card s) = (-1) ^ (a + s.sum + (card s + 1))
state_after: no goals
Theorem: finprod_eq_one_of_forall_eq_one
File: Mathlib/Algebra/BigOperators/Finprod.lean

tactic: simp (config := { contextual := true }) [h]
state_before: α : Type u_1
β : Type u_2
ι : Type u_3
G : Type u_4
M : Type u_5
N : Type u_6
inst✝¹ : CommMonoid M
inst✝ : CommMonoid N
f✝ g : α → M
a b : α
s t : Set α
f : α → M
h : ∀ (x : α), f x = 1
⊢ ∏ᶠ (i : α), f i = 1
state_after: no goals
Theorem: Finset.wellFoundedOn_sup
File: Mathlib/Order/WellFoundedSet.lean

tactic: simp
state_before: ι : Type u_1
α : Type u_2
β : Type u_3
γ : Type u_4
π : ι → Type u_5
r : α → α → Prop
inst✝ : IsStrictOrder α r
s : Finset ι
f : ι → Set α
⊢ (∅.sup f).WellFoundedOn r ↔ ∀ i ∈ ∅, (f i).WellFoundedOn r
state_after: no goals

tactic: simp [-sup_set_eq_biUnion, hs]
state_before: ι : Type u_1
α : Type u_2
β : Type u_3
γ : Type u_4
π : ι → Type u_5
r : α → α → Prop
inst✝ : IsStrictOrder α r
s✝ : Finset ι
f : ι → Set α
a : ι
s : Finset ι
ha : a ∉ s
hs : (s.sup f).WellFoundedOn r ↔ ∀ i ∈ s, (f i).WellFoundedOn r
⊢ ((cons a s ha).sup f).WellFoundedOn r ↔ ∀ i ∈ cons a s ha, (f i).WellFoundedOn r
state_after: no goals
Theorem: StieltjesFunction.isProbabilityMeasure
File: Mathlib/MeasureTheory/Measure/Stieltjes.lean

tactic: simp [f.measure_univ hf_bot hf_top]
state_before: f : StieltjesFunction
hf_bot : Tendsto (↑f) atBot (𝓝 0)
hf_top : Tendsto (↑f) atTop (𝓝 1)
⊢ f.measure univ = 1
state_after: no goals
Theorem: Mathlib.Tactic.Ring.add_pf_add_overlap_zero
File: Mathlib/Tactic/Ring/Basic.lean

tactic: subst_vars
state_before: u : Lean.Level
R : Type u_1
α : Q(Type u)
sα : Q(CommSemiring «$α»)
inst✝ : CommSemiring R
a₁ b₁ a₂ b₂ c : R
h : IsNat (a₁ + b₁) 0
h₄ : a₂ + b₂ = c
⊢ a₁ + a₂ + (b₁ + b₂) = c
state_after: u : Lean.Level
R : Type u_1
α : Q(Type u)
sα : Q(CommSemiring «$α»)
inst✝ : CommSemiring R
a₁ b₁ a₂ b₂ : R
h : IsNat (a₁ + b₁) 0
⊢ a₁ + a₂ + (b₁ + b₂) = a₂ + b₂

tactic: rw [add_add_add_comm, h.1, Nat.cast_zero, add_pf_zero_add]
state_before: u : Lean.Level
R : Type u_1
α : Q(Type u)
sα : Q(CommSemiring «$α»)
inst✝ : CommSemiring R
a₁ b₁ a₂ b₂ : R
h : IsNat (a₁ + b₁) 0
⊢ a₁ + a₂ + (b₁ + b₂) = a₂ + b₂
state_after: no goals
Theorem: lineDeriv_neg
File: Mathlib/Analysis/Calculus/LineDeriv/Basic.lean

tactic: rw [← neg_one_smul (R := 𝕜) v, lineDeriv_smul, neg_one_smul]
state_before: 𝕜 : Type u_1
inst✝⁴ : NontriviallyNormedField 𝕜
F : Type u_2
inst✝³ : NormedAddCommGroup F
inst✝² : NormedSpace 𝕜 F
E : Type u_3
inst✝¹ : AddCommGroup E
inst✝ : Module 𝕜 E
f : E → F
s : Set E
x v : E
f' : F
⊢ lineDeriv 𝕜 f x (-v) = -lineDeriv 𝕜 f x v
state_after: no goals
Theorem: equicontinuousOn_iff_continuousOn
File: Mathlib/Topology/UniformSpace/Equicontinuity.lean

tactic: simp_rw [EquicontinuousOn, ContinuousOn, equicontinuousWithinAt_iff_continuousWithinAt]
state_before: ι : Type u_1
κ : Type u_2
X : Type u_3
X' : Type u_4
Y : Type u_5
Z : Type u_6
α : Type u_7
α' : Type u_8
β : Type u_9
β' : Type u_10
γ : Type u_11
𝓕 : Type u_12
tX : TopologicalSpace X
tY : TopologicalSpace Y
tZ : TopologicalSpace Z
uα : UniformSpace α
uβ : UniformSpace β
uγ : UniformSpace γ
F : ι → X → α
S : Set X
⊢ EquicontinuousOn F S ↔ ContinuousOn (⇑UniformFun.ofFun ∘ swap F) S
state_after: no goals
Theorem: ProbabilityTheory.truncation_zero
File: Mathlib/Probability/StrongLaw.lean

tactic: simp [truncation]
state_before: α : Type u_1
m : MeasurableSpace α
μ : Measure α
f✝ f : α → ℝ
⊢ truncation f 0 = 0
state_after: α : Type u_1
m : MeasurableSpace α
μ : Measure α
f✝ f : α → ℝ
⊢ (fun x => 0) ∘ f = 0

tactic: rfl
state_before: α : Type u_1
m : MeasurableSpace α
μ : Measure α
f✝ f : α → ℝ
⊢ (fun x => 0) ∘ f = 0
state_after: no goals
Theorem: Finsupp.update_eq_single_add_erase
File: Mathlib/Data/Finsupp/Defs.lean

tactic: ext j
state_before: α : Type u_1
β : Type u_2
γ : Type u_3
ι : Type u_4
M : Type u_5
M' : Type u_6
N : Type u_7
P : Type u_8
G : Type u_9
H : Type u_10
R : Type u_11
S : Type u_12
inst✝ : AddZeroClass M
f : α →₀ M
a : α
b : M
⊢ f.update a b = single a b + erase a f
state_after: case h
α : Type u_1
β : Type u_2
γ : Type u_3
ι : Type u_4
M : Type u_5
M' : Type u_6
N : Type u_7
P : Type u_8
G : Type u_9
H : Type u_10
R : Type u_11
S : Type u_12
inst✝ : AddZeroClass M
f : α →₀ M
a : α
b : M
j : α
⊢ (f.update a b) j = (single a b + erase a f) j

tactic: rcases eq_or_ne a j with (rfl | h)
state_before: case h
α : Type u_1
β : Type u_2
γ : Type u_3
ι : Type u_4
M : Type u_5
M' : Type u_6
N : Type u_7
P : Type u_8
G : Type u_9
H : Type u_10
R : Type u_11
S : Type u_12
inst✝ : AddZeroClass M
f : α →₀ M
a : α
b : M
j : α
⊢ (f.update a b) j = (single a b + erase a f) j
state_after: case h.inl
α : Type u_1
β : Type u_2
γ : Type u_3
ι : Type u_4
M : Type u_5
M' : Type u_6
N : Type u_7
P : Type u_8
G : Type u_9
H : Type u_10
R : Type u_11
S : Type u_12
inst✝ : AddZeroClass M
f : α →₀ M
a : α
b : M
⊢ (f.update a b) a = (single a b + erase a f) a

case h.inr
α : Type u_1
β : Type u_2
γ : Type u_3
ι : Type u_4
M : Type u_5
M' : Type u_6
N : Type u_7
P : Type u_8
G : Type u_9
H : Type u_10
R : Type u_11
S : Type u_12
inst✝ : AddZeroClass M
f : α →₀ M
a : α
b : M
j : α
h : a ≠ j
⊢ (f.update a b) j = (single a b + erase a f) j

tactic: simp
state_before: case h.inl
α : Type u_1
β : Type u_2
γ : Type u_3
ι : Type u_4
M : Type u_5
M' : Type u_6
N : Type u_7
P : Type u_8
G : Type u_9
H : Type u_10
R : Type u_11
S : Type u_12
inst✝ : AddZeroClass M
f : α →₀ M
a : α
b : M
⊢ (f.update a b) a = (single a b + erase a f) a
state_after: no goals

tactic: simp [Function.update_noteq h.symm, single_apply, h, erase_ne, h.symm]
state_before: case h.inr
α : Type u_1
β : Type u_2
γ : Type u_3
ι : Type u_4
M : Type u_5
M' : Type u_6
N : Type u_7
P : Type u_8
G : Type u_9
H : Type u_10
R : Type u_11
S : Type u_12
inst✝ : AddZeroClass M
f : α →₀ M
a : α
b : M
j : α
h : a ≠ j
⊢ (f.update a b) j = (single a b + erase a f) j
state_after: no goals
Theorem: Finset.lcm_insert
File: Mathlib/Algebra/GCDMonoid/Finset.lean

tactic: by_cases h : b ∈ s
state_before: ι : Type u_1
α : Type u_2
β : Type u_3
γ : Type u_4
inst✝² : CancelCommMonoidWithZero α
inst✝¹ : NormalizedGCDMonoid α
s s₁ s₂ : Finset β
f : β → α
inst✝ : DecidableEq β
b : β
⊢ (insert b s).lcm f = GCDMonoid.lcm (f b) (s.lcm f)
state_after: case pos
ι : Type u_1
α : Type u_2
β : Type u_3
γ : Type u_4
inst✝² : CancelCommMonoidWithZero α
inst✝¹ : NormalizedGCDMonoid α
s s₁ s₂ : Finset β
f : β → α
inst✝ : DecidableEq β
b : β
h : b ∈ s
⊢ (insert b s).lcm f = GCDMonoid.lcm (f b) (s.lcm f)

case neg
ι : Type u_1
α : Type u_2
β : Type u_3
γ : Type u_4
inst✝² : CancelCommMonoidWithZero α
inst✝¹ : NormalizedGCDMonoid α
s s₁ s₂ : Finset β
f : β → α
inst✝ : DecidableEq β
b : β
h : b ∉ s
⊢ (insert b s).lcm f = GCDMonoid.lcm (f b) (s.lcm f)

tactic: apply fold_insert h
state_before: case neg
ι : Type u_1
α : Type u_2
β : Type u_3
γ : Type u_4
inst✝² : CancelCommMonoidWithZero α
inst✝¹ : NormalizedGCDMonoid α
s s₁ s₂ : Finset β
f : β → α
inst✝ : DecidableEq β
b : β
h : b ∉ s
⊢ (insert b s).lcm f = GCDMonoid.lcm (f b) (s.lcm f)
state_after: no goals

tactic: rw [insert_eq_of_mem h,
  (lcm_eq_right_iff (f b) (s.lcm f) (Multiset.normalize_lcm (s.1.map f))).2 (dvd_lcm h)]
state_before: case pos
ι : Type u_1
α : Type u_2
β : Type u_3
γ : Type u_4
inst✝² : CancelCommMonoidWithZero α
inst✝¹ : NormalizedGCDMonoid α
s s₁ s₂ : Finset β
f : β → α
inst✝ : DecidableEq β
b : β
h : b ∈ s
⊢ (insert b s).lcm f = GCDMonoid.lcm (f b) (s.lcm f)
state_after: no goals
Theorem: Ordinal.mul_sub
File: Mathlib/SetTheory/Ordinal/Arithmetic.lean

tactic: simp only [a0, zero_mul, sub_self]
state_before: α : Type u_1
β : Type u_2
γ : Type u_3
r : α → α → Prop
s : β → β → Prop
t : γ → γ → Prop
a b c : Ordinal.{u_4}
a0 : a = 0
⊢ a * (b - c) = a * b - a * c
state_after: no goals

tactic: rw [sub_le, ← le_div a0, sub_le, ← le_div a0, mul_add_div _ a0]
state_before: α : Type u_1
β : Type u_2
γ : Type u_3
r : α → α → Prop
s : β → β → Prop
t : γ → γ → Prop
a b c : Ordinal.{u_4}
a0 : ¬a = 0
d : Ordinal.{u_4}
⊢ a * (b - c) ≤ d ↔ a * b - a * c ≤ d
state_after: no goals
Theorem: continuousWithinAt_singleton
File: Mathlib/Topology/ContinuousOn.lean

tactic: simp only [ContinuousWithinAt, nhdsWithin_singleton, tendsto_pure_nhds]
state_before: α : Type u_1
β : Type u_2
γ : Type u_3
δ : Type u_4
inst✝⁴ : TopologicalSpace α
ι : Type u_5
π : ι → Type u_6
inst✝³ : (i : ι) → TopologicalSpace (π i)
inst✝² : TopologicalSpace β
inst✝¹ : TopologicalSpace γ
inst✝ : TopologicalSpace δ
f : α → β
x : α
⊢ ContinuousWithinAt f {x} x
state_after: no goals
Theorem: Ordnode.Valid'.balanceL
File: Mathlib/Data/Ordmap/Ordset.lean

tactic: rw [balanceL_eq_balance' hl.3 hr.3 hl.2 hr.2 H]
state_before: α : Type u_1
inst✝ : Preorder α
l : Ordnode α
x : α
r : Ordnode α
o₁ : WithBot α
o₂ : WithTop α
hl : Valid' o₁ l ↑x
hr : Valid' (↑x) r o₂
H : (∃ l', Raised l' l.size ∧ BalancedSz l' r.size) ∨ ∃ r', Raised r.size r' ∧ BalancedSz l.size r'
⊢ Valid' o₁ (l.balanceL x r) o₂
state_after: α : Type u_1
inst✝ : Preorder α
l : Ordnode α
x : α
r : Ordnode α
o₁ : WithBot α
o₂ : WithTop α
hl : Valid' o₁ l ↑x
hr : Valid' (↑x) r o₂
H : (∃ l', Raised l' l.size ∧ BalancedSz l' r.size) ∨ ∃ r', Raised r.size r' ∧ BalancedSz l.size r'
⊢ Valid' o₁ (l.balance' x r) o₂

tactic: refine hl.balance' hr ?_
state_before: α : Type u_1
inst✝ : Preorder α
l : Ordnode α
x : α
r : Ordnode α
o₁ : WithBot α
o₂ : WithTop α
hl : Valid' o₁ l ↑x
hr : Valid' (↑x) r o₂
H : (∃ l', Raised l' l.size ∧ BalancedSz l' r.size) ∨ ∃ r', Raised r.size r' ∧ BalancedSz l.size r'
⊢ Valid' o₁ (l.balance' x r) o₂
state_after: α : Type u_1
inst✝ : Preorder α
l : Ordnode α
x : α
r : Ordnode α
o₁ : WithBot α
o₂ : WithTop α
hl : Valid' o₁ l ↑x
hr : Valid' (↑x) r o₂
H : (∃ l', Raised l' l.size ∧ BalancedSz l' r.size) ∨ ∃ r', Raised r.size r' ∧ BalancedSz l.size r'
⊢ ∃ l' r', BalancedSz l' r' ∧ (l.size.dist l' ≤ 1 ∧ r.size = r' ∨ r.size.dist r' ≤ 1 ∧ l.size = l')

tactic: rcases H with (⟨l', e, H⟩ | ⟨r', e, H⟩)
state_before: α : Type u_1
inst✝ : Preorder α
l : Ordnode α
x : α
r : Ordnode α
o₁ : WithBot α
o₂ : WithTop α
hl : Valid' o₁ l ↑x
hr : Valid' (↑x) r o₂
H : (∃ l', Raised l' l.size ∧ BalancedSz l' r.size) ∨ ∃ r', Raised r.size r' ∧ BalancedSz l.size r'
⊢ ∃ l' r', BalancedSz l' r' ∧ (l.size.dist l' ≤ 1 ∧ r.size = r' ∨ r.size.dist r' ≤ 1 ∧ l.size = l')
state_after: case inl.intro.intro
α : Type u_1
inst✝ : Preorder α
l : Ordnode α
x : α
r : Ordnode α
o₁ : WithBot α
o₂ : WithTop α
hl : Valid' o₁ l ↑x
hr : Valid' (↑x) r o₂
l' : ℕ
e : Raised l' l.size
H : BalancedSz l' r.size
⊢ ∃ l' r', BalancedSz l' r' ∧ (l.size.dist l' ≤ 1 ∧ r.size = r' ∨ r.size.dist r' ≤ 1 ∧ l.size = l')

case inr.intro.intro
α : Type u_1
inst✝ : Preorder α
l : Ordnode α
x : α
r : Ordnode α
o₁ : WithBot α
o₂ : WithTop α
hl : Valid' o₁ l ↑x
hr : Valid' (↑x) r o₂
r' : ℕ
e : Raised r.size r'
H : BalancedSz l.size r'
⊢ ∃ l' r', BalancedSz l' r' ∧ (l.size.dist l' ≤ 1 ∧ r.size = r' ∨ r.size.dist r' ≤ 1 ∧ l.size = l')

tactic: exact ⟨_, _, H, Or.inl ⟨e.dist_le', rfl⟩⟩
state_before: case inl.intro.intro
α : Type u_1
inst✝ : Preorder α
l : Ordnode α
x : α
r : Ordnode α
o₁ : WithBot α
o₂ : WithTop α
hl : Valid' o₁ l ↑x
hr : Valid' (↑x) r o₂
l' : ℕ
e : Raised l' l.size
H : BalancedSz l' r.size
⊢ ∃ l' r', BalancedSz l' r' ∧ (l.size.dist l' ≤ 1 ∧ r.size = r' ∨ r.size.dist r' ≤ 1 ∧ l.size = l')
state_after: no goals

tactic: exact ⟨_, _, H, Or.inr ⟨e.dist_le, rfl⟩⟩
state_before: case inr.intro.intro
α : Type u_1
inst✝ : Preorder α
l : Ordnode α
x : α
r : Ordnode α
o₁ : WithBot α
o₂ : WithTop α
hl : Valid' o₁ l ↑x
hr : Valid' (↑x) r o₂
r' : ℕ
e : Raised r.size r'
H : BalancedSz l.size r'
⊢ ∃ l' r', BalancedSz l' r' ∧ (l.size.dist l' ≤ 1 ∧ r.size = r' ∨ r.size.dist r' ≤ 1 ∧ l.size = l')
state_after: no goals
Theorem: FormalMultilinearSeries.hasFiniteFPowerSeriesOnBall_of_finite
File: Mathlib/Analysis/Analytic/CPolynomial.lean

tactic: rw [radius_eq_top_of_forall_image_add_eq_zero p n fun _ => hn _ (Nat.le_add_left _ _)]
state_before: 𝕜 : Type u_1
E : Type u_2
F : Type u_3
G : Type u_4
inst✝⁶ : NontriviallyNormedField 𝕜
inst✝⁵ : NormedAddCommGroup E
inst✝⁴ : NormedSpace 𝕜 E
inst✝³ : NormedAddCommGroup F
inst✝² : NormedSpace 𝕜 F
inst✝¹ : NormedAddCommGroup G
inst✝ : NormedSpace 𝕜 G
f g : E → F
p✝ pf pg : FormalMultilinearSeries 𝕜 E F
x : E
r r' : ℝ≥0∞
n✝ m : ℕ
p : FormalMultilinearSeries 𝕜 E F
n : ℕ
hn : ∀ (m : ℕ), n ≤ m → p m = 0
⊢ ⊤ ≤ p.radius
state_after: no goals

tactic: rw [zero_add]
state_before: 𝕜 : Type u_1
E : Type u_2
F : Type u_3
G : Type u_4
inst✝⁶ : NontriviallyNormedField 𝕜
inst✝⁵ : NormedAddCommGroup E
inst✝⁴ : NormedSpace 𝕜 E
inst✝³ : NormedAddCommGroup F
inst✝² : NormedSpace 𝕜 F
inst✝¹ : NormedAddCommGroup G
inst✝ : NormedSpace 𝕜 G
f g : E → F
p✝ pf pg : FormalMultilinearSeries 𝕜 E F
x : E
r r' : ℝ≥0∞
n✝ m : ℕ
p : FormalMultilinearSeries 𝕜 E F
n : ℕ
hn : ∀ (m : ℕ), n ≤ m → p m = 0
y : E
x✝ : y ∈ EMetric.ball 0 ⊤
⊢ HasSum (fun n => (p n) fun x => y) (p.sum (0 + y))
state_after: 𝕜 : Type u_1
E : Type u_2
F : Type u_3
G : Type u_4
inst✝⁶ : NontriviallyNormedField 𝕜
inst✝⁵ : NormedAddCommGroup E
inst✝⁴ : NormedSpace 𝕜 E
inst✝³ : NormedAddCommGroup F
inst✝² : NormedSpace 𝕜 F
inst✝¹ : NormedAddCommGroup G
inst✝ : NormedSpace 𝕜 G
f g : E → F
p✝ pf pg : FormalMultilinearSeries 𝕜 E F
x : E
r r' : ℝ≥0∞
n✝ m : ℕ
p : FormalMultilinearSeries 𝕜 E F
n : ℕ
hn : ∀ (m : ℕ), n ≤ m → p m = 0
y : E
x✝ : y ∈ EMetric.ball 0 ⊤
⊢ HasSum (fun n => (p n) fun x => y) (p.sum y)

tactic: exact p.hasSum_of_finite hn y
state_before: 𝕜 : Type u_1
E : Type u_2
F : Type u_3
G : Type u_4
inst✝⁶ : NontriviallyNormedField 𝕜
inst✝⁵ : NormedAddCommGroup E
inst✝⁴ : NormedSpace 𝕜 E
inst✝³ : NormedAddCommGroup F
inst✝² : NormedSpace 𝕜 F
inst✝¹ : NormedAddCommGroup G
inst✝ : NormedSpace 𝕜 G
f g : E → F
p✝ pf pg : FormalMultilinearSeries 𝕜 E F
x : E
r r' : ℝ≥0∞
n✝ m : ℕ
p : FormalMultilinearSeries 𝕜 E F
n : ℕ
hn : ∀ (m : ℕ), n ≤ m → p m = 0
y : E
x✝ : y ∈ EMetric.ball 0 ⊤
⊢ HasSum (fun n => (p n) fun x => y) (p.sum y)
state_after: no goals
Theorem: Module.Flat.of_linearEquiv
File: Mathlib/RingTheory/Flat/Basic.lean

tactic: have h : e.symm.toLinearMap.comp e.toLinearMap = LinearMap.id := by simp
state_before: R : Type u
M : Type v
inst✝⁴ : CommRing R
inst✝³ : AddCommGroup M
inst✝² : Module R M
N : Type w
inst✝¹ : AddCommGroup N
inst✝ : Module R N
f : Flat R M
e : N ≃ₗ[R] M
⊢ Flat R N
state_after: R : Type u
M : Type v
inst✝⁴ : CommRing R
inst✝³ : AddCommGroup M
inst✝² : Module R M
N : Type w
inst✝¹ : AddCommGroup N
inst✝ : Module R N
f : Flat R M
e : N ≃ₗ[R] M
h : ↑e.symm ∘ₗ ↑e = LinearMap.id
⊢ Flat R N

tactic: exact of_retract _ _ _ e.toLinearMap e.symm.toLinearMap h
state_before: R : Type u
M : Type v
inst✝⁴ : CommRing R
inst✝³ : AddCommGroup M
inst✝² : Module R M
N : Type w
inst✝¹ : AddCommGroup N
inst✝ : Module R N
f : Flat R M
e : N ≃ₗ[R] M
h : ↑e.symm ∘ₗ ↑e = LinearMap.id
⊢ Flat R N
state_after: no goals

tactic: simp
state_before: R : Type u
M : Type v
inst✝⁴ : CommRing R
inst✝³ : AddCommGroup M
inst✝² : Module R M
N : Type w
inst✝¹ : AddCommGroup N
inst✝ : Module R N
f : Flat R M
e : N ≃ₗ[R] M
⊢ ↑e.symm ∘ₗ ↑e = LinearMap.id
state_after: no goals
Theorem: Primrec.list_getD
File: Mathlib/Computability/Primrec.lean

tactic: simp only [List.getD_eq_getD_get?]
state_before: α : Type u_1
β : Type u_2
γ : Type u_3
σ : Type u_4
inst✝³ : Primcodable α
inst✝² : Primcodable β
inst✝¹ : Primcodable γ
inst✝ : Primcodable σ
d : α
⊢ Primrec₂ fun l n => l.getD n d
state_after: α : Type u_1
β : Type u_2
γ : Type u_3
σ : Type u_4
inst✝³ : Primcodable α
inst✝² : Primcodable β
inst✝¹ : Primcodable γ
inst✝ : Primcodable σ
d : α
⊢ Primrec₂ fun l n => (l.get? n).getD d

tactic: exact option_getD.comp₂ list_get? (const _)
state_before: α : Type u_1
β : Type u_2
γ : Type u_3
σ : Type u_4
inst✝³ : Primcodable α
inst✝² : Primcodable β
inst✝¹ : Primcodable γ
inst✝ : Primcodable σ
d : α
⊢ Primrec₂ fun l n => (l.get? n).getD d
state_after: no goals
Theorem: hasDerivAt_bernoulliFun
File: Mathlib/NumberTheory/ZetaValues.lean

tactic: convert ((Polynomial.bernoulli k).map <| algebraMap ℚ ℝ).hasDerivAt x using 1
state_before: k : ℕ
x : ℝ
⊢ HasDerivAt (bernoulliFun k) (↑k * bernoulliFun (k - 1) x) x
state_after: case h.e'_7
k : ℕ
x : ℝ
⊢ ↑k * bernoulliFun (k - 1) x =
    Polynomial.eval x (Polynomial.derivative (Polynomial.map (algebraMap ℚ ℝ) (Polynomial.bernoulli k)))

tactic: simp only [bernoulliFun, Polynomial.derivative_map, Polynomial.derivative_bernoulli k,
  Polynomial.map_mul, Polynomial.map_natCast, Polynomial.eval_mul, Polynomial.eval_natCast]
state_before: case h.e'_7
k : ℕ
x : ℝ
⊢ ↑k * bernoulliFun (k - 1) x =
    Polynomial.eval x (Polynomial.derivative (Polynomial.map (algebraMap ℚ ℝ) (Polynomial.bernoulli k)))
state_after: no goals