1337xyz1337xyz/leandojo-benchmark4-v10 huggingface dataset:
Theorem: Monoid.exponent_pi_eq_zero
File: Mathlib/GroupTheory/Exponent.lean

tactic: rw [@exponent_eq_zero_iff, ExponentExists] at hj ⊢
state_before: G : Type u
ι : Type u_1
M : ι → Type u_2
inst✝ : (i : ι) → Monoid (M i)
j : ι
hj : exponent (M j) = 0
⊢ exponent ((i : ι) → M i) = 0
state_after: G : Type u
ι : Type u_1
M : ι → Type u_2
inst✝ : (i : ι) → Monoid (M i)
j : ι
hj : ¬∃ n, 0 < n ∧ ∀ (g : M j), g ^ n = 1
⊢ ¬∃ n, 0 < n ∧ ∀ (g : (i : ι) → M i), g ^ n = 1

tactic: push_neg at hj ⊢
state_before: G : Type u
ι : Type u_1
M : ι → Type u_2
inst✝ : (i : ι) → Monoid (M i)
j : ι
hj : ¬∃ n, 0 < n ∧ ∀ (g : M j), g ^ n = 1
⊢ ¬∃ n, 0 < n ∧ ∀ (g : (i : ι) → M i), g ^ n = 1
state_after: G : Type u
ι : Type u_1
M : ι → Type u_2
inst✝ : (i : ι) → Monoid (M i)
j : ι
hj : ∀ (n : ℕ), 0 < n → ∃ g, g ^ n ≠ 1
⊢ ∀ (n : ℕ), 0 < n → ∃ g, g ^ n ≠ 1

tactic: peel hj with n hn _
state_before: G : Type u
ι : Type u_1
M : ι → Type u_2
inst✝ : (i : ι) → Monoid (M i)
j : ι
hj : ∀ (n : ℕ), 0 < n → ∃ g, g ^ n ≠ 1
⊢ ∀ (n : ℕ), 0 < n → ∃ g, g ^ n ≠ 1
state_after: case h.h
G : Type u
ι : Type u_1
M : ι → Type u_2
inst✝ : (i : ι) → Monoid (M i)
j : ι
hj : ∀ (n : ℕ), 0 < n → ∃ g, g ^ n ≠ 1
n : ℕ
hn : 0 < n
this : ∃ g, g ^ n ≠ 1
⊢ ∃ g, g ^ n ≠ 1

tactic: obtain ⟨m, hm⟩ := this
state_before: case h.h
G : Type u
ι : Type u_1
M : ι → Type u_2
inst✝ : (i : ι) → Monoid (M i)
j : ι
hj : ∀ (n : ℕ), 0 < n → ∃ g, g ^ n ≠ 1
n : ℕ
hn : 0 < n
this : ∃ g, g ^ n ≠ 1
⊢ ∃ g, g ^ n ≠ 1
state_after: case h.h.intro
G : Type u
ι : Type u_1
M : ι → Type u_2
inst✝ : (i : ι) → Monoid (M i)
j : ι
hj : ∀ (n : ℕ), 0 < n → ∃ g, g ^ n ≠ 1
n : ℕ
hn : 0 < n
m : M j
hm : m ^ n ≠ 1
⊢ ∃ g, g ^ n ≠ 1

tactic: refine ⟨Pi.mulSingle j m, fun h ↦ hm ?_⟩
state_before: case h.h.intro
G : Type u
ι : Type u_1
M : ι → Type u_2
inst✝ : (i : ι) → Monoid (M i)
j : ι
hj : ∀ (n : ℕ), 0 < n → ∃ g, g ^ n ≠ 1
n : ℕ
hn : 0 < n
m : M j
hm : m ^ n ≠ 1
⊢ ∃ g, g ^ n ≠ 1
state_after: case h.h.intro
G : Type u
ι : Type u_1
M : ι → Type u_2
inst✝ : (i : ι) → Monoid (M i)
j : ι
hj : ∀ (n : ℕ), 0 < n → ∃ g, g ^ n ≠ 1
n : ℕ
hn : 0 < n
m : M j
hm : m ^ n ≠ 1
h : Pi.mulSingle j m ^ n = 1
⊢ m ^ n = 1

tactic: simpa using congr_fun h j
state_before: case h.h.intro
G : Type u
ι : Type u_1
M : ι → Type u_2
inst✝ : (i : ι) → Monoid (M i)
j : ι
hj : ∀ (n : ℕ), 0 < n → ∃ g, g ^ n ≠ 1
n : ℕ
hn : 0 < n
m : M j
hm : m ^ n ≠ 1
h : Pi.mulSingle j m ^ n = 1
⊢ m ^ n = 1
state_after: no goals
Theorem: HomologicalComplex.d_comp_XIsoOfEq_hom
File: Mathlib/Algebra/Homology/HomologicalComplex.lean

tactic: subst h
state_before: ι : Type u_1
V : Type u
inst✝¹ : Category.{v, u} V
inst✝ : HasZeroMorphisms V
c : ComplexShape ι
K : HomologicalComplex V c
p₂ p₃ : ι
h : p₂ = p₃
p₁ : ι
⊢ K.d p₁ p₂ ≫ (K.XIsoOfEq h).hom = K.d p₁ p₃
state_after: ι : Type u_1
V : Type u
inst✝¹ : Category.{v, u} V
inst✝ : HasZeroMorphisms V
c : ComplexShape ι
K : HomologicalComplex V c
p₂ p₁ : ι
⊢ K.d p₁ p₂ ≫ (K.XIsoOfEq ⋯).hom = K.d p₁ p₂

tactic: simp
state_before: ι : Type u_1
V : Type u
inst✝¹ : Category.{v, u} V
inst✝ : HasZeroMorphisms V
c : ComplexShape ι
K : HomologicalComplex V c
p₂ p₁ : ι
⊢ K.d p₁ p₂ ≫ (K.XIsoOfEq ⋯).hom = K.d p₁ p₂
state_after: no goals
Theorem: Set.preimage_invFun_of_not_mem
File: Mathlib/Data/Set/Function.lean

tactic: ext x
state_before: α : Type u_1
β : Type u_2
γ : Type u_3
ι : Sort u_4
π : α → Type u_5
s✝ s₁ s₂ : Set α
t : Set β
f✝ : α → β
n : Nonempty α
f : α → β
hf : Injective f
s : Set α
h : Classical.choice n ∉ s
⊢ invFun f ⁻¹' s = f '' s
state_after: case h
α : Type u_1
β : Type u_2
γ : Type u_3
ι : Sort u_4
π : α → Type u_5
s✝ s₁ s₂ : Set α
t : Set β
f✝ : α → β
n : Nonempty α
f : α → β
hf : Injective f
s : Set α
h : Classical.choice n ∉ s
x : β
⊢ x ∈ invFun f ⁻¹' s ↔ x ∈ f '' s

tactic: rcases em (x ∈ range f) with (⟨a, rfl⟩ | hx)
state_before: case h
α : Type u_1
β : Type u_2
γ : Type u_3
ι : Sort u_4
π : α → Type u_5
s✝ s₁ s₂ : Set α
t : Set β
f✝ : α → β
n : Nonempty α
f : α → β
hf : Injective f
s : Set α
h : Classical.choice n ∉ s
x : β
⊢ x ∈ invFun f ⁻¹' s ↔ x ∈ f '' s
state_after: case h.inl.intro
α : Type u_1
β : Type u_2
γ : Type u_3
ι : Sort u_4
π : α → Type u_5
s✝ s₁ s₂ : Set α
t : Set β
f✝ : α → β
n : Nonempty α
f : α → β
hf : Injective f
s : Set α
h : Classical.choice n ∉ s
a : α
⊢ f a ∈ invFun f ⁻¹' s ↔ f a ∈ f '' s

case h.inr
α : Type u_1
β : Type u_2
γ : Type u_3
ι : Sort u_4
π : α → Type u_5
s✝ s₁ s₂ : Set α
t : Set β
f✝ : α → β
n : Nonempty α
f : α → β
hf : Injective f
s : Set α
h : Classical.choice n ∉ s
x : β
hx : x ∉ range f
⊢ x ∈ invFun f ⁻¹' s ↔ x ∈ f '' s

tactic: rw [mem_preimage, leftInverse_invFun hf, hf.mem_set_image]
state_before: case h.inl.intro
α : Type u_1
β : Type u_2
γ : Type u_3
ι : Sort u_4
π : α → Type u_5
s✝ s₁ s₂ : Set α
t : Set β
f✝ : α → β
n : Nonempty α
f : α → β
hf : Injective f
s : Set α
h : Classical.choice n ∉ s
a : α
⊢ f a ∈ invFun f ⁻¹' s ↔ f a ∈ f '' s
state_after: no goals

tactic: have : x ∉ f '' s := fun h' => hx (image_subset_range _ _ h')
state_before: case h.inr
α : Type u_1
β : Type u_2
γ : Type u_3
ι : Sort u_4
π : α → Type u_5
s✝ s₁ s₂ : Set α
t : Set β
f✝ : α → β
n : Nonempty α
f : α → β
hf : Injective f
s : Set α
h : Classical.choice n ∉ s
x : β
hx : x ∉ range f
⊢ x ∈ invFun f ⁻¹' s ↔ x ∈ f '' s
state_after: case h.inr
α : Type u_1
β : Type u_2
γ : Type u_3
ι : Sort u_4
π : α → Type u_5
s✝ s₁ s₂ : Set α
t : Set β
f✝ : α → β
n : Nonempty α
f : α → β
hf : Injective f
s : Set α
h : Classical.choice n ∉ s
x : β
hx : x ∉ range f
this : x ∉ f '' s
⊢ x ∈ invFun f ⁻¹' s ↔ x ∈ f '' s

tactic: simp only [mem_preimage, invFun_neg hx, h, this]
state_before: case h.inr
α : Type u_1
β : Type u_2
γ : Type u_3
ι : Sort u_4
π : α → Type u_5
s✝ s₁ s₂ : Set α
t : Set β
f✝ : α → β
n : Nonempty α
f : α → β
hf : Injective f
s : Set α
h : Classical.choice n ∉ s
x : β
hx : x ∉ range f
this : x ∉ f '' s
⊢ x ∈ invFun f ⁻¹' s ↔ x ∈ f '' s
state_after: no goals
Theorem: sameRay_of_mem_segment
File: Mathlib/Analysis/Convex/Segment.lean

tactic: rw [segment_eq_image'] at h
state_before: 𝕜 : Type u_1
E : Type u_2
F : Type u_3
G : Type u_4
ι : Type u_5
π : ι → Type u_6
inst✝² : StrictOrderedCommRing 𝕜
inst✝¹ : AddCommGroup E
inst✝ : Module 𝕜 E
x y z : E
h : x ∈ [y-[𝕜]z]
⊢ SameRay 𝕜 (x - y) (z - x)
state_after: 𝕜 : Type u_1
E : Type u_2
F : Type u_3
G : Type u_4
ι : Type u_5
π : ι → Type u_6
inst✝² : StrictOrderedCommRing 𝕜
inst✝¹ : AddCommGroup E
inst✝ : Module 𝕜 E
x y z : E
h : x ∈ (fun θ => y + θ • (z - y)) '' Icc 0 1
⊢ SameRay 𝕜 (x - y) (z - x)

tactic: rcases h with ⟨θ, ⟨hθ₀, hθ₁⟩, rfl⟩
state_before: 𝕜 : Type u_1
E : Type u_2
F : Type u_3
G : Type u_4
ι : Type u_5
π : ι → Type u_6
inst✝² : StrictOrderedCommRing 𝕜
inst✝¹ : AddCommGroup E
inst✝ : Module 𝕜 E
x y z : E
h : x ∈ (fun θ => y + θ • (z - y)) '' Icc 0 1
⊢ SameRay 𝕜 (x - y) (z - x)
state_after: case intro.intro.intro
𝕜 : Type u_1
E : Type u_2
F : Type u_3
G : Type u_4
ι : Type u_5
π : ι → Type u_6
inst✝² : StrictOrderedCommRing 𝕜
inst✝¹ : AddCommGroup E
inst✝ : Module 𝕜 E
y z : E
θ : 𝕜
hθ₀ : 0 ≤ θ
hθ₁ : θ ≤ 1
⊢ SameRay 𝕜 ((fun θ => y + θ • (z - y)) θ - y) (z - (fun θ => y + θ • (z - y)) θ)

tactic: simpa only [add_sub_cancel_left, ← sub_sub, sub_smul, one_smul] using
  (SameRay.sameRay_nonneg_smul_left (z - y) hθ₀).nonneg_smul_right (sub_nonneg.2 hθ₁)
state_before: case intro.intro.intro
𝕜 : Type u_1
E : Type u_2
F : Type u_3
G : Type u_4
ι : Type u_5
π : ι → Type u_6
inst✝² : StrictOrderedCommRing 𝕜
inst✝¹ : AddCommGroup E
inst✝ : Module 𝕜 E
y z : E
θ : 𝕜
hθ₀ : 0 ≤ θ
hθ₁ : θ ≤ 1
⊢ SameRay 𝕜 ((fun θ => y + θ • (z - y)) θ - y) (z - (fun θ => y + θ • (z - y)) θ)
state_after: no goals
Theorem: CategoryTheory.Functor.eventualRange_eq_range_precomp
File: Mathlib/CategoryTheory/CofilteredSystem.lean

tactic: apply subset_antisymm
state_before: J : Type u
inst✝ : Category.{u_1, u} J
F : J ⥤ Type v
i j k : J
s : Set (F.obj i)
f : i ⟶ j
g : j ⟶ k
h : F.eventualRange k = range (F.map g)
⊢ F.eventualRange k = range (F.map (f ≫ g))
state_after: case a
J : Type u
inst✝ : Category.{u_1, u} J
F : J ⥤ Type v
i j k : J
s : Set (F.obj i)
f : i ⟶ j
g : j ⟶ k
h : F.eventualRange k = range (F.map g)
⊢ F.eventualRange k ⊆ range (F.map (f ≫ g))

case a
J : Type u
inst✝ : Category.{u_1, u} J
F : J ⥤ Type v
i j k : J
s : Set (F.obj i)
f : i ⟶ j
g : j ⟶ k
h : F.eventualRange k = range (F.map g)
⊢ range (F.map (f ≫ g)) ⊆ F.eventualRange k

tactic: apply iInter₂_subset
state_before: case a
J : Type u
inst✝ : Category.{u_1, u} J
F : J ⥤ Type v
i j k : J
s : Set (F.obj i)
f : i ⟶ j
g : j ⟶ k
h : F.eventualRange k = range (F.map g)
⊢ F.eventualRange k ⊆ range (F.map (f ≫ g))
state_after: no goals

tactic: rw [h, F.map_comp]
state_before: case a
J : Type u
inst✝ : Category.{u_1, u} J
F : J ⥤ Type v
i j k : J
s : Set (F.obj i)
f : i ⟶ j
g : j ⟶ k
h : F.eventualRange k = range (F.map g)
⊢ range (F.map (f ≫ g)) ⊆ F.eventualRange k
state_after: case a
J : Type u
inst✝ : Category.{u_1, u} J
F : J ⥤ Type v
i j k : J
s : Set (F.obj i)
f : i ⟶ j
g : j ⟶ k
h : F.eventualRange k = range (F.map g)
⊢ range (F.map f ≫ F.map g) ⊆ range (F.map g)

tactic: apply range_comp_subset_range
state_before: case a
J : Type u
inst✝ : Category.{u_1, u} J
F : J ⥤ Type v
i j k : J
s : Set (F.obj i)
f : i ⟶ j
g : j ⟶ k
h : F.eventualRange k = range (F.map g)
⊢ range (F.map f ≫ F.map g) ⊆ range (F.map g)
state_after: no goals
Theorem: DenseRange.subset_closure_image_preimage_of_isOpen
File: Mathlib/Topology/Basic.lean

tactic: rw [image_preimage_eq_inter_range]
state_before: X : Type u_1
Y : Type u_2
Z : Type u_3
inst✝² : TopologicalSpace X
inst✝¹ : TopologicalSpace Y
inst✝ : TopologicalSpace Z
f✝¹ : X → Y
s✝ : Set X
x : X
y : Y
α : Type u_4
ι : Type u_5
f✝ : α → X
g : X → Y
f : α → X
s : Set X
hf : DenseRange f
hs : IsOpen s
⊢ s ⊆ closure (f '' (f ⁻¹' s))
state_after: X : Type u_1
Y : Type u_2
Z : Type u_3
inst✝² : TopologicalSpace X
inst✝¹ : TopologicalSpace Y
inst✝ : TopologicalSpace Z
f✝¹ : X → Y
s✝ : Set X
x : X
y : Y
α : Type u_4
ι : Type u_5
f✝ : α → X
g : X → Y
f : α → X
s : Set X
hf : DenseRange f
hs : IsOpen s
⊢ s ⊆ closure (s ∩ range f)

tactic: exact hf.open_subset_closure_inter hs
state_before: X : Type u_1
Y : Type u_2
Z : Type u_3
inst✝² : TopologicalSpace X
inst✝¹ : TopologicalSpace Y
inst✝ : TopologicalSpace Z
f✝¹ : X → Y
s✝ : Set X
x : X
y : Y
α : Type u_4
ι : Type u_5
f✝ : α → X
g : X → Y
f : α → X
s : Set X
hf : DenseRange f
hs : IsOpen s
⊢ s ⊆ closure (s ∩ range f)
state_after: no goals
Theorem: MeasureTheory.OuterMeasure.isometry_map_mkMetric
File: Mathlib/MeasureTheory/Measure/Hausdorff.lean

tactic: rw [← isometry_comap_mkMetric _ hf H, map_comap]
state_before: ι : Type u_1
X : Type u_2
Y : Type u_3
inst✝¹ : EMetricSpace X
inst✝ : EMetricSpace Y
m : ℝ≥0∞ → ℝ≥0∞
f : X → Y
hf : Isometry f
H : Monotone m ∨ Surjective f
⊢ (map f) (mkMetric m) = (restrict (range f)) (mkMetric m)
state_after: no goals
Theorem: MeasureTheory.IsSetSemiring.disjoint_sUnion_diffFinset
File: Mathlib/MeasureTheory/SetSemiring.lean

tactic: rw [hC.sUnion_diffFinset]
state_before: α : Type u_1
C : Set (Set α)
s t : Set α
hC : IsSetSemiring C
hs : s ∈ C
ht : t ∈ C
⊢ Disjoint t (⋃₀ ↑(hC.diffFinset hs ht))
state_after: α : Type u_1
C : Set (Set α)
s t : Set α
hC : IsSetSemiring C
hs : s ∈ C
ht : t ∈ C
⊢ Disjoint t (s \ t)

tactic: exact disjoint_sdiff_right
state_before: α : Type u_1
C : Set (Set α)
s t : Set α
hC : IsSetSemiring C
hs : s ∈ C
ht : t ∈ C
⊢ Disjoint t (s \ t)
state_after: no goals
Theorem: Polynomial.eq_prod_roots_of_monic_of_splits_id
File: Mathlib/Algebra/Polynomial/Splits.lean

tactic: convert eq_prod_roots_of_splits_id hsplit
state_before: R : Type u_1
F : Type u
K : Type v
L : Type w
inst✝³ : CommRing R
inst✝² : Field K
inst✝¹ : Field L
inst✝ : Field F
i : K →+* L
p : K[X]
m : p.Monic
hsplit : Splits (RingHom.id K) p
⊢ p = (Multiset.map (fun a => X - C a) p.roots).prod
state_after: case h.e'_3
R : Type u_1
F : Type u
K : Type v
L : Type w
inst✝³ : CommRing R
inst✝² : Field K
inst✝¹ : Field L
inst✝ : Field F
i : K →+* L
p : K[X]
m : p.Monic
hsplit : Splits (RingHom.id K) p
⊢ (Multiset.map (fun a => X - C a) p.roots).prod = C p.leadingCoeff * (Multiset.map (fun a => X - C a) p.roots).prod

tactic: simp [m]
state_before: case h.e'_3
R : Type u_1
F : Type u
K : Type v
L : Type w
inst✝³ : CommRing R
inst✝² : Field K
inst✝¹ : Field L
inst✝ : Field F
i : K →+* L
p : K[X]
m : p.Monic
hsplit : Splits (RingHom.id K) p
⊢ (Multiset.map (fun a => X - C a) p.roots).prod = C p.leadingCoeff * (Multiset.map (fun a => X - C a) p.roots).prod
state_after: no goals
Theorem: NumberField.mixedEmbedding.convexBodyLT'_convex
File: Mathlib/NumberTheory/NumberField/CanonicalEmbedding/ConvexBody.lean

tactic: refine Convex.prod (convex_pi (fun _ _ => convex_ball _ _)) (convex_pi (fun _ _ => ?_))
state_before: K : Type u_1
inst✝ : Field K
f : InfinitePlace K → ℝ≥0
w₀ : { w // w.IsComplex }
⊢ Convex ℝ (convexBodyLT' K f w₀)
state_after: K : Type u_1
inst✝ : Field K
f : InfinitePlace K → ℝ≥0
w₀ x✝¹ : { w // w.IsComplex }
x✝ : x✝¹ ∈ Set.univ
⊢ Convex ℝ (if x✝¹ = w₀ then {x | |x.re| < 1 ∧ |x.im| < ↑(f ↑x✝¹) ^ 2} else ball 0 ↑(f ↑x✝¹))

tactic: split_ifs
state_before: K : Type u_1
inst✝ : Field K
f : InfinitePlace K → ℝ≥0
w₀ x✝¹ : { w // w.IsComplex }
x✝ : x✝¹ ∈ Set.univ
⊢ Convex ℝ (if x✝¹ = w₀ then {x | |x.re| < 1 ∧ |x.im| < ↑(f ↑x✝¹) ^ 2} else ball 0 ↑(f ↑x✝¹))
state_after: case pos
K : Type u_1
inst✝ : Field K
f : InfinitePlace K → ℝ≥0
w₀ x✝¹ : { w // w.IsComplex }
x✝ : x✝¹ ∈ Set.univ
h✝ : x✝¹ = w₀
⊢ Convex ℝ {x | |x.re| < 1 ∧ |x.im| < ↑(f ↑x✝¹) ^ 2}

case neg
K : Type u_1
inst✝ : Field K
f : InfinitePlace K → ℝ≥0
w₀ x✝¹ : { w // w.IsComplex }
x✝ : x✝¹ ∈ Set.univ
h✝ : ¬x✝¹ = w₀
⊢ Convex ℝ (ball 0 ↑(f ↑x✝¹))

tactic: simp_rw [abs_lt]
state_before: case pos
K : Type u_1
inst✝ : Field K
f : InfinitePlace K → ℝ≥0
w₀ x✝¹ : { w // w.IsComplex }
x✝ : x✝¹ ∈ Set.univ
h✝ : x✝¹ = w₀
⊢ Convex ℝ {x | |x.re| < 1 ∧ |x.im| < ↑(f ↑x✝¹) ^ 2}
state_after: case pos
K : Type u_1
inst✝ : Field K
f : InfinitePlace K → ℝ≥0
w₀ x✝¹ : { w // w.IsComplex }
x✝ : x✝¹ ∈ Set.univ
h✝ : x✝¹ = w₀
⊢ Convex ℝ {x | (-1 < x.re ∧ x.re < 1) ∧ -↑(f ↑x✝¹) ^ 2 < x.im ∧ x.im < ↑(f ↑x✝¹) ^ 2}

tactic: refine Convex.inter ((convex_halfspace_re_gt _).inter  (convex_halfspace_re_lt _))
  ((convex_halfspace_im_gt _).inter  (convex_halfspace_im_lt _))
state_before: case pos
K : Type u_1
inst✝ : Field K
f : InfinitePlace K → ℝ≥0
w₀ x✝¹ : { w // w.IsComplex }
x✝ : x✝¹ ∈ Set.univ
h✝ : x✝¹ = w₀
⊢ Convex ℝ {x | (-1 < x.re ∧ x.re < 1) ∧ -↑(f ↑x✝¹) ^ 2 < x.im ∧ x.im < ↑(f ↑x✝¹) ^ 2}
state_after: no goals

tactic: exact convex_ball _ _
state_before: case neg
K : Type u_1
inst✝ : Field K
f : InfinitePlace K → ℝ≥0
w₀ x✝¹ : { w // w.IsComplex }
x✝ : x✝¹ ∈ Set.univ
h✝ : ¬x✝¹ = w₀
⊢ Convex ℝ (ball 0 ↑(f ↑x✝¹))
state_after: no goals
Theorem: Mathlib.Tactic.Ring.pow_one
File: Mathlib/Tactic/Ring/Basic.lean

tactic: simp
state_before: u : Lean.Level
R : Type u_1
α : Q(Type u)
sα : Q(CommSemiring «$α»)
inst✝ : CommSemiring R
a : R
⊢ a ^ 1 = a
state_after: no goals
Theorem: Ordinal.opow_isLimit_left
File: Mathlib/SetTheory/Ordinal/Exponential.lean

tactic: rcases zero_or_succ_or_limit b with (e | ⟨b, rfl⟩ | l')
state_before: a b : Ordinal.{u_1}
l : a.IsLimit
hb : b ≠ 0
⊢ (a ^ b).IsLimit
state_after: case inl
a b : Ordinal.{u_1}
l : a.IsLimit
hb : b ≠ 0
e : b = 0
⊢ (a ^ b).IsLimit

case inr.inl.intro
a : Ordinal.{u_1}
l : a.IsLimit
b : Ordinal.{u_1}
hb : succ b ≠ 0
⊢ (a ^ succ b).IsLimit

case inr.inr
a b : Ordinal.{u_1}
l : a.IsLimit
hb : b ≠ 0
l' : b.IsLimit
⊢ (a ^ b).IsLimit

tactic: exact absurd e hb
state_before: case inl
a b : Ordinal.{u_1}
l : a.IsLimit
hb : b ≠ 0
e : b = 0
⊢ (a ^ b).IsLimit
state_after: no goals

tactic: rw [opow_succ]
state_before: case inr.inl.intro
a : Ordinal.{u_1}
l : a.IsLimit
b : Ordinal.{u_1}
hb : succ b ≠ 0
⊢ (a ^ succ b).IsLimit
state_after: case inr.inl.intro
a : Ordinal.{u_1}
l : a.IsLimit
b : Ordinal.{u_1}
hb : succ b ≠ 0
⊢ (a ^ b * a).IsLimit

tactic: exact mul_isLimit (opow_pos _ l.pos) l
state_before: case inr.inl.intro
a : Ordinal.{u_1}
l : a.IsLimit
b : Ordinal.{u_1}
hb : succ b ≠ 0
⊢ (a ^ b * a).IsLimit
state_after: no goals

tactic: exact opow_isLimit l.one_lt l'
state_before: case inr.inr
a b : Ordinal.{u_1}
l : a.IsLimit
hb : b ≠ 0
l' : b.IsLimit
⊢ (a ^ b).IsLimit
state_after: no goals
Theorem: Fin.append_left_snoc
File: Mathlib/Data/Fin/Tuple/Basic.lean

tactic: rw [snoc_eq_append, append_assoc, append_left_eq_cons, append_cast_right]
state_before: m✝ n✝ : ℕ
α✝ : Fin (n✝ + 1) → Type u
x✝ : α✝ (last n✝)
q : (i : Fin (n✝ + 1)) → α✝ i
p : (i : Fin n✝) → α✝ i.castSucc
i : Fin n✝
y : α✝ i.castSucc
z : α✝ (last n✝)
n m : ℕ
α : Type u_1
xs : Fin n → α
x : α
ys : Fin m → α
⊢ append (snoc xs x) ys = append xs (cons x ys) ∘ cast ⋯
state_after: m✝ n✝ : ℕ
α✝ : Fin (n✝ + 1) → Type u
x✝ : α✝ (last n✝)
q : (i : Fin (n✝ + 1)) → α✝ i
p : (i : Fin n✝) → α✝ i.castSucc
i : Fin n✝
y : α✝ i.castSucc
z : α✝ (last n✝)
n m : ℕ
α : Type u_1
xs : Fin n → α
x : α
ys : Fin m → α
⊢ (append xs (cons (cons x elim0 0) ys) ∘ cast ⋯) ∘ cast ⋯ = append xs (cons x ys) ∘ cast ⋯

tactic: rfl
state_before: m✝ n✝ : ℕ
α✝ : Fin (n✝ + 1) → Type u
x✝ : α✝ (last n✝)
q : (i : Fin (n✝ + 1)) → α✝ i
p : (i : Fin n✝) → α✝ i.castSucc
i : Fin n✝
y : α✝ i.castSucc
z : α✝ (last n✝)
n m : ℕ
α : Type u_1
xs : Fin n → α
x : α
ys : Fin m → α
⊢ (append xs (cons (cons x elim0 0) ys) ∘ cast ⋯) ∘ cast ⋯ = append xs (cons x ys) ∘ cast ⋯
state_after: no goals
Theorem: PosNum.cast_inj
File: Mathlib/Data/Num/Lemmas.lean

tactic: rw [← cast_to_nat m, ← cast_to_nat n, Nat.cast_inj, to_nat_inj]
state_before: α : Type u_1
inst✝¹ : AddMonoidWithOne α
inst✝ : CharZero α
m n : PosNum
⊢ ↑m = ↑n ↔ m = n
state_after: no goals
Theorem: spectrum.zero_not_mem_iff
File: Mathlib/Algebra/Algebra/Spectrum.lean

tactic: rw [zero_mem_iff, Classical.not_not]
state_before: R : Type u
A : Type v
inst✝² : CommSemiring R
inst✝¹ : Ring A
inst✝ : Algebra R A
a : A
⊢ 0 ∉ σ a ↔ IsUnit a
state_after: no goals
Theorem: ENNReal.toNNReal_iSup
File: Mathlib/Data/ENNReal/Real.lean

tactic: lift f to ι → ℝ≥0 using hf
state_before: ι : Sort u_1
f g : ι → ℝ≥0∞
a b c d : ℝ≥0∞
r p q : ℝ≥0
hf : ∀ (i : ι), f i ≠ ⊤
⊢ (iSup f).toNNReal = ⨆ i, (f i).toNNReal
state_after: case intro
ι : Sort u_1
g : ι → ℝ≥0∞
a b c d : ℝ≥0∞
r p q : ℝ≥0
f : ι → ℝ≥0
⊢ (⨆ i, ↑(f i)).toNNReal = ⨆ i, ((fun i => ↑(f i)) i).toNNReal

tactic: simp_rw [toNNReal_coe]
state_before: case intro
ι : Sort u_1
g : ι → ℝ≥0∞
a b c d : ℝ≥0∞
r p q : ℝ≥0
f : ι → ℝ≥0
⊢ (⨆ i, ↑(f i)).toNNReal = ⨆ i, ((fun i => ↑(f i)) i).toNNReal
state_after: case intro
ι : Sort u_1
g : ι → ℝ≥0∞
a b c d : ℝ≥0∞
r p q : ℝ≥0
f : ι → ℝ≥0
⊢ (⨆ i, ↑(f i)).toNNReal = ⨆ i, f i

tactic: by_cases h : BddAbove (range f)
state_before: case intro
ι : Sort u_1
g : ι → ℝ≥0∞
a b c d : ℝ≥0∞
r p q : ℝ≥0
f : ι → ℝ≥0
⊢ (⨆ i, ↑(f i)).toNNReal = ⨆ i, f i
state_after: case pos
ι : Sort u_1
g : ι → ℝ≥0∞
a b c d : ℝ≥0∞
r p q : ℝ≥0
f : ι → ℝ≥0
h : BddAbove (range f)
⊢ (⨆ i, ↑(f i)).toNNReal = ⨆ i, f i

case neg
ι : Sort u_1
g : ι → ℝ≥0∞
a b c d : ℝ≥0∞
r p q : ℝ≥0
f : ι → ℝ≥0
h : ¬BddAbove (range f)
⊢ (⨆ i, ↑(f i)).toNNReal = ⨆ i, f i

tactic: rw [← coe_iSup h, toNNReal_coe]
state_before: case pos
ι : Sort u_1
g : ι → ℝ≥0∞
a b c d : ℝ≥0∞
r p q : ℝ≥0
f : ι → ℝ≥0
h : BddAbove (range f)
⊢ (⨆ i, ↑(f i)).toNNReal = ⨆ i, f i
state_after: no goals

tactic: rw [NNReal.iSup_of_not_bddAbove h, iSup_coe_eq_top.2 h, top_toNNReal]
state_before: case neg
ι : Sort u_1
g : ι → ℝ≥0∞
a b c d : ℝ≥0∞
r p q : ℝ≥0
f : ι → ℝ≥0
h : ¬BddAbove (range f)
⊢ (⨆ i, ↑(f i)).toNNReal = ⨆ i, f i
state_after: no goals
Theorem: NNReal.tendsto_algebraMap_inverse_atTop_nhds_zero_nat
File: Mathlib/Analysis/SpecificLimits/Basic.lean

tactic: convert (continuous_algebraMap ℝ≥0 𝕜).continuousAt.tendsto.comp
  tendsto_inverse_atTop_nhds_zero_nat
state_before: α : Type u_1
β : Type u_2
ι : Type u_3
𝕜 : Type u_4
inst✝³ : Semiring 𝕜
inst✝² : Algebra ℝ≥0 𝕜
inst✝¹ : TopologicalSpace 𝕜
inst✝ : ContinuousSMul ℝ≥0 𝕜
⊢ Tendsto (⇑(algebraMap ℝ≥0 𝕜) ∘ fun n => (↑n)⁻¹) atTop (𝓝 0)
state_after: case h.e'_5.h.e'_3
α : Type u_1
β : Type u_2
ι : Type u_3
𝕜 : Type u_4
inst✝³ : Semiring 𝕜
inst✝² : Algebra ℝ≥0 𝕜
inst✝¹ : TopologicalSpace 𝕜
inst✝ : ContinuousSMul ℝ≥0 𝕜
⊢ 0 = (algebraMap ℝ≥0 𝕜) 0

tactic: rw [map_zero]
state_before: case h.e'_5.h.e'_3
α : Type u_1
β : Type u_2
ι : Type u_3
𝕜 : Type u_4
inst✝³ : Semiring 𝕜
inst✝² : Algebra ℝ≥0 𝕜
inst✝¹ : TopologicalSpace 𝕜
inst✝ : ContinuousSMul ℝ≥0 𝕜
⊢ 0 = (algebraMap ℝ≥0 𝕜) 0
state_after: no goals
Theorem: List.Chain'.sublist
File: Mathlib/Data/List/Chain.lean

tactic: rw [chain'_iff_pairwise] at hl ⊢
state_before: α : Type u
β : Type v
R r : α → α → Prop
l l₁ l₂ : List α
a b : α
inst✝ : IsTrans α R
hl : Chain' R l₂
h : l₁ <+ l₂
⊢ Chain' R l₁
state_after: α : Type u
β : Type v
R r : α → α → Prop
l l₁ l₂ : List α
a b : α
inst✝ : IsTrans α R
hl : Pairwise R l₂
h : l₁ <+ l₂
⊢ Pairwise R l₁

tactic: exact hl.sublist h
state_before: α : Type u
β : Type v
R r : α → α → Prop
l l₁ l₂ : List α
a b : α
inst✝ : IsTrans α R
hl : Pairwise R l₂
h : l₁ <+ l₂
⊢ Pairwise R l₁
state_after: no goals
Theorem: Set.image_sub_const_Ioi
File: Mathlib/Data/Set/Pointwise/Interval.lean

tactic: simp [sub_eq_neg_add]
state_before: α : Type u_1
inst✝ : OrderedAddCommGroup α
a b c : α
⊢ (fun x => x - a) '' Ioi b = Ioi (b - a)
state_after: no goals
Theorem: padicNorm.int_lt_one_iff
File: Mathlib/NumberTheory/Padics/PadicNorm.lean

tactic: rw [← not_iff_not, ← int_eq_one_iff, eq_iff_le_not_lt]
state_before: p : ℕ
hp : Fact (Nat.Prime p)
m : ℤ
⊢ padicNorm p ↑m < 1 ↔ ↑p ∣ m
state_after: p : ℕ
hp : Fact (Nat.Prime p)
m : ℤ
⊢ ¬padicNorm p ↑m < 1 ↔ padicNorm p ↑m ≤ 1 ∧ ¬padicNorm p ↑m < 1

tactic: simp only [padicNorm.of_int, true_and_iff]
state_before: p : ℕ
hp : Fact (Nat.Prime p)
m : ℤ
⊢ ¬padicNorm p ↑m < 1 ↔ padicNorm p ↑m ≤ 1 ∧ ¬padicNorm p ↑m < 1
state_after: no goals
Theorem: ArithmeticFunction.abs_moebius_le_one
File: Mathlib/NumberTheory/ArithmeticFunction.lean

tactic: simp
state_before: R : Type u_1
n : ℕ
⊢ if Squarefree n then 1 ≤ 1 else 0 ≤ 1
state_after: no goals
Theorem: Polynomial.mem_iff_eq_smul_annIdealGenerator
File: Mathlib/LinearAlgebra/AnnihilatingPolynomial.lean

tactic: simp_rw [@eq_comm _ p, ← mem_span_singleton, ← span_singleton_annIdealGenerator 𝕜 a, Ideal.span]
state_before: 𝕜 : Type u_1
A : Type u_2
inst✝² : Field 𝕜
inst✝¹ : Ring A
inst✝ : Algebra 𝕜 A
p : 𝕜[X]
a : A
⊢ p ∈ annIdeal 𝕜 a ↔ ∃ s, p = s • annIdealGenerator 𝕜 a
state_after: no goals
Theorem: multiplicity.dvd_iff_multiplicity_pos
File: Mathlib/RingTheory/Multiplicity.lean

tactic: simpa only [heq, Nat.cast_zero] using PartENat.coe_lt_coe.mpr zero_lt_one
state_before: α : Type u_1
β : Type u_2
inst✝³ : Monoid α
inst✝² : Monoid β
inst✝¹ : DecidableRel fun x x_1 => x ∣ x_1
inst✝ : DecidableRel fun x x_1 => x ∣ x_1
a b : α
hdvd : a ∣ b
heq : 0 = multiplicity a b
⊢ multiplicity a b < 1
state_after: no goals

tactic: rwa [pow_one a]
state_before: α : Type u_1
β : Type u_2
inst✝³ : Monoid α
inst✝² : Monoid β
inst✝¹ : DecidableRel fun x x_1 => x ∣ x_1
inst✝ : DecidableRel fun x x_1 => x ∣ x_1
a b : α
hdvd : a ∣ b
heq : 0 = multiplicity a b
⊢ a ^ 1 ∣ b
state_after: no goals
Theorem: toBilin'Aux_toMatrixAux
File: Mathlib/LinearAlgebra/Matrix/BilinearForm.lean

tactic: rw [BilinForm.toMatrixAux, Matrix.toBilin'Aux,
  toLinearMap₂'Aux_toMatrix₂Aux]
state_before: R : Type u_1
M : Type u_2
inst✝¹⁷ : CommSemiring R
inst✝¹⁶ : AddCommMonoid M
inst✝¹⁵ : Module R M
R₁ : Type u_3
M₁ : Type u_4
inst✝¹⁴ : CommRing R₁
inst✝¹³ : AddCommGroup M₁
inst✝¹² : Module R₁ M₁
R₂ : Type u_5
M₂ : Type u_6
inst✝¹¹ : CommSemiring R₂
inst✝¹⁰ : AddCommMonoid M₂
inst✝⁹ : Module R₂ M₂
R₃ : Type u_7
M₃ : Type u_8
inst✝⁸ : CommRing R₃
inst✝⁷ : AddCommGroup M₃
inst✝⁶ : Module R₃ M₃
V : Type u_9
K : Type u_10
inst✝⁵ : Field K
inst✝⁴ : AddCommGroup V
inst✝³ : Module K V
B : BilinForm R M
B₁ : BilinForm R₁ M₁
B₂✝ : BilinForm R₂ M₂
n : Type u_11
o : Type u_12
inst✝² : Fintype n
inst✝¹ : Fintype o
inst✝ : DecidableEq n
B₂ : BilinForm R₂ (n → R₂)
⊢ ((BilinForm.toMatrixAux fun j => (LinearMap.stdBasis R₂ (fun x => R₂) j) 1) B₂).toBilin'Aux = B₂
state_after: no goals