1337xyz1337xyz/leandojo-benchmark4-v10 huggingface dataset:
Theorem: Matrix.nnnorm_le_iff
File: Mathlib/Analysis/Matrix.lean

tactic: simp_rw [nnnorm_def, pi_nnnorm_le_iff]
state_before: R : Type u_1
l : Type u_2
m : Type u_3
n : Type u_4
α : Type u_5
β : Type u_6
ι : Type u_7
inst✝⁵ : Fintype l
inst✝⁴ : Fintype m
inst✝³ : Fintype n
inst✝² : Unique ι
inst✝¹ : SeminormedAddCommGroup α
inst✝ : SeminormedAddCommGroup β
r : ℝ≥0
A : Matrix m n α
⊢ ‖A‖₊ ≤ r ↔ ∀ (i : m) (j : n), ‖A i j‖₊ ≤ r
state_after: no goals
Theorem: Multiset.Nat.antidiagonal_succ'
File: Mathlib/Data/Multiset/NatAntidiagonal.lean

tactic: rw [antidiagonal, List.Nat.antidiagonal_succ', ← coe_add, add_comm, antidiagonal, map_coe,
  coe_add, List.singleton_append, cons_coe]
state_before: n : ℕ
⊢ antidiagonal (n + 1) = (n + 1, 0) ::ₘ map (Prod.map id Nat.succ) (antidiagonal n)
state_after: no goals
Theorem: MeasureTheory.IsProjectiveMeasureFamily.measure_univ_eq_of_subset
File: Mathlib/MeasureTheory/Constructions/Projective.lean

tactic: have : (univ : Set (∀ i : I, α i)) =
    (fun x : ∀ i : I, α i ↦ fun i : J ↦ x ⟨i, hJI i.2⟩) ⁻¹' (univ : Set (∀ i : J, α i)) := by
  rw [preimage_univ]
state_before: ι : Type u_1
α : ι → Type u_2
inst✝ : (i : ι) → MeasurableSpace (α i)
P : (J : Finset ι) → Measure ((j : { x // x ∈ J }) → α ↑j)
I J : Finset ι
hP : IsProjectiveMeasureFamily P
hJI : J ⊆ I
⊢ (P I) univ = (P J) univ
state_after: ι : Type u_1
α : ι → Type u_2
inst✝ : (i : ι) → MeasurableSpace (α i)
P : (J : Finset ι) → Measure ((j : { x // x ∈ J }) → α ↑j)
I J : Finset ι
hP : IsProjectiveMeasureFamily P
hJI : J ⊆ I
this : univ = (fun x i => x ⟨↑i, ⋯⟩) ⁻¹' univ
⊢ (P I) univ = (P J) univ

tactic: rw [this, ← Measure.map_apply _ MeasurableSet.univ]
state_before: ι : Type u_1
α : ι → Type u_2
inst✝ : (i : ι) → MeasurableSpace (α i)
P : (J : Finset ι) → Measure ((j : { x // x ∈ J }) → α ↑j)
I J : Finset ι
hP : IsProjectiveMeasureFamily P
hJI : J ⊆ I
this : univ = (fun x i => x ⟨↑i, ⋯⟩) ⁻¹' univ
⊢ (P I) univ = (P J) univ
state_after: ι : Type u_1
α : ι → Type u_2
inst✝ : (i : ι) → MeasurableSpace (α i)
P : (J : Finset ι) → Measure ((j : { x // x ∈ J }) → α ↑j)
I J : Finset ι
hP : IsProjectiveMeasureFamily P
hJI : J ⊆ I
this : univ = (fun x i => x ⟨↑i, ⋯⟩) ⁻¹' univ
⊢ (Measure.map (fun x i => x ⟨↑i, ⋯⟩) (P I)) univ = (P J) univ

ι : Type u_1
α : ι → Type u_2
inst✝ : (i : ι) → MeasurableSpace (α i)
P : (J : Finset ι) → Measure ((j : { x // x ∈ J }) → α ↑j)
I J : Finset ι
hP : IsProjectiveMeasureFamily P
hJI : J ⊆ I
this : univ = (fun x i => x ⟨↑i, ⋯⟩) ⁻¹' univ
⊢ Measurable fun x i => x ⟨↑i, ⋯⟩

tactic: rw [preimage_univ]
state_before: ι : Type u_1
α : ι → Type u_2
inst✝ : (i : ι) → MeasurableSpace (α i)
P : (J : Finset ι) → Measure ((j : { x // x ∈ J }) → α ↑j)
I J : Finset ι
hP : IsProjectiveMeasureFamily P
hJI : J ⊆ I
⊢ univ = (fun x i => x ⟨↑i, ⋯⟩) ⁻¹' univ
state_after: no goals

tactic: rw [hP I J hJI]
state_before: ι : Type u_1
α : ι → Type u_2
inst✝ : (i : ι) → MeasurableSpace (α i)
P : (J : Finset ι) → Measure ((j : { x // x ∈ J }) → α ↑j)
I J : Finset ι
hP : IsProjectiveMeasureFamily P
hJI : J ⊆ I
this : univ = (fun x i => x ⟨↑i, ⋯⟩) ⁻¹' univ
⊢ (Measure.map (fun x i => x ⟨↑i, ⋯⟩) (P I)) univ = (P J) univ
state_after: no goals

tactic: exact measurable_pi_lambda _ (fun _ ↦ measurable_pi_apply _)
state_before: ι : Type u_1
α : ι → Type u_2
inst✝ : (i : ι) → MeasurableSpace (α i)
P : (J : Finset ι) → Measure ((j : { x // x ∈ J }) → α ↑j)
I J : Finset ι
hP : IsProjectiveMeasureFamily P
hJI : J ⊆ I
this : univ = (fun x i => x ⟨↑i, ⋯⟩) ⁻¹' univ
⊢ Measurable fun x i => x ⟨↑i, ⋯⟩
state_after: no goals
Theorem: Function.Antiperiodic.div
File: Mathlib/Algebra/Periodic.lean

tactic: simp_all [neg_div_neg_eq]
state_before: α : Type u_1
β : Type u_2
γ : Type u_3
f g : α → β
c c₁ c₂ x : α
inst✝² : Add α
inst✝¹ : DivisionMonoid β
inst✝ : HasDistribNeg β
hf : Antiperiodic f c
hg : Antiperiodic g c
⊢ Periodic (f / g) c
state_after: no goals
Theorem: HomogeneousLocalization.den_smul_val
File: Mathlib/RingTheory/GradedAlgebra/HomogeneousLocalization.lean

tactic: rw [eq_num_div_den, Localization.mk_eq_mk', IsLocalization.smul_mk']
state_before: ι : Type u_1
R : Type u_2
A : Type u_3
inst✝⁵ : AddCommMonoid ι
inst✝⁴ : DecidableEq ι
inst✝³ : CommRing R
inst✝² : CommRing A
inst✝¹ : Algebra R A
𝒜 : ι → Submodule R A
inst✝ : GradedAlgebra 𝒜
x : Submonoid A
f : HomogeneousLocalization 𝒜 x
⊢ f.den • f.val = (algebraMap A (at x)) f.num
state_after: ι : Type u_1
R : Type u_2
A : Type u_3
inst✝⁵ : AddCommMonoid ι
inst✝⁴ : DecidableEq ι
inst✝³ : CommRing R
inst✝² : CommRing A
inst✝¹ : Algebra R A
𝒜 : ι → Submodule R A
inst✝ : GradedAlgebra 𝒜
x : Submonoid A
f : HomogeneousLocalization 𝒜 x
⊢ IsLocalization.mk' (at x) (f.den * f.num) ⟨f.den, ⋯⟩ = (algebraMap A (at x)) f.num

tactic: exact IsLocalization.mk'_mul_cancel_left _ ⟨_, _⟩
state_before: ι : Type u_1
R : Type u_2
A : Type u_3
inst✝⁵ : AddCommMonoid ι
inst✝⁴ : DecidableEq ι
inst✝³ : CommRing R
inst✝² : CommRing A
inst✝¹ : Algebra R A
𝒜 : ι → Submodule R A
inst✝ : GradedAlgebra 𝒜
x : Submonoid A
f : HomogeneousLocalization 𝒜 x
⊢ IsLocalization.mk' (at x) (f.den * f.num) ⟨f.den, ⋯⟩ = (algebraMap A (at x)) f.num
state_after: no goals
Theorem: himp_triangle
File: Mathlib/Order/Heyting/Basic.lean

tactic: rw [le_himp_iff, inf_right_comm, ← le_himp_iff]
state_before: ι : Type u_1
α : Type u_2
β : Type u_3
inst✝ : GeneralizedHeytingAlgebra α
a✝ b✝ c✝ d a b c : α
⊢ (a ⇨ b) ⊓ (b ⇨ c) ≤ a ⇨ c
state_after: ι : Type u_1
α : Type u_2
β : Type u_3
inst✝ : GeneralizedHeytingAlgebra α
a✝ b✝ c✝ d a b c : α
⊢ (a ⇨ b) ⊓ a ≤ (b ⇨ c) ⇨ c

tactic: exact himp_inf_le.trans le_himp_himp
state_before: ι : Type u_1
α : Type u_2
β : Type u_3
inst✝ : GeneralizedHeytingAlgebra α
a✝ b✝ c✝ d a b c : α
⊢ (a ⇨ b) ⊓ a ≤ (b ⇨ c) ⇨ c
state_after: no goals
Theorem: Ideal.IsHomogeneous.mul
File: Mathlib/RingTheory/GradedAlgebra/HomogeneousIdeal.lean

tactic: rw [Ideal.IsHomogeneous.iff_exists] at HI HJ ⊢
state_before: ι : Type u_1
σ : Type u_2
R : Type u_3
A : Type u_4
inst✝⁵ : CommSemiring A
inst✝⁴ : DecidableEq ι
inst✝³ : AddMonoid ι
inst✝² : SetLike σ A
inst✝¹ : AddSubmonoidClass σ A
𝒜 : ι → σ
inst✝ : GradedRing 𝒜
I✝ I J : Ideal A
HI : IsHomogeneous 𝒜 I
HJ : IsHomogeneous 𝒜 J
⊢ IsHomogeneous 𝒜 (I * J)
state_after: ι : Type u_1
σ : Type u_2
R : Type u_3
A : Type u_4
inst✝⁵ : CommSemiring A
inst✝⁴ : DecidableEq ι
inst✝³ : AddMonoid ι
inst✝² : SetLike σ A
inst✝¹ : AddSubmonoidClass σ A
𝒜 : ι → σ
inst✝ : GradedRing 𝒜
I✝ I J : Ideal A
HI : ∃ S, I = span (Subtype.val '' S)
HJ : ∃ S, J = span (Subtype.val '' S)
⊢ ∃ S, I * J = span (Subtype.val '' S)

tactic: obtain ⟨⟨s₁, rfl⟩, ⟨s₂, rfl⟩⟩ := HI, HJ
state_before: ι : Type u_1
σ : Type u_2
R : Type u_3
A : Type u_4
inst✝⁵ : CommSemiring A
inst✝⁴ : DecidableEq ι
inst✝³ : AddMonoid ι
inst✝² : SetLike σ A
inst✝¹ : AddSubmonoidClass σ A
𝒜 : ι → σ
inst✝ : GradedRing 𝒜
I✝ I J : Ideal A
HI : ∃ S, I = span (Subtype.val '' S)
HJ : ∃ S, J = span (Subtype.val '' S)
⊢ ∃ S, I * J = span (Subtype.val '' S)
state_after: case intro.intro
ι : Type u_1
σ : Type u_2
R : Type u_3
A : Type u_4
inst✝⁵ : CommSemiring A
inst✝⁴ : DecidableEq ι
inst✝³ : AddMonoid ι
inst✝² : SetLike σ A
inst✝¹ : AddSubmonoidClass σ A
𝒜 : ι → σ
inst✝ : GradedRing 𝒜
I : Ideal A
s₁ s₂ : Set ↥(homogeneousSubmonoid 𝒜)
⊢ ∃ S, span (Subtype.val '' s₁) * span (Subtype.val '' s₂) = span (Subtype.val '' S)

tactic: rw [Ideal.span_mul_span']
state_before: case intro.intro
ι : Type u_1
σ : Type u_2
R : Type u_3
A : Type u_4
inst✝⁵ : CommSemiring A
inst✝⁴ : DecidableEq ι
inst✝³ : AddMonoid ι
inst✝² : SetLike σ A
inst✝¹ : AddSubmonoidClass σ A
𝒜 : ι → σ
inst✝ : GradedRing 𝒜
I : Ideal A
s₁ s₂ : Set ↥(homogeneousSubmonoid 𝒜)
⊢ ∃ S, span (Subtype.val '' s₁) * span (Subtype.val '' s₂) = span (Subtype.val '' S)
state_after: case intro.intro
ι : Type u_1
σ : Type u_2
R : Type u_3
A : Type u_4
inst✝⁵ : CommSemiring A
inst✝⁴ : DecidableEq ι
inst✝³ : AddMonoid ι
inst✝² : SetLike σ A
inst✝¹ : AddSubmonoidClass σ A
𝒜 : ι → σ
inst✝ : GradedRing 𝒜
I : Ideal A
s₁ s₂ : Set ↥(homogeneousSubmonoid 𝒜)
⊢ ∃ S, span (Subtype.val '' s₁ * Subtype.val '' s₂) = span (Subtype.val '' S)

tactic: exact ⟨s₁ * s₂, congr_arg _ <| (Set.image_mul (homogeneousSubmonoid 𝒜).subtype).symm⟩
state_before: case intro.intro
ι : Type u_1
σ : Type u_2
R : Type u_3
A : Type u_4
inst✝⁵ : CommSemiring A
inst✝⁴ : DecidableEq ι
inst✝³ : AddMonoid ι
inst✝² : SetLike σ A
inst✝¹ : AddSubmonoidClass σ A
𝒜 : ι → σ
inst✝ : GradedRing 𝒜
I : Ideal A
s₁ s₂ : Set ↥(homogeneousSubmonoid 𝒜)
⊢ ∃ S, span (Subtype.val '' s₁ * Subtype.val '' s₂) = span (Subtype.val '' S)
state_after: no goals
Theorem: Filter.EventuallyEq.prod_mk
File: Mathlib/Order/Filter/Basic.lean

tactic: intros
state_before: α : Type u
β : Type v
γ : Type w
δ : Type u_1
ι : Sort x
l : Filter α
f f' : α → β
hf : f =ᶠ[l] f'
g g' : α → γ
hg : g =ᶠ[l] g'
⊢ ∀ (x : α), g x = g' x → f x = f' x → (fun x => (f x, g x)) x = (fun x => (f' x, g' x)) x
state_after: α : Type u
β : Type v
γ : Type w
δ : Type u_1
ι : Sort x
l : Filter α
f f' : α → β
hf : f =ᶠ[l] f'
g g' : α → γ
hg : g =ᶠ[l] g'
x✝ : α
a✝¹ : g x✝ = g' x✝
a✝ : f x✝ = f' x✝
⊢ (fun x => (f x, g x)) x✝ = (fun x => (f' x, g' x)) x✝

tactic: simp only [*]
state_before: α : Type u
β : Type v
γ : Type w
δ : Type u_1
ι : Sort x
l : Filter α
f f' : α → β
hf : f =ᶠ[l] f'
g g' : α → γ
hg : g =ᶠ[l] g'
x✝ : α
a✝¹ : g x✝ = g' x✝
a✝ : f x✝ = f' x✝
⊢ (fun x => (f x, g x)) x✝ = (fun x => (f' x, g' x)) x✝
state_after: no goals
Theorem: SimpleGraph.Connected.dist_triangle
File: Mathlib/Combinatorics/SimpleGraph/Metric.lean

tactic: obtain ⟨p, hp⟩ := hconn.exists_walk_of_dist u v
state_before: V : Type u_1
G : SimpleGraph V
hconn : G.Connected
u v w : V
⊢ G.dist u w ≤ G.dist u v + G.dist v w
state_after: case intro
V : Type u_1
G : SimpleGraph V
hconn : G.Connected
u v w : V
p : G.Walk u v
hp : p.length = G.dist u v
⊢ G.dist u w ≤ G.dist u v + G.dist v w

tactic: obtain ⟨q, hq⟩ := hconn.exists_walk_of_dist v w
state_before: case intro
V : Type u_1
G : SimpleGraph V
hconn : G.Connected
u v w : V
p : G.Walk u v
hp : p.length = G.dist u v
⊢ G.dist u w ≤ G.dist u v + G.dist v w
state_after: case intro.intro
V : Type u_1
G : SimpleGraph V
hconn : G.Connected
u v w : V
p : G.Walk u v
hp : p.length = G.dist u v
q : G.Walk v w
hq : q.length = G.dist v w
⊢ G.dist u w ≤ G.dist u v + G.dist v w

tactic: rw [← hp, ← hq, ← Walk.length_append]
state_before: case intro.intro
V : Type u_1
G : SimpleGraph V
hconn : G.Connected
u v w : V
p : G.Walk u v
hp : p.length = G.dist u v
q : G.Walk v w
hq : q.length = G.dist v w
⊢ G.dist u w ≤ G.dist u v + G.dist v w
state_after: case intro.intro
V : Type u_1
G : SimpleGraph V
hconn : G.Connected
u v w : V
p : G.Walk u v
hp : p.length = G.dist u v
q : G.Walk v w
hq : q.length = G.dist v w
⊢ G.dist u w ≤ (p.append q).length

tactic: apply dist_le
state_before: case intro.intro
V : Type u_1
G : SimpleGraph V
hconn : G.Connected
u v w : V
p : G.Walk u v
hp : p.length = G.dist u v
q : G.Walk v w
hq : q.length = G.dist v w
⊢ G.dist u w ≤ (p.append q).length
state_after: no goals
Theorem: Set.OrdConnected.image_ennreal_ofReal
File: Mathlib/Data/ENNReal/Basic.lean

tactic: simpa only [image_image] using h.image_real_toNNReal.image_coe_nnreal_ennreal
state_before: α : Type u_1
s : Set ℝ
t : Set ℝ≥0
u : Set ℝ≥0∞
h : s.OrdConnected
⊢ (ENNReal.ofReal '' s).OrdConnected
state_after: no goals
Theorem: compl_singleton_mem_nhdsSet_iff
File: Mathlib/Topology/Separation.lean

tactic: rw [isOpen_compl_singleton.mem_nhdsSet, subset_compl_singleton_iff]
state_before: X : Type u_1
Y : Type u_2
inst✝¹ : TopologicalSpace X
inst✝ : T1Space X
x : X
s : Set X
⊢ {x}ᶜ ∈ 𝓝ˢ s ↔ x ∉ s
state_after: no goals
Theorem: List.exists_tfae
File: Mathlib/Data/List/TFAE.lean

tactic: simp only [TFAE, List.forall_mem_map_iff]
state_before: α : Type u_1
l : List (α → Prop)
H : ∀ (a : α), (map (fun p => p a) l).TFAE
⊢ (map (fun p => ∃ a, p a) l).TFAE
state_after: α : Type u_1
l : List (α → Prop)
H : ∀ (a : α), (map (fun p => p a) l).TFAE
⊢ ∀ (j : α → Prop), j ∈ l → ∀ (j_1 : α → Prop), j_1 ∈ l → ((∃ a, j a) ↔ ∃ a, j_1 a)

tactic: intros p₁ hp₁ p₂ hp₂
state_before: α : Type u_1
l : List (α → Prop)
H : ∀ (a : α), (map (fun p => p a) l).TFAE
⊢ ∀ (j : α → Prop), j ∈ l → ∀ (j_1 : α → Prop), j_1 ∈ l → ((∃ a, j a) ↔ ∃ a, j_1 a)
state_after: α : Type u_1
l : List (α → Prop)
H : ∀ (a : α), (map (fun p => p a) l).TFAE
p₁ : α → Prop
hp₁ : p₁ ∈ l
p₂ : α → Prop
hp₂ : p₂ ∈ l
⊢ (∃ a, p₁ a) ↔ ∃ a, p₂ a

tactic: exact exists_congr fun a ↦ H a (p₁ a) (mem_map_of_mem (fun p ↦ p a) hp₁)
  (p₂ a) (mem_map_of_mem (fun p ↦ p a) hp₂)
state_before: α : Type u_1
l : List (α → Prop)
H : ∀ (a : α), (map (fun p => p a) l).TFAE
p₁ : α → Prop
hp₁ : p₁ ∈ l
p₂ : α → Prop
hp₂ : p₂ ∈ l
⊢ (∃ a, p₁ a) ↔ ∃ a, p₂ a
state_after: no goals
Theorem: DirectSum.coe_mul_apply
File: Mathlib/Algebra/DirectSum/Internal.lean

tactic: rw [mul_eq_sum_support_ghas_mul, DFinsupp.finset_sum_apply, AddSubmonoidClass.coe_finset_sum]
state_before: ι : Type u_1
σ : Type u_2
S : Type u_3
R : Type u_4
inst✝⁶ : DecidableEq ι
inst✝⁵ : Semiring R
inst✝⁴ : SetLike σ R
inst✝³ : AddSubmonoidClass σ R
A : ι → σ
inst✝² : AddMonoid ι
inst✝¹ : SetLike.GradedMonoid A
inst✝ : (i : ι) → (x : ↥(A i)) → Decidable (x ≠ 0)
r r' : ⨁ (i : ι), ↥(A i)
n : ι
⊢ ↑((r * r') n) =
    ∑ ij ∈ Finset.filter (fun ij => ij.1 + ij.2 = n) (DFinsupp.support r ×ˢ DFinsupp.support r'), ↑(r ij.1) * ↑(r' ij.2)
state_after: ι : Type u_1
σ : Type u_2
S : Type u_3
R : Type u_4
inst✝⁶ : DecidableEq ι
inst✝⁵ : Semiring R
inst✝⁴ : SetLike σ R
inst✝³ : AddSubmonoidClass σ R
A : ι → σ
inst✝² : AddMonoid ι
inst✝¹ : SetLike.GradedMonoid A
inst✝ : (i : ι) → (x : ↥(A i)) → Decidable (x ≠ 0)
r r' : ⨁ (i : ι), ↥(A i)
n : ι
⊢ ∑ i ∈ DFinsupp.support r ×ˢ DFinsupp.support r',
      ↑(((of (fun i => ↥(A i)) (i.1 + i.2)) (GradedMonoid.GMul.mul (r i.1) (r' i.2))) n) =
    ∑ ij ∈ Finset.filter (fun ij => ij.1 + ij.2 = n) (DFinsupp.support r ×ˢ DFinsupp.support r'), ↑(r ij.1) * ↑(r' ij.2)

tactic: simp_rw [coe_of_apply, apply_ite, ZeroMemClass.coe_zero, ← Finset.sum_filter, SetLike.coe_gMul]
state_before: ι : Type u_1
σ : Type u_2
S : Type u_3
R : Type u_4
inst✝⁶ : DecidableEq ι
inst✝⁵ : Semiring R
inst✝⁴ : SetLike σ R
inst✝³ : AddSubmonoidClass σ R
A : ι → σ
inst✝² : AddMonoid ι
inst✝¹ : SetLike.GradedMonoid A
inst✝ : (i : ι) → (x : ↥(A i)) → Decidable (x ≠ 0)
r r' : ⨁ (i : ι), ↥(A i)
n : ι
⊢ ∑ i ∈ DFinsupp.support r ×ˢ DFinsupp.support r',
      ↑(((of (fun i => ↥(A i)) (i.1 + i.2)) (GradedMonoid.GMul.mul (r i.1) (r' i.2))) n) =
    ∑ ij ∈ Finset.filter (fun ij => ij.1 + ij.2 = n) (DFinsupp.support r ×ˢ DFinsupp.support r'), ↑(r ij.1) * ↑(r' ij.2)
state_after: no goals
Theorem: Polynomial.leadingCoeff_add_of_degree_eq
File: Mathlib/Algebra/Polynomial/Degree/Definitions.lean

tactic: have : natDegree (p + q) = natDegree p := by
  apply natDegree_eq_of_degree_eq
  rw [degree_add_eq_of_leadingCoeff_add_ne_zero hlc, h, max_self]
state_before: R : Type u
S : Type v
a b c d : R
n m : ℕ
inst✝ : Semiring R
p✝ p q : R[X]
ι : Type u_1
h : p.degree = q.degree
hlc : p.leadingCoeff + q.leadingCoeff ≠ 0
⊢ (p + q).leadingCoeff = p.leadingCoeff + q.leadingCoeff
state_after: R : Type u
S : Type v
a b c d : R
n m : ℕ
inst✝ : Semiring R
p✝ p q : R[X]
ι : Type u_1
h : p.degree = q.degree
hlc : p.leadingCoeff + q.leadingCoeff ≠ 0
this : (p + q).natDegree = p.natDegree
⊢ (p + q).leadingCoeff = p.leadingCoeff + q.leadingCoeff

tactic: simp only [leadingCoeff, this, natDegree_eq_of_degree_eq h, coeff_add]
state_before: R : Type u
S : Type v
a b c d : R
n m : ℕ
inst✝ : Semiring R
p✝ p q : R[X]
ι : Type u_1
h : p.degree = q.degree
hlc : p.leadingCoeff + q.leadingCoeff ≠ 0
this : (p + q).natDegree = p.natDegree
⊢ (p + q).leadingCoeff = p.leadingCoeff + q.leadingCoeff
state_after: no goals

tactic: apply natDegree_eq_of_degree_eq
state_before: R : Type u
S : Type v
a b c d : R
n m : ℕ
inst✝ : Semiring R
p✝ p q : R[X]
ι : Type u_1
h : p.degree = q.degree
hlc : p.leadingCoeff + q.leadingCoeff ≠ 0
⊢ (p + q).natDegree = p.natDegree
state_after: case h
R : Type u
S : Type v
a b c d : R
n m : ℕ
inst✝ : Semiring R
p✝ p q : R[X]
ι : Type u_1
h : p.degree = q.degree
hlc : p.leadingCoeff + q.leadingCoeff ≠ 0
⊢ (p + q).degree = p.degree

tactic: rw [degree_add_eq_of_leadingCoeff_add_ne_zero hlc, h, max_self]
state_before: case h
R : Type u
S : Type v
a b c d : R
n m : ℕ
inst✝ : Semiring R
p✝ p q : R[X]
ι : Type u_1
h : p.degree = q.degree
hlc : p.leadingCoeff + q.leadingCoeff ≠ 0
⊢ (p + q).degree = p.degree
state_after: no goals
Theorem: MeasureTheory.SimpleFunc.tsum_eapproxDiff
File: Mathlib/MeasureTheory/Function/SimpleFunc.lean

tactic: simp_rw [ENNReal.tsum_eq_iSup_nat' (tendsto_add_atTop_nat 1), sum_eapproxDiff,
  iSup_eapprox_apply f hf a]
state_before: α : Type u_1
β : Type u_2
γ : Type u_3
δ : Type u_4
inst✝ : MeasurableSpace α
K : Type u_5
f : α → ℝ≥0∞
hf : Measurable f
a : α
⊢ ∑' (n : ℕ), ↑(↑(eapproxDiff f n) a) = f a
state_after: no goals
Theorem: analyticAt_clog
File: Mathlib/Analysis/SpecialFunctions/Complex/Analytic.lean

tactic: rw [analyticAt_iff_eventually_differentiableAt]
state_before: E : Type
inst✝¹ : NormedAddCommGroup E
inst✝ : NormedSpace ℂ E
f g : E → ℂ
z : ℂ
x : E
s : Set E
m : z ∈ slitPlane
⊢ AnalyticAt ℂ log z
state_after: E : Type
inst✝¹ : NormedAddCommGroup E
inst✝ : NormedSpace ℂ E
f g : E → ℂ
z : ℂ
x : E
s : Set E
m : z ∈ slitPlane
⊢ ∀ᶠ (z : ℂ) in 𝓝 z, DifferentiableAt ℂ log z

tactic: filter_upwards [isOpen_slitPlane.eventually_mem m]
state_before: E : Type
inst✝¹ : NormedAddCommGroup E
inst✝ : NormedSpace ℂ E
f g : E → ℂ
z : ℂ
x : E
s : Set E
m : z ∈ slitPlane
⊢ ∀ᶠ (z : ℂ) in 𝓝 z, DifferentiableAt ℂ log z
state_after: case h
E : Type
inst✝¹ : NormedAddCommGroup E
inst✝ : NormedSpace ℂ E
f g : E → ℂ
z : ℂ
x : E
s : Set E
m : z ∈ slitPlane
⊢ ∀ a ∈ slitPlane, DifferentiableAt ℂ log a

tactic: intro z m
state_before: case h
E : Type
inst✝¹ : NormedAddCommGroup E
inst✝ : NormedSpace ℂ E
f g : E → ℂ
z : ℂ
x : E
s : Set E
m : z ∈ slitPlane
⊢ ∀ a ∈ slitPlane, DifferentiableAt ℂ log a
state_after: case h
E : Type
inst✝¹ : NormedAddCommGroup E
inst✝ : NormedSpace ℂ E
f g : E → ℂ
z✝ : ℂ
x : E
s : Set E
m✝ : z✝ ∈ slitPlane
z : ℂ
m : z ∈ slitPlane
⊢ DifferentiableAt ℂ log z

tactic: exact differentiableAt_id.clog m
state_before: case h
E : Type
inst✝¹ : NormedAddCommGroup E
inst✝ : NormedSpace ℂ E
f g : E → ℂ
z✝ : ℂ
x : E
s : Set E
m✝ : z✝ ∈ slitPlane
z : ℂ
m : z ∈ slitPlane
⊢ DifferentiableAt ℂ log z
state_after: no goals
Theorem: IsLowerSet.disjoint_upperClosure_right
File: Mathlib/Order/UpperLower/Basic.lean

tactic: simpa only [disjoint_comm] using hs.disjoint_upperClosure_left
state_before: α : Type u_1
β : Type u_2
γ : Type u_3
ι : Sort u_4
κ : ι → Sort u_5
inst✝¹ : Preorder α
inst✝ : Preorder β
s t : Set α
x : α
hs : IsLowerSet s
⊢ Disjoint s ↑(upperClosure t) ↔ Disjoint s t
state_after: no goals
Theorem: Pell.xy_succ_succ
File: Mathlib/NumberTheory/PellMatiyasevic.lean

tactic: have := pellZd_succ_succ a1 n
state_before: a : ℕ
a1 : 1 < a
n : ℕ
⊢ xn a1 (n + 2) + xn a1 n = 2 * a * xn a1 (n + 1) ∧ yn a1 (n + 2) + yn a1 n = 2 * a * yn a1 (n + 1)
state_after: a : ℕ
a1 : 1 < a
n : ℕ
this : pellZd a1 (n + 2) + pellZd a1 n = ↑(2 * a) * pellZd a1 (n + 1)
⊢ xn a1 (n + 2) + xn a1 n = 2 * a * xn a1 (n + 1) ∧ yn a1 (n + 2) + yn a1 n = 2 * a * yn a1 (n + 1)

tactic: unfold pellZd at this
state_before: a : ℕ
a1 : 1 < a
n : ℕ
this : pellZd a1 (n + 2) + pellZd a1 n = ↑(2 * a) * pellZd a1 (n + 1)
⊢ xn a1 (n + 2) + xn a1 n = 2 * a * xn a1 (n + 1) ∧ yn a1 (n + 2) + yn a1 n = 2 * a * yn a1 (n + 1)
state_after: a : ℕ
a1 : 1 < a
n : ℕ
this :
  { re := ↑(xn a1 (n + 2)), im := ↑(yn a1 (n + 2)) } + { re := ↑(xn a1 n), im := ↑(yn a1 n) } =
    ↑(2 * a) * { re := ↑(xn a1 (n + 1)), im := ↑(yn a1 (n + 1)) }
⊢ xn a1 (n + 2) + xn a1 n = 2 * a * xn a1 (n + 1) ∧ yn a1 (n + 2) + yn a1 n = 2 * a * yn a1 (n + 1)

tactic: erw [Zsqrtd.smul_val (2 * a : ℕ)] at this
state_before: a : ℕ
a1 : 1 < a
n : ℕ
this :
  { re := ↑(xn a1 (n + 2)), im := ↑(yn a1 (n + 2)) } + { re := ↑(xn a1 n), im := ↑(yn a1 n) } =
    ↑(2 * a) * { re := ↑(xn a1 (n + 1)), im := ↑(yn a1 (n + 1)) }
⊢ xn a1 (n + 2) + xn a1 n = 2 * a * xn a1 (n + 1) ∧ yn a1 (n + 2) + yn a1 n = 2 * a * yn a1 (n + 1)
state_after: a : ℕ
a1 : 1 < a
n : ℕ
this :
  { re := ↑(xn a1 (n + 2)), im := ↑(yn a1 (n + 2)) } + { re := ↑(xn a1 n), im := ↑(yn a1 n) } =
    { re := ↑(2 * a) * ↑(xn a1 (n + 1)), im := ↑(2 * a) * ↑(yn a1 (n + 1)) }
⊢ xn a1 (n + 2) + xn a1 n = 2 * a * xn a1 (n + 1) ∧ yn a1 (n + 2) + yn a1 n = 2 * a * yn a1 (n + 1)

tactic: injection this with h₁ h₂
state_before: a : ℕ
a1 : 1 < a
n : ℕ
this :
  { re := ↑(xn a1 (n + 2)), im := ↑(yn a1 (n + 2)) } + { re := ↑(xn a1 n), im := ↑(yn a1 n) } =
    { re := ↑(2 * a) * ↑(xn a1 (n + 1)), im := ↑(2 * a) * ↑(yn a1 (n + 1)) }
⊢ xn a1 (n + 2) + xn a1 n = 2 * a * xn a1 (n + 1) ∧ yn a1 (n + 2) + yn a1 n = 2 * a * yn a1 (n + 1)
state_after: a : ℕ
a1 : 1 < a
n : ℕ
h₁ :
  { re := ↑(xn a1 (n + 2)), im := ↑(yn a1 (n + 2)) }.re + { re := ↑(xn a1 n), im := ↑(yn a1 n) }.re =
    ↑(2 * a) * ↑(xn a1 (n + 1))
h₂ :
  { re := ↑(xn a1 (n + 2)), im := ↑(yn a1 (n + 2)) }.im + { re := ↑(xn a1 n), im := ↑(yn a1 n) }.im =
    ↑(2 * a) * ↑(yn a1 (n + 1))
⊢ xn a1 (n + 2) + xn a1 n = 2 * a * xn a1 (n + 1) ∧ yn a1 (n + 2) + yn a1 n = 2 * a * yn a1 (n + 1)

tactic: constructor <;> apply Int.ofNat.inj <;> [simpa using h₁; simpa using h₂]
state_before: a : ℕ
a1 : 1 < a
n : ℕ
h₁ :
  { re := ↑(xn a1 (n + 2)), im := ↑(yn a1 (n + 2)) }.re + { re := ↑(xn a1 n), im := ↑(yn a1 n) }.re =
    ↑(2 * a) * ↑(xn a1 (n + 1))
h₂ :
  { re := ↑(xn a1 (n + 2)), im := ↑(yn a1 (n + 2)) }.im + { re := ↑(xn a1 n), im := ↑(yn a1 n) }.im =
    ↑(2 * a) * ↑(yn a1 (n + 1))
⊢ xn a1 (n + 2) + xn a1 n = 2 * a * xn a1 (n + 1) ∧ yn a1 (n + 2) + yn a1 n = 2 * a * yn a1 (n + 1)
state_after: no goals
Theorem: NonUnitalSubring.coe_iInf
File: Mathlib/RingTheory/NonUnitalSubring/Basic.lean

tactic: simp only [iInf, coe_sInf, Set.biInter_range]
state_before: F : Type w
R : Type u
S✝ : Type v
T : Type u_1
inst✝⁴ : NonUnitalNonAssocRing R
inst✝³ : NonUnitalNonAssocRing S✝
inst✝² : NonUnitalNonAssocRing T
inst✝¹ : FunLike F R S✝
inst✝ : NonUnitalRingHomClass F R S✝
g : S✝ →ₙ+* T
f : R →ₙ+* S✝
ι : Sort u_2
S : ι → NonUnitalSubring R
⊢ ↑(⨅ i, S i) = ⋂ i, ↑(S i)
state_after: no goals
Theorem: Multiset.foldl_induction'
File: Mathlib/Data/Multiset/Basic.lean

tactic: rw [foldl_swap]
state_before: α : Type u_1
β : Type v
γ : Type u_2
f : β → α → β
H : RightCommutative f
x : β
q : α → Prop
p : β → Prop
s : Multiset α
hpqf : ∀ (a : α) (b : β), q a → p b → p (f b a)
px : p x
q_s : ∀ a ∈ s, q a
⊢ p (foldl f H x s)
state_after: α : Type u_1
β : Type v
γ : Type u_2
f : β → α → β
H : RightCommutative f
x : β
q : α → Prop
p : β → Prop
s : Multiset α
hpqf : ∀ (a : α) (b : β), q a → p b → p (f b a)
px : p x
q_s : ∀ a ∈ s, q a
⊢ p (foldr (fun x y => f y x) ⋯ x s)

tactic: exact foldr_induction' (fun x y => f y x) (fun x y z => (H _ _ _).symm) x q p s hpqf px q_s
state_before: α : Type u_1
β : Type v
γ : Type u_2
f : β → α → β
H : RightCommutative f
x : β
q : α → Prop
p : β → Prop
s : Multiset α
hpqf : ∀ (a : α) (b : β), q a → p b → p (f b a)
px : p x
q_s : ∀ a ∈ s, q a
⊢ p (foldr (fun x y => f y x) ⋯ x s)
state_after: no goals