ruc-ai4math/mathlib_handler_benchmark_410 huggingface dataset:
Theorem: Set.ssubset_iff_insert
File: Mathlib/Data/Set/Basic.lean

Proof steps:
state_before: α : Type u
β : Type v
γ : Type w
ι : Sort x
a b : α
s✝ s₁ s₂ t✝ t₁ t₂ u s t : Set α
⊢ s ⊂ t ↔ ∃ a ∉ s, insert a s ⊆ t
state_after: α : Type u
β : Type v
γ : Type w
ι : Sort x
a b : α
s✝ s₁ s₂ t✝ t₁ t₂ u s t : Set α
⊢ (s ⊆ t ∧ ∃ a ∈ t, a ∉ s) ↔ ∃ a ∉ s, a ∈ t ∧ s ⊆ t
tactic: simp only [insert_subset_iff, exists_and_right, ssubset_def, not_subset]
state_before: α : Type u
β : Type v
γ : Type w
ι : Sort x
a b : α
s✝ s₁ s₂ t✝ t₁ t₂ u s t : Set α
⊢ (s ⊆ t ∧ ∃ a ∈ t, a ∉ s) ↔ ∃ a ∉ s, a ∈ t ∧ s ⊆ t
state_after: no goals
tactic: aesop
Theorem: ContinuousMap.Nullhomotopic.comp_left
File: Mathlib/Topology/Homotopy/Contractible.lean

Proof steps:
state_before: X : Type u_1
Y : Type u_2
Z : Type u_3
inst✝² : TopologicalSpace X
inst✝¹ : TopologicalSpace Y
inst✝ : TopologicalSpace Z
f : C(Y, Z)
hf : f.Nullhomotopic
g : C(X, Y)
⊢ (f.comp g).Nullhomotopic
state_after: case intro
X : Type u_1
Y : Type u_2
Z : Type u_3
inst✝² : TopologicalSpace X
inst✝¹ : TopologicalSpace Y
inst✝ : TopologicalSpace Z
f : C(Y, Z)
g : C(X, Y)
y : Z
hy : f.Homotopic (const Y y)
⊢ (f.comp g).Nullhomotopic
tactic: cases' hf with y hy
state_before: case intro
X : Type u_1
Y : Type u_2
Z : Type u_3
inst✝² : TopologicalSpace X
inst✝¹ : TopologicalSpace Y
inst✝ : TopologicalSpace Z
f : C(Y, Z)
g : C(X, Y)
y : Z
hy : f.Homotopic (const Y y)
⊢ (f.comp g).Nullhomotopic
state_after: case h
X : Type u_1
Y : Type u_2
Z : Type u_3
inst✝² : TopologicalSpace X
inst✝¹ : TopologicalSpace Y
inst✝ : TopologicalSpace Z
f : C(Y, Z)
g : C(X, Y)
y : Z
hy : f.Homotopic (const Y y)
⊢ (f.comp g).Homotopic (const X y)
tactic: use y
state_before: case h
X : Type u_1
Y : Type u_2
Z : Type u_3
inst✝² : TopologicalSpace X
inst✝¹ : TopologicalSpace Y
inst✝ : TopologicalSpace Z
f : C(Y, Z)
g : C(X, Y)
y : Z
hy : f.Homotopic (const Y y)
⊢ (f.comp g).Homotopic (const X y)
state_after: no goals
tactic: exact Homotopic.hcomp (Homotopic.refl g) hy
Theorem: Finset.shatters_univ
File: Mathlib/Combinatorics/SetFamily/Shatter.lean

Proof steps:
state_before: α : Type u_1
inst✝¹ : DecidableEq α
𝒜 ℬ : Finset (Finset α)
s t : Finset α
a : α
n : ℕ
inst✝ : Fintype α
⊢ 𝒜.Shatters univ ↔ 𝒜 = univ
state_after: α : Type u_1
inst✝¹ : DecidableEq α
𝒜 ℬ : Finset (Finset α)
s t : Finset α
a : α
n : ℕ
inst✝ : Fintype α
⊢ image (fun t => univ ∩ t) 𝒜 = univ ↔ 𝒜 = univ
tactic: rw [shatters_iff, powerset_univ]
state_before: α : Type u_1
inst✝¹ : DecidableEq α
𝒜 ℬ : Finset (Finset α)
s t : Finset α
a : α
n : ℕ
inst✝ : Fintype α
⊢ image (fun t => univ ∩ t) 𝒜 = univ ↔ 𝒜 = univ
state_after: no goals
tactic: simp_rw [univ_inter, image_id']
Theorem: ModularCyclotomicCharacter.spec
File: Mathlib/NumberTheory/Cyclotomic/CyclotomicCharacter.lean

Proof steps:
state_before: L : Type u
inst✝¹ : CommRing L
inst✝ : IsDomain L
n✝ n : ℕ+
hn : Fintype.card ↥(rootsOfUnity n L) = ↑n
g : L ≃+* L
t : Lˣ
ht : t ∈ rootsOfUnity n L
⊢ g ↑t = ↑t ^ (↑((ModularCyclotomicCharacter L hn) g)).val
state_after: L : Type u
inst✝¹ : CommRing L
inst✝ : IsDomain L
n✝ n : ℕ+
hn : Fintype.card ↥(rootsOfUnity n L) = ↑n
g : L ≃+* L
t : Lˣ
ht : t ∈ rootsOfUnity n L
⊢ ↑t ^ (toFun n g).val = ↑t ^ (↑((ModularCyclotomicCharacter L hn) g)).val
tactic: rw [toFun_spec' g ht]
state_before: L : Type u
inst✝¹ : CommRing L
inst✝ : IsDomain L
n✝ n : ℕ+
hn : Fintype.card ↥(rootsOfUnity n L) = ↑n
g : L ≃+* L
t : Lˣ
ht : t ∈ rootsOfUnity n L
⊢ ↑t ^ (toFun n g).val = ↑t ^ (↑((ModularCyclotomicCharacter L hn) g)).val
state_after: case e_a
L : Type u
inst✝¹ : CommRing L
inst✝ : IsDomain L
n✝ n : ℕ+
hn : Fintype.card ↥(rootsOfUnity n L) = ↑n
g : L ≃+* L
t : Lˣ
ht : t ∈ rootsOfUnity n L
⊢ (toFun n g).val = (↑((ModularCyclotomicCharacter L hn) g)).val
tactic: congr 1
state_before: case e_a
L : Type u
inst✝¹ : CommRing L
inst✝ : IsDomain L
n✝ n : ℕ+
hn : Fintype.card ↥(rootsOfUnity n L) = ↑n
g : L ≃+* L
t : Lˣ
ht : t ∈ rootsOfUnity n L
⊢ (toFun n g).val = (↑((ModularCyclotomicCharacter L hn) g)).val
state_after: no goals
tactic: exact (ZMod.ringEquivCongr_val _ _).symm
Theorem: MeasurableSpace.DynkinSystem.has_univ
File: Mathlib/MeasureTheory/PiSystem.lean

Proof steps:
state_before: α : Type u_1
d : DynkinSystem α
⊢ d.Has univ
state_after: no goals
tactic: simpa using d.has_compl d.has_empty
Theorem: AlgebraicTopology.DoldKan.hσ'_naturality
File: Mathlib/AlgebraicTopology/DoldKan/Homotopies.lean

Proof steps:
state_before: C : Type u_1
inst✝¹ : Category.{u_2, u_1} C
inst✝ : Preadditive C
X✝ : SimplicialObject C
q n m : ℕ
hnm : c.Rel m n
X Y : SimplicialObject C
f : X ⟶ Y
⊢ f.app (op [n]) ≫ hσ' q n m hnm = hσ' q n m hnm ≫ f.app (op [m])
state_after: C : Type u_1
inst✝¹ : Category.{u_2, u_1} C
inst✝ : Preadditive C
X✝ : SimplicialObject C
q n m : ℕ
hnm : c.Rel m n
X Y : SimplicialObject C
f : X ⟶ Y
h : n + 1 = m
⊢ f.app (op [n]) ≫ hσ' q n m hnm = hσ' q n m hnm ≫ f.app (op [m])
tactic: have h : n + 1 = m := hnm
state_before: C : Type u_1
inst✝¹ : Category.{u_2, u_1} C
inst✝ : Preadditive C
X✝ : SimplicialObject C
q n m : ℕ
hnm : c.Rel m n
X Y : SimplicialObject C
f : X ⟶ Y
h : n + 1 = m
⊢ f.app (op [n]) ≫ hσ' q n m hnm = hσ' q n m hnm ≫ f.app (op [m])
state_after: C : Type u_1
inst✝¹ : Category.{u_2, u_1} C
inst✝ : Preadditive C
X✝ : SimplicialObject C
q n : ℕ
X Y : SimplicialObject C
f : X ⟶ Y
hnm : c.Rel (n + 1) n
⊢ f.app (op [n]) ≫ hσ' q n (n + 1) hnm = hσ' q n (n + 1) hnm ≫ f.app (op [n + 1])
tactic: subst h
state_before: C : Type u_1
inst✝¹ : Category.{u_2, u_1} C
inst✝ : Preadditive C
X✝ : SimplicialObject C
q n : ℕ
X Y : SimplicialObject C
f : X ⟶ Y
hnm : c.Rel (n + 1) n
⊢ f.app (op [n]) ≫ hσ' q n (n + 1) hnm = hσ' q n (n + 1) hnm ≫ f.app (op [n + 1])
state_after: C : Type u_1
inst✝¹ : Category.{u_2, u_1} C
inst✝ : Preadditive C
X✝ : SimplicialObject C
q n : ℕ
X Y : SimplicialObject C
f : X ⟶ Y
hnm : c.Rel (n + 1) n
⊢ f.app (op [n]) ≫ hσ q n = hσ q n ≫ f.app (op [n + 1])
tactic: simp only [hσ', eqToHom_refl, comp_id]
state_before: C : Type u_1
inst✝¹ : Category.{u_2, u_1} C
inst✝ : Preadditive C
X✝ : SimplicialObject C
q n : ℕ
X Y : SimplicialObject C
f : X ⟶ Y
hnm : c.Rel (n + 1) n
⊢ f.app (op [n]) ≫ hσ q n = hσ q n ≫ f.app (op [n + 1])
state_after: C : Type u_1
inst✝¹ : Category.{u_2, u_1} C
inst✝ : Preadditive C
X✝ : SimplicialObject C
q n : ℕ
X Y : SimplicialObject C
f : X ⟶ Y
hnm : c.Rel (n + 1) n
⊢ (f.app (op [n]) ≫ if n < q then 0 else (-1) ^ (n - q) • Y.σ ⟨n - q, ⋯⟩) =
    (if n < q then 0 else (-1) ^ (n - q) • X.σ ⟨n - q, ⋯⟩) ≫ f.app (op [n + 1])
tactic: unfold hσ
state_before: C : Type u_1
inst✝¹ : Category.{u_2, u_1} C
inst✝ : Preadditive C
X✝ : SimplicialObject C
q n : ℕ
X Y : SimplicialObject C
f : X ⟶ Y
hnm : c.Rel (n + 1) n
⊢ (f.app (op [n]) ≫ if n < q then 0 else (-1) ^ (n - q) • Y.σ ⟨n - q, ⋯⟩) =
    (if n < q then 0 else (-1) ^ (n - q) • X.σ ⟨n - q, ⋯⟩) ≫ f.app (op [n + 1])
state_after: case pos
C : Type u_1
inst✝¹ : Category.{u_2, u_1} C
inst✝ : Preadditive C
X✝ : SimplicialObject C
q n : ℕ
X Y : SimplicialObject C
f : X ⟶ Y
hnm : c.Rel (n + 1) n
h✝ : n < q
⊢ f.app (op [n]) ≫ 0 = 0 ≫ f.app (op [n + 1])

case neg
C : Type u_1
inst✝¹ : Category.{u_2, u_1} C
inst✝ : Preadditive C
X✝ : SimplicialObject C
q n : ℕ
X Y : SimplicialObject C
f : X ⟶ Y
hnm : c.Rel (n + 1) n
h✝ : ¬n < q
⊢ f.app (op [n]) ≫ ((-1) ^ (n - q) • Y.σ ⟨n - q, ⋯⟩) = ((-1) ^ (n - q) • X.σ ⟨n - q, ⋯⟩) ≫ f.app (op [n + 1])
tactic: split_ifs
Theorem: Function.support_prod_mk'
File: Mathlib/Algebra/Group/Support.lean

Proof steps:
state_before: α : Type u_1
β : Type u_2
A : Type u_3
B : Type u_4
M : Type u_5
M' : Type u_6
N : Type u_7
P : Type u_8
G : Type u_9
inst✝² : One M
inst✝¹ : One N
inst✝ : One P
f : α → M × N
⊢ mulSupport f = (mulSupport fun x => (f x).1) ∪ mulSupport fun x => (f x).2
state_after: no goals
tactic: simp only [← mulSupport_prod_mk]
Theorem: WithBot.unbot'_eq_iff
File: Mathlib/Order/WithBot.lean

Proof steps:
state_before: α : Type u_1
β : Type u_2
γ : Type u_3
δ : Type u_4
a b d y : α
x : WithBot α
⊢ unbot' d x = y ↔ x = ↑y ∨ x = ⊥ ∧ y = d
state_after: no goals
tactic: induction x <;> simp [@eq_comm _ d]
Theorem: List.perm_mergeSort
File: Mathlib/Data/List/Sort.lean

Proof steps:
state_before: α : Type u
r : α → α → Prop
inst✝ : DecidableRel r
⊢ mergeSort r [] ~ []
state_after: no goals
tactic: simp [mergeSort]
state_before: α : Type u
r : α → α → Prop
inst✝ : DecidableRel r
a : α
⊢ mergeSort r [a] ~ [a]
state_after: no goals
tactic: simp [mergeSort]
state_before: α : Type u
r : α → α → Prop
inst✝ : DecidableRel r
a b : α
l : List α
⊢ mergeSort r (a :: b :: l) ~ a :: b :: l
state_after: case mk
α : Type u
r : α → α → Prop
inst✝ : DecidableRel r
a b : α
l l₁ l₂ : List α
e : (a :: b :: l).split = (l₁, l₂)
⊢ mergeSort r (a :: b :: l) ~ a :: b :: l
tactic: cases' e : split (a :: b :: l) with l₁ l₂
state_before: case mk
α : Type u
r : α → α → Prop
inst✝ : DecidableRel r
a b : α
l l₁ l₂ : List α
e : (a :: b :: l).split = (l₁, l₂)
⊢ mergeSort r (a :: b :: l) ~ a :: b :: l
state_after: case mk.intro
α : Type u
r : α → α → Prop
inst✝ : DecidableRel r
a b : α
l l₁ l₂ : List α
e : (a :: b :: l).split = (l₁, l₂)
h₁ : l₁.length < (a :: b :: l).length
h₂ : l₂.length < (a :: b :: l).length
⊢ mergeSort r (a :: b :: l) ~ a :: b :: l
tactic: cases' length_split_lt e with h₁ h₂
state_before: case mk.intro
α : Type u
r : α → α → Prop
inst✝ : DecidableRel r
a b : α
l l₁ l₂ : List α
e : (a :: b :: l).split = (l₁, l₂)
h₁ : l₁.length < (a :: b :: l).length
h₂ : l₂.length < (a :: b :: l).length
⊢ mergeSort r (a :: b :: l) ~ a :: b :: l
state_after: case mk.intro
α : Type u
r : α → α → Prop
inst✝ : DecidableRel r
a b : α
l l₁ l₂ : List α
e : (a :: b :: l).split = (l₁, l₂)
h₁ : l₁.length < (a :: b :: l).length
h₂ : l₂.length < (a :: b :: l).length
⊢ merge (fun x x_1 => decide (r x x_1)) (mergeSort r l₁) (mergeSort r l₂) ~ a :: b :: l
tactic: rw [mergeSort_cons_cons r e]
state_before: case mk.intro
α : Type u
r : α → α → Prop
inst✝ : DecidableRel r
a b : α
l l₁ l₂ : List α
e : (a :: b :: l).split = (l₁, l₂)
h₁ : l₁.length < (a :: b :: l).length
h₂ : l₂.length < (a :: b :: l).length
⊢ mergeSort r l₁ ++ mergeSort r l₂ ~ a :: b :: l
state_after: no goals
tactic: exact
      ((perm_mergeSort l₁).append (perm_mergeSort l₂)).trans (perm_split e).symm
Theorem: Stream'.Seq.not_mem_nil
File: Mathlib/Data/Seq/Seq.lean

Proof steps:
state_before: α : Type u
β : Type v
γ : Type w
a : α
x✝ : a ∈ nil
w✝ : ℕ
h : some a = none
⊢ False
state_after: no goals
tactic: injection h
Theorem: Metric.eventually_nhds_prod_iff
File: Mathlib/Topology/MetricSpace/Pseudo/Defs.lean

Proof steps:
state_before: α : Type u
β : Type v
X : Type u_1
ι : Type u_2
inst✝ : PseudoMetricSpace α
x y z : α
δ ε ε₁ ε₂ : ℝ
s : Set α
f : Filter ι
x₀ : α
p : α × ι → Prop
⊢ (∀ᶠ (x : α × ι) in 𝓝 x₀ ×ˢ f, p x) ↔
    ∃ ε > 0, ∃ pa, (∀ᶠ (i : ι) in f, pa i) ∧ ∀ {x : α}, dist x x₀ < ε → ∀ {i : ι}, pa i → p (x, i)
state_after: α : Type u
β : Type v
X : Type u_1
ι : Type u_2
inst✝ : PseudoMetricSpace α
x y z : α
δ ε ε₁ ε₂ : ℝ
s : Set α
f : Filter ι
x₀ : α
p : α × ι → Prop
⊢ (∃ i, (0 < i.1 ∧ i.2 ∈ f) ∧ ∀ ⦃x : α × ι⦄, x ∈ ball x₀ i.1 ×ˢ id i.2 → p x) ↔
    ∃ ε > 0, ∃ pa, (∀ᶠ (i : ι) in f, pa i) ∧ ∀ {x : α}, dist x x₀ < ε → ∀ {i : ι}, pa i → p (x, i)
tactic: refine (nhds_basis_ball.prod f.basis_sets).eventually_iff.trans ?_
state_before: α : Type u
β : Type v
X : Type u_1
ι : Type u_2
inst✝ : PseudoMetricSpace α
x y z : α
δ ε ε₁ ε₂ : ℝ
s : Set α
f : Filter ι
x₀ : α
p : α × ι → Prop
⊢ (∃ i, (0 < i.1 ∧ i.2 ∈ f) ∧ ∀ ⦃x : α × ι⦄, x ∈ ball x₀ i.1 ×ˢ id i.2 → p x) ↔
    ∃ ε > 0, ∃ pa, (∀ᶠ (i : ι) in f, pa i) ∧ ∀ {x : α}, dist x x₀ < ε → ∀ {i : ι}, pa i → p (x, i)
state_after: α : Type u
β : Type v
X : Type u_1
ι : Type u_2
inst✝ : PseudoMetricSpace α
x y z : α
δ ε ε₁ ε₂ : ℝ
s : Set α
f : Filter ι
x₀ : α
p : α × ι → Prop
⊢ (∃ a, 0 < a ∧ ∃ x ∈ f, ∀ (x_1 : α), dist x_1 x₀ < a → ∀ y ∈ x, p (x_1, y)) ↔
    ∃ ε > 0, ∃ pa, (∀ᶠ (i : ι) in f, pa i) ∧ ∀ {x : α}, dist x x₀ < ε → ∀ {i : ι}, pa i → p (x, i)
tactic: simp only [Prod.exists, forall_prod_set, id, mem_ball, and_assoc, exists_and_left, and_imp]
state_before: α : Type u
β : Type v
X : Type u_1
ι : Type u_2
inst✝ : PseudoMetricSpace α
x y z : α
δ ε ε₁ ε₂ : ℝ
s : Set α
f : Filter ι
x₀ : α
p : α × ι → Prop
⊢ (∃ a, 0 < a ∧ ∃ x ∈ f, ∀ (x_1 : α), dist x_1 x₀ < a → ∀ y ∈ x, p (x_1, y)) ↔
    ∃ ε > 0, ∃ pa, (∀ᶠ (i : ι) in f, pa i) ∧ ∀ {x : α}, dist x x₀ < ε → ∀ {i : ι}, pa i → p (x, i)
state_after: no goals
tactic: rfl
Theorem: Subgroup.nontrivial_iff_exists_ne_one
File: Mathlib/Algebra/Group/Subgroup/Basic.lean

Proof steps:
state_before: G : Type u_1
G' : Type u_2
G'' : Type u_3
inst✝³ : Group G
inst✝² : Group G'
inst✝¹ : Group G''
A : Type u_4
inst✝ : AddGroup A
H✝ K H : Subgroup G
⊢ Nontrivial ↥H ↔ ∃ x ∈ H, x ≠ 1
state_after: G : Type u_1
G' : Type u_2
G'' : Type u_3
inst✝³ : Group G
inst✝² : Group G'
inst✝¹ : Group G''
A : Type u_4
inst✝ : AddGroup A
H✝ K H : Subgroup G
⊢ (∃ y, ∃ (_ : y ∈ H), y ≠ ↑1) ↔ ∃ x ∈ H, x ≠ 1
tactic: rw [Subtype.nontrivial_iff_exists_ne (fun x => x ∈ H) (1 : H)]
state_before: G : Type u_1
G' : Type u_2
G'' : Type u_3
inst✝³ : Group G
inst✝² : Group G'
inst✝¹ : Group G''
A : Type u_4
inst✝ : AddGroup A
H✝ K H : Subgroup G
⊢ (∃ y, ∃ (_ : y ∈ H), y ≠ ↑1) ↔ ∃ x ∈ H, x ≠ 1
state_after: no goals
tactic: simp
Theorem: mul_invOf_mul_self_cancel'
File: Mathlib/Algebra/Group/Invertible/Defs.lean

Proof steps:
state_before: α : Type u
inst✝ : Monoid α
a b : α
x✝ : Invertible b
⊢ a * ⅟b * b = a
state_after: no goals
tactic: simp [mul_assoc]
Theorem: Trivialization.apply_symm_apply_eq_coordChangeL
File: Mathlib/Topology/VectorBundle/Basic.lean

Proof steps:
state_before: R : Type u_1
B : Type u_2
F : Type u_3
E : B → Type u_4
inst✝⁹ : Semiring R
inst✝⁸ : TopologicalSpace F
inst✝⁷ : TopologicalSpace B
inst✝⁶ : TopologicalSpace (TotalSpace F E)
e✝ : Trivialization F TotalSpace.proj
x : TotalSpace F E
b✝ : B
y : E b✝
inst✝⁵ : AddCommMonoid F
inst✝⁴ : Module R F
inst✝³ : (x : B) → AddCommMonoid (E x)
inst✝² : (x : B) → Module R (E x)
e e' : Trivialization F TotalSpace.proj
inst✝¹ : Trivialization.IsLinear R e
inst✝ : Trivialization.IsLinear R e'
b : B
hb : b ∈ e.baseSet ∩ e'.baseSet
v : F
⊢ ↑e' (↑e.symm (b, v)) = (b, (coordChangeL R e e' b) v)
state_after: no goals
tactic: rw [e.mk_coordChangeL e' hb, e.mk_symm hb.1]
Theorem: Left.one_le_pow_of_le
File: Mathlib/Algebra/Order/Monoid/Unbundled/Pow.lean

Proof steps:
state_before: β : Type u_1
G : Type u_2
M : Type u_3
inst✝² : Monoid M
inst✝¹ : Preorder M
inst✝ : CovariantClass M M (fun x x_1 => x * x_1) fun x x_1 => x ≤ x_1
x : M
hx : 1 ≤ x
n : ℕ
⊢ 1 ≤ x ^ (n + 1)
state_after: β : Type u_1
G : Type u_2
M : Type u_3
inst✝² : Monoid M
inst✝¹ : Preorder M
inst✝ : CovariantClass M M (fun x x_1 => x * x_1) fun x x_1 => x ≤ x_1
x : M
hx : 1 ≤ x
n : ℕ
⊢ 1 ≤ x ^ n * x
tactic: rw [pow_succ]
state_before: β : Type u_1
G : Type u_2
M : Type u_3
inst✝² : Monoid M
inst✝¹ : Preorder M
inst✝ : CovariantClass M M (fun x x_1 => x * x_1) fun x x_1 => x ≤ x_1
x : M
hx : 1 ≤ x
n : ℕ
⊢ 1 ≤ x ^ n * x
state_after: no goals
tactic: exact Left.one_le_mul (Left.one_le_pow_of_le hx) hx
Theorem: circleIntegral.integral_sub_zpow_of_ne
File: Mathlib/MeasureTheory/Integral/CircleIntegral.lean

Proof steps:
state_before: E : Type u_1
inst✝² : NormedAddCommGroup E
inst✝¹ : NormedSpace ℂ E
inst✝ : CompleteSpace E
n : ℤ
hn : n ≠ -1
c w : ℂ
R : ℝ
⊢ (∮ (z : ℂ) in C(c, R), (z - w) ^ n) = 0
state_after: case inl.intro
E : Type u_1
inst✝² : NormedAddCommGroup E
inst✝¹ : NormedSpace ℂ E
inst✝ : CompleteSpace E
n : ℤ
hn✝ : n ≠ -1
c w : ℂ
R : ℝ
hw : w ∈ sphere c |R|
hn : n < -1
⊢ (∮ (z : ℂ) in C(c, R), (z - w) ^ n) = 0

case inr
E : Type u_1
inst✝² : NormedAddCommGroup E
inst✝¹ : NormedSpace ℂ E
inst✝ : CompleteSpace E
n : ℤ
hn : n ≠ -1
c w : ℂ
R : ℝ
H : ¬(w ∈ sphere c |R| ∧ n < -1)
⊢ (∮ (z : ℂ) in C(c, R), (z - w) ^ n) = 0
tactic: rcases em (w ∈ sphere c |R| ∧ n < -1) with (⟨hw, hn⟩ | H)
state_before: case inr
E : Type u_1
inst✝² : NormedAddCommGroup E
inst✝¹ : NormedSpace ℂ E
inst✝ : CompleteSpace E
n : ℤ
hn : n ≠ -1
c w : ℂ
R : ℝ
H : ¬(w ∈ sphere c |R| ∧ n < -1)
⊢ (∮ (z : ℂ) in C(c, R), (z - w) ^ n) = 0
state_after: case inr
E : Type u_1
inst✝² : NormedAddCommGroup E
inst✝¹ : NormedSpace ℂ E
inst✝ : CompleteSpace E
n : ℤ
hn : n ≠ -1
c w : ℂ
R : ℝ
H : w ∈ sphere c |R| → -1 ≤ n
⊢ (∮ (z : ℂ) in C(c, R), (z - w) ^ n) = 0
tactic: push_neg at H
state_before: case inr
E : Type u_1
inst✝² : NormedAddCommGroup E
inst✝¹ : NormedSpace ℂ E
inst✝ : CompleteSpace E
n : ℤ
hn : n ≠ -1
c w : ℂ
R : ℝ
H : w ∈ sphere c |R| → -1 ≤ n
hd : ∀ (z : ℂ), z ≠ w ∨ -1 ≤ n → HasDerivAt (fun z => (z - w) ^ (n + 1) / (↑n + 1)) ((z - w) ^ n) z
⊢ (∮ (z : ℂ) in C(c, R), (z - w) ^ n) = 0
state_after: case inr
E : Type u_1
inst✝² : NormedAddCommGroup E
inst✝¹ : NormedSpace ℂ E
inst✝ : CompleteSpace E
n : ℤ
hn : n ≠ -1
c w : ℂ
R : ℝ
H : w ∈ sphere c |R| → -1 ≤ n
hd : ∀ (z : ℂ), z ≠ w ∨ -1 ≤ n → HasDerivAt (fun z => (z - w) ^ (n + 1) / (↑n + 1)) ((z - w) ^ n) z
z : ℂ
hz : z ∈ sphere c |R|
⊢ z ≠ w ∨ -1 ≤ n
tactic: refine integral_eq_zero_of_hasDerivWithinAt' fun z hz => (hd z ?_).hasDerivWithinAt
state_before: case inr
E : Type u_1
inst✝² : NormedAddCommGroup E
inst✝¹ : NormedSpace ℂ E
inst✝ : CompleteSpace E
n : ℤ
hn : n ≠ -1
c w : ℂ
R : ℝ
H : w ∈ sphere c |R| → -1 ≤ n
hd : ∀ (z : ℂ), z ≠ w ∨ -1 ≤ n → HasDerivAt (fun z => (z - w) ^ (n + 1) / (↑n + 1)) ((z - w) ^ n) z
z : ℂ
hz : z ∈ sphere c |R|
⊢ z ≠ w ∨ -1 ≤ n
state_after: no goals
tactic: exact (ne_or_eq z w).imp_right fun (h : z = w) => H <| h ▸ hz
Theorem: nhdset_of_mem_uniformity
File: Mathlib/Topology/UniformSpace/Basic.lean

Proof steps:
state_before: α : Type ua
β : Type ub
γ : Type uc
δ : Type ud
ι : Sort u_1
inst✝ : UniformSpace α
d s : Set (α × α)
hd : d ∈ 𝓤 α
⊢ ∃ t, IsOpen t ∧ s ⊆ t ∧ t ⊆ {p | ∃ x y, (p.1, x) ∈ d ∧ (x, y) ∈ s ∧ (y, p.2) ∈ d}
state_after: α : Type ua
β : Type ub
γ : Type uc
δ : Type ud
ι : Sort u_1
inst✝ : UniformSpace α
d s : Set (α × α)
hd : d ∈ 𝓤 α
cl_d : Set (α × α) := {p | ∃ x y, (p.1, x) ∈ d ∧ (x, y) ∈ s ∧ (y, p.2) ∈ d}
⊢ ∃ t, IsOpen t ∧ s ⊆ t ∧ t ⊆ {p | ∃ x y, (p.1, x) ∈ d ∧ (x, y) ∈ s ∧ (y, p.2) ∈ d}
tactic: let cl_d := { p : α × α | ∃ x y, (p.1, x) ∈ d ∧ (x, y) ∈ s ∧ (y, p.2) ∈ d }
state_before: α : Type ua
β : Type ub
γ : Type uc
δ : Type ud
ι : Sort u_1
inst✝ : UniformSpace α
d s : Set (α × α)
hd : d ∈ 𝓤 α
cl_d : Set (α × α) := {p | ∃ x y, (p.1, x) ∈ d ∧ (x, y) ∈ s ∧ (y, p.2) ∈ d}
this : ∀ p ∈ s, ∃ t ⊆ cl_d, IsOpen t ∧ p ∈ t
⊢ ∃ t, IsOpen t ∧ s ⊆ t ∧ t ⊆ {p | ∃ x y, (p.1, x) ∈ d ∧ (x, y) ∈ s ∧ (y, p.2) ∈ d}
state_after: α : Type ua
β : Type ub
γ : Type uc
δ : Type ud
ι : Sort u_1
inst✝ : UniformSpace α
d s : Set (α × α)
hd : d ∈ 𝓤 α
cl_d : Set (α × α) := {p | ∃ x y, (p.1, x) ∈ d ∧ (x, y) ∈ s ∧ (y, p.2) ∈ d}
t : (p : α × α) → p ∈ s → Set (α × α)
ht : ∀ (p : α × α) (a : p ∈ s), t p a ⊆ cl_d ∧ IsOpen (t p a) ∧ p ∈ t p a
⊢ ∃ t, IsOpen t ∧ s ⊆ t ∧ t ⊆ {p | ∃ x y, (p.1, x) ∈ d ∧ (x, y) ∈ s ∧ (y, p.2) ∈ d}
tactic: choose t ht using this
state_before: α : Type ua
β : Type ub
γ : Type uc
δ : Type ud
ι : Sort u_1
inst✝ : UniformSpace α
d s : Set (α × α)
hd : d ∈ 𝓤 α
cl_d : Set (α × α) := {p | ∃ x y, (p.1, x) ∈ d ∧ (x, y) ∈ s ∧ (y, p.2) ∈ d}
t : (p : α × α) → p ∈ s → Set (α × α)
ht : ∀ (p : α × α) (a : p ∈ s), t p a ⊆ cl_d ∧ IsOpen (t p a) ∧ p ∈ t p a
⊢ ∃ t, IsOpen t ∧ s ⊆ t ∧ t ⊆ {p | ∃ x y, (p.1, x) ∈ d ∧ (x, y) ∈ s ∧ (y, p.2) ∈ d}
state_after: no goals
tactic: exact ⟨(⋃ p : α × α, ⋃ h : p ∈ s, t p h : Set (α × α)),
    isOpen_iUnion fun p : α × α => isOpen_iUnion fun hp => (ht p hp).right.left,
    fun ⟨a, b⟩ hp => by
      simp only [mem_iUnion, Prod.exists]; exact ⟨a, b, hp, (ht (a, b) hp).right.right⟩,
    iUnion_subset fun p => iUnion_subset fun hp => (ht p hp).left⟩
Theorem: PrimeSpectrum.primeSpectrumProd_symm_inl_asIdeal
File: Mathlib/RingTheory/PrimeSpectrum.lean

Proof steps:
state_before: R : Type u
S : Type v
inst✝¹ : CommSemiring R
inst✝ : CommSemiring S
x : PrimeSpectrum R
⊢ ((primeSpectrumProd R S).symm (Sum.inl x)).asIdeal = x.asIdeal.prod ⊤
state_after: case mk
R : Type u
S : Type v
inst✝¹ : CommSemiring R
inst✝ : CommSemiring S
asIdeal✝ : Ideal R
isPrime✝ : asIdeal✝.IsPrime
⊢ ((primeSpectrumProd R S).symm (Sum.inl { asIdeal := asIdeal✝, isPrime := isPrime✝ })).asIdeal =
    { asIdeal := asIdeal✝, isPrime := isPrime✝ }.asIdeal.prod ⊤
tactic: cases x
state_before: case mk
R : Type u
S : Type v
inst✝¹ : CommSemiring R
inst✝ : CommSemiring S
asIdeal✝ : Ideal R
isPrime✝ : asIdeal✝.IsPrime
⊢ ((primeSpectrumProd R S).symm (Sum.inl { asIdeal := asIdeal✝, isPrime := isPrime✝ })).asIdeal =
    { asIdeal := asIdeal✝, isPrime := isPrime✝ }.asIdeal.prod ⊤
state_after: no goals
tactic: rfl
Theorem: PrincipalIdealRing.isMaximal_of_irreducible
File: Mathlib/RingTheory/PrincipalIdealDomain.lean

Proof steps:
state_before: R : Type u
M : Type v
inst✝¹ : CommRing R
inst✝ : IsPrincipalIdealRing R
p : R
hp : Irreducible p
I : Ideal R
hI : span R {p} < I
⊢ I = ⊤
state_after: case mk.intro
R : Type u
M : Type v
inst✝¹ : CommRing R
inst✝ : IsPrincipalIdealRing R
p : R
hp : Irreducible p
a : R
hI : span R {p} < span R {a}
⊢ span R {a} = ⊤
tactic: rcases principal I with ⟨a, rfl⟩
state_before: case mk.intro
R : Type u
M : Type v
inst✝¹ : CommRing R
inst✝ : IsPrincipalIdealRing R
p : R
hp : Irreducible p
a : R
hI : span R {p} < span R {a}
⊢ span R {a} = ⊤
state_after: case mk.intro
R : Type u
M : Type v
inst✝¹ : CommRing R
inst✝ : IsPrincipalIdealRing R
p : R
hp : Irreducible p
a : R
hI : span R {p} < span R {a}
⊢ IsUnit a
tactic: erw [Ideal.span_singleton_eq_top]
state_before: case mk.intro
R : Type u
M : Type v
inst✝¹ : CommRing R
inst✝ : IsPrincipalIdealRing R
p : R
hp : Irreducible p
a : R
hI : span R {p} < span R {a}
⊢ IsUnit a
state_after: case mk.intro.intro
R : Type u
M : Type v
inst✝¹ : CommRing R
inst✝ : IsPrincipalIdealRing R
a b : R
hp : Irreducible (a * b)
hI : span R {a * b} < span R {a}
⊢ IsUnit a
tactic: rcases Ideal.span_singleton_le_span_singleton.1 (le_of_lt hI) with ⟨b, rfl⟩
state_before: case mk.intro.intro
R : Type u
M : Type v
inst✝¹ : CommRing R
inst✝ : IsPrincipalIdealRing R
a b : R
hp : Irreducible (a * b)
hI : span R {a * b} < span R {a}
⊢ IsUnit a
state_after: case mk.intro.intro
R : Type u
M : Type v
inst✝¹ : CommRing R
inst✝ : IsPrincipalIdealRing R
a b : R
hp : Irreducible (a * b)
hI : span R {a * b} < span R {a}
hb : IsUnit b
⊢ span R {a} ≤ span R {a * b}
tactic: refine (of_irreducible_mul hp).resolve_right (mt (fun hb => ?_) (not_le_of_lt hI))
state_before: case mk.intro.intro
R : Type u
M : Type v
inst✝¹ : CommRing R
inst✝ : IsPrincipalIdealRing R
a b : R
hp : Irreducible (a * b)
hI : span R {a * b} < span R {a}
hb : IsUnit b
⊢ span R {a} ≤ span R {a * b}
state_after: no goals
tactic: erw [Ideal.span_singleton_le_span_singleton, IsUnit.mul_right_dvd hb]
Theorem: DFinsupp.lex_lt_of_lt
File: Mathlib/Data/DFinsupp/Lex.lean

Proof steps:
state_before: ι : Type u_1
α : ι → Type u_2
inst✝² : (i : ι) → Zero (α i)
inst✝¹ : (i : ι) → PartialOrder (α i)
r : ι → ι → Prop
inst✝ : IsStrictOrder ι r
x y : Π₀ (i : ι), α i
hlt : x < y
⊢ Pi.Lex r (fun {i} x x_1 => x < x_1) ⇑x ⇑y
state_after: ι : Type u_1
α : ι → Type u_2
inst✝² : (i : ι) → Zero (α i)
inst✝¹ : (i : ι) → PartialOrder (α i)
r : ι → ι → Prop
inst✝ : IsStrictOrder ι r
x y : Π₀ (i : ι), α i
hlt : x < y
⊢ ∃ i, (∀ (j : ι), r j i → x j ≤ y j ∧ y j ≤ x j) ∧ x i < y i
tactic: simp_rw [Pi.Lex, le_antisymm_iff]
state_before: ι : Type u_1
α : ι → Type u_2
inst✝² : (i : ι) → Zero (α i)
inst✝¹ : (i : ι) → PartialOrder (α i)
r : ι → ι → Prop
inst✝ : IsStrictOrder ι r
x y : Π₀ (i : ι), α i
hlt : x < y
⊢ ∃ i, (∀ (j : ι), r j i → x j ≤ y j ∧ y j ≤ x j) ∧ x i < y i
state_after: no goals
tactic: exact lex_lt_of_lt_of_preorder r hlt