ruc-ai4math/mathlib_handler_benchmark_410 huggingface dataset:
Theorem: FinPartOrd.Iso.mk_inv
File: Mathlib/Order/Category/FinPartOrd.lean

Proof steps:
state_before: α β : FinPartOrd
e : ↑α.toPartOrd ≃o ↑β.toPartOrd
⊢ ↑e ≫ ↑e.symm = 𝟙 α
state_after: case w
α β : FinPartOrd
e : ↑α.toPartOrd ≃o ↑β.toPartOrd
x✝ : (forget FinPartOrd).obj α
⊢ (↑e ≫ ↑e.symm) x✝ = (𝟙 α) x✝
tactic: ext
state_before: case w
α β : FinPartOrd
e : ↑α.toPartOrd ≃o ↑β.toPartOrd
x✝ : (forget FinPartOrd).obj α
⊢ (↑e ≫ ↑e.symm) x✝ = (𝟙 α) x✝
state_after: no goals
tactic: exact e.symm_apply_apply _
state_before: α β : FinPartOrd
e : ↑α.toPartOrd ≃o ↑β.toPartOrd
⊢ ↑e.symm ≫ ↑e = 𝟙 β
state_after: case w
α β : FinPartOrd
e : ↑α.toPartOrd ≃o ↑β.toPartOrd
x✝ : (forget FinPartOrd).obj β
⊢ (↑e.symm ≫ ↑e) x✝ = (𝟙 β) x✝
tactic: ext
state_before: case w
α β : FinPartOrd
e : ↑α.toPartOrd ≃o ↑β.toPartOrd
x✝ : (forget FinPartOrd).obj β
⊢ (↑e.symm ≫ ↑e) x✝ = (𝟙 β) x✝
state_after: no goals
tactic: exact e.apply_symm_apply _
Theorem: NNReal.rpow_pos
File: Mathlib/Analysis/SpecialFunctions/Pow/NNReal.lean

Proof steps:
state_before: w x✝ y z p : ℝ
x : ℝ≥0
hx_pos : 0 < x
⊢ 0 < x ^ p
state_after: w x✝ y z p : ℝ
x : ℝ≥0
hx_pos : 0 < x
rpow_pos_of_nonneg : ∀ {p : ℝ}, 0 < p → 0 < x ^ p
⊢ 0 < x ^ p
tactic: have rpow_pos_of_nonneg : ∀ {p : ℝ}, 0 < p → 0 < x ^ p := by
    intro p hp_pos
    rw [← zero_rpow hp_pos.ne']
    exact rpow_lt_rpow hx_pos hp_pos
state_before: w x✝ y z p : ℝ
x : ℝ≥0
hx_pos : 0 < x
rpow_pos_of_nonneg : ∀ {p : ℝ}, 0 < p → 0 < x ^ p
⊢ 0 < x ^ p
state_after: case inl
w x✝ y z p : ℝ
x : ℝ≥0
hx_pos : 0 < x
rpow_pos_of_nonneg : ∀ {p : ℝ}, 0 < p → 0 < x ^ p
hp_pos : 0 < p
⊢ 0 < x ^ p

case inr.inl
w x✝ y z : ℝ
x : ℝ≥0
hx_pos : 0 < x
rpow_pos_of_nonneg : ∀ {p : ℝ}, 0 < p → 0 < x ^ p
⊢ 0 < x ^ 0

case inr.inr
w x✝ y z p : ℝ
x : ℝ≥0
hx_pos : 0 < x
rpow_pos_of_nonneg : ∀ {p : ℝ}, 0 < p → 0 < x ^ p
hp_neg : p < 0
⊢ 0 < x ^ p
tactic: rcases lt_trichotomy (0 : ℝ) p with (hp_pos | rfl | hp_neg)
Theorem: Real.Angle.cos_eq_iff_eq_or_eq_neg
File: Mathlib/Analysis/SpecialFunctions/Trigonometric/Angle.lean

Proof steps:
state_before: θ ψ : Angle
⊢ θ.cos = ψ.cos ↔ θ = ψ ∨ θ = -ψ
state_after: case h
θ : Angle
x✝ : ℝ
⊢ θ.cos = (↑x✝).cos ↔ θ = ↑x✝ ∨ θ = -↑x✝
tactic: induction ψ using Real.Angle.induction_on
state_before: case h
θ : Angle
x✝ : ℝ
⊢ θ.cos = (↑x✝).cos ↔ θ = ↑x✝ ∨ θ = -↑x✝
state_after: no goals
tactic: exact cos_eq_real_cos_iff_eq_or_eq_neg
Theorem: SimpleGraph.edgeSet_subgraphOfAdj
File: Mathlib/Combinatorics/SimpleGraph/Subgraph.lean

Proof steps:
state_before: ι : Sort u_1
V : Type u
W : Type v
G : SimpleGraph V
G' : SimpleGraph W
v w : V
hvw : G.Adj v w
⊢ (G.subgraphOfAdj hvw).edgeSet = {s(v, w)}
state_after: case h
ι : Sort u_1
V : Type u
W : Type v
G : SimpleGraph V
G' : SimpleGraph W
v w : V
hvw : G.Adj v w
e : Sym2 V
⊢ e ∈ (G.subgraphOfAdj hvw).edgeSet ↔ e ∈ {s(v, w)}
tactic: ext e
state_before: case h
ι : Sort u_1
V : Type u
W : Type v
G : SimpleGraph V
G' : SimpleGraph W
v w : V
hvw : G.Adj v w
e : Sym2 V
⊢ e ∈ (G.subgraphOfAdj hvw).edgeSet ↔ e ∈ {s(v, w)}
state_after: case h
ι : Sort u_1
V : Type u
W : Type v
G : SimpleGraph V
G' : SimpleGraph W
v w : V
hvw : G.Adj v w
e : Sym2 V
⊢ ∀ (x y : V), s(x, y) ∈ (G.subgraphOfAdj hvw).edgeSet ↔ s(x, y) ∈ {s(v, w)}
tactic: refine e.ind ?_
state_before: case h
ι : Sort u_1
V : Type u
W : Type v
G : SimpleGraph V
G' : SimpleGraph W
v w : V
hvw : G.Adj v w
e : Sym2 V
⊢ ∀ (x y : V), s(x, y) ∈ (G.subgraphOfAdj hvw).edgeSet ↔ s(x, y) ∈ {s(v, w)}
state_after: no goals
tactic: simp only [eq_comm, Set.mem_singleton_iff, Subgraph.mem_edgeSet, subgraphOfAdj_adj, iff_self_iff,
    forall₂_true_iff]
Theorem: Complex.arg_one
File: Mathlib/Analysis/SpecialFunctions/Complex/Arg.lean

Proof steps:
state_before: a x z : ℂ
⊢ arg 1 = 0
state_after: no goals
tactic: simp [arg, zero_le_one]
Theorem: Set.Finite.infsep_of_nontrivial
File: Mathlib/Topology/MetricSpace/Infsep.lean

Proof steps:
state_before: α : Type u_1
β : Type u_2
inst✝ : PseudoMetricSpace α
x y z : α
s t : Set α
hsf : s.Finite
hs : s.Nontrivial
⊢ ⋯.toFinset.Nonempty
state_after: no goals
tactic: simpa
state_before: α : Type u_1
β : Type u_2
inst✝ : PseudoMetricSpace α
x y z : α
s t : Set α
hsf : s.Finite
hs : s.Nontrivial
⊢ s.infsep = ⋯.toFinset.inf' ⋯ (uncurry dist)
state_after: no goals
tactic: classical simp_rw [hsf.infsep, dif_pos hs]
Theorem: CategoryTheory.Comma.preLeft_obj_left
File: Mathlib/CategoryTheory/Comma/Basic.lean

Proof steps:
state_before: A : Type u₁
inst✝⁷ : Category.{v₁, u₁} A
B : Type u₂
inst✝⁶ : Category.{v₂, u₂} B
T : Type u₃
inst✝⁵ : Category.{v₃, u₃} T
A' : Type u_1
B' : Type u_2
T' : Type u_3
inst✝⁴ : Category.{?u.129256, u_1} A'
inst✝³ : Category.{?u.129260, u_2} B'
inst✝² : Category.{?u.129264, u_3} T'
L✝ : A ⥤ T
R✝ : B ⥤ T
C : Type u₄
inst✝¹ : Category.{v₄, u₄} C
D : Type u₅
inst✝ : Category.{v₅, u₅} D
F : C ⥤ A
L : A ⥤ T
R : B ⥤ T
X✝ Y✝ : Comma (F ⋙ L) R
f : X✝ ⟶ Y✝
⊢ L.map (F.map f.left) ≫ ((fun X => { left := F.obj X.left, right := X.right, hom := X.hom }) Y✝).hom =
    ((fun X => { left := F.obj X.left, right := X.right, hom := X.hom }) X✝).hom ≫ R.map f.right
state_after: no goals
tactic: simpa using f.w
Theorem: Polynomial.root_X_sub_C
File: Mathlib/Algebra/Polynomial/Eval.lean

Proof steps:
state_before: R : Type u
S : Type v
T : Type w
ι : Type y
a b : R
m n : ℕ
inst✝ : Ring R
p q r : R[X]
⊢ (X - C a).IsRoot b ↔ a = b
state_after: no goals
tactic: rw [IsRoot.def, eval_sub, eval_X, eval_C, sub_eq_zero, eq_comm]
Theorem: Polynomial.not_mem_support_iff
File: Mathlib/Algebra/Polynomial/Basic.lean

Proof steps:
state_before: R : Type u
a b : R
m n : ℕ
inst✝ : Semiring R
p q : R[X]
⊢ n ∉ p.support ↔ p.coeff n = 0
state_after: no goals
tactic: simp
Theorem: Ordnode.dual_eraseMin
File: Mathlib/Data/Ordmap/Ordset.lean

Proof steps:
state_before: α : Type u_1
size✝ sz : ℕ
l' : Ordnode α
y : α
r' : Ordnode α
x : α
r : Ordnode α
⊢ (node size✝ (node sz l' y r') x r).eraseMin.dual = (node size✝ (node sz l' y r') x r).dual.eraseMax
state_after: no goals
tactic: rw [eraseMin, dual_balanceR, dual_eraseMin (node sz l' y r'), dual, dual, dual, eraseMax]
Theorem: FirstOrder.Language.distinctConstantsTheory_mono
File: Mathlib/ModelTheory/Syntax.lean

Proof steps:
state_before: L : Language
L' : Language
M : Type w
N : Type u_1
P : Type u_2
inst✝² : L.Structure M
inst✝¹ : L.Structure N
inst✝ : L.Structure P
α : Type u'
β : Type v'
γ : Type u_3
n : ℕ
s t : Set α
h : s ⊆ t
⊢ L.distinctConstantsTheory s ⊆ L.distinctConstantsTheory t
state_after: L : Language
L' : Language
M : Type w
N : Type u_1
P : Type u_2
inst✝² : L.Structure M
inst✝¹ : L.Structure N
inst✝ : L.Structure P
α : Type u'
β : Type v'
γ : Type u_3
n : ℕ
s t : Set α
h : s ⊆ t
⊢ (fun ab => ((L.con ab.1).term.equal (L.con ab.2).term).not) '' (s ×ˢ s ∩ (diagonal α)ᶜ) ⊆
    (fun ab => ((L.con ab.1).term.equal (L.con ab.2).term).not) '' (t ×ˢ t ∩ (diagonal α)ᶜ)
tactic: unfold distinctConstantsTheory
state_before: L : Language
L' : Language
M : Type w
N : Type u_1
P : Type u_2
inst✝² : L.Structure M
inst✝¹ : L.Structure N
inst✝ : L.Structure P
α : Type u'
β : Type v'
γ : Type u_3
n : ℕ
s t : Set α
h : s ⊆ t
⊢ (fun ab => ((L.con ab.1).term.equal (L.con ab.2).term).not) '' (s ×ˢ s ∩ (diagonal α)ᶜ) ⊆
    (fun ab => ((L.con ab.1).term.equal (L.con ab.2).term).not) '' (t ×ˢ t ∩ (diagonal α)ᶜ)
state_after: no goals
tactic: gcongr
Theorem: omegaLimit_eq_iInter_inter
File: Mathlib/Dynamics/OmegaLimit.lean

Proof steps:
state_before: τ : Type u_1
α : Type u_2
β : Type u_3
ι : Type u_4
inst✝ : TopologicalSpace β
f : Filter τ
ϕ : τ → α → β
s s₁ s₂ : Set α
v : Set τ
hv : v ∈ f
⊢ ω f ϕ s = ⋂ u, closure (image2 ϕ (↑u ∩ v) s)
state_after: τ : Type u_1
α : Type u_2
β : Type u_3
ι : Type u_4
inst✝ : TopologicalSpace β
f : Filter τ
ϕ : τ → α → β
s s₁ s₂ : Set α
v : Set τ
hv : v ∈ f
⊢ ⋂ u ∈ f, closure (image2 ϕ (u ∩ v) s) = ⋂ u, closure (image2 ϕ (↑u ∩ v) s)
tactic: rw [omegaLimit_eq_biInter_inter _ _ _ hv]
state_before: τ : Type u_1
α : Type u_2
β : Type u_3
ι : Type u_4
inst✝ : TopologicalSpace β
f : Filter τ
ϕ : τ → α → β
s s₁ s₂ : Set α
v : Set τ
hv : v ∈ f
⊢ ⋂ u ∈ f, closure (image2 ϕ (u ∩ v) s) = ⋂ u, closure (image2 ϕ (↑u ∩ v) s)
state_after: no goals
tactic: apply biInter_eq_iInter
Theorem: ProbabilityTheory.Kernel.IndepSets.bInter
File: Mathlib/Probability/Independence/Kernel.lean

Proof steps:
state_before: α : Type u_1
Ω : Type u_2
ι : Type u_3
_mα : MeasurableSpace α
s : ι → Set (Set Ω)
s' : Set (Set Ω)
_mΩ : MeasurableSpace Ω
κ : Kernel α Ω
μ : Measure α
u : Set ι
h : ∃ n ∈ u, IndepSets (s n) s' κ μ
⊢ IndepSets (⋂ n ∈ u, 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 α
u : Set ι
h : ∃ n ∈ u, IndepSets (s n) s' κ μ
t1 t2 : Set Ω
ht1 : t1 ∈ ⋂ n ∈ u, s n
ht2 : t2 ∈ s'
⊢ ∀ᵐ (a : α) ∂μ, (κ a) (t1 ∩ t2) = (κ a) t1 * (κ a) t2
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 α
u : Set ι
h : ∃ n ∈ u, IndepSets (s n) s' κ μ
t1 t2 : Set Ω
ht1 : t1 ∈ ⋂ n ∈ u, s n
ht2 : t2 ∈ s'
⊢ ∀ᵐ (a : α) ∂μ, (κ a) (t1 ∩ t2) = (κ a) t1 * (κ a) t2
state_after: case intro.intro
α : Type u_1
Ω : Type u_2
ι : Type u_3
_mα : MeasurableSpace α
s : ι → Set (Set Ω)
s' : Set (Set Ω)
_mΩ : MeasurableSpace Ω
κ : Kernel α Ω
μ : Measure α
u : Set ι
t1 t2 : Set Ω
ht1 : t1 ∈ ⋂ n ∈ u, s n
ht2 : t2 ∈ s'
n : ι
hn : n ∈ u
h : IndepSets (s n) s' κ μ
⊢ ∀ᵐ (a : α) ∂μ, (κ a) (t1 ∩ t2) = (κ a) t1 * (κ a) t2
tactic: rcases h with ⟨n, hn, h⟩
state_before: case intro.intro
α : Type u_1
Ω : Type u_2
ι : Type u_3
_mα : MeasurableSpace α
s : ι → Set (Set Ω)
s' : Set (Set Ω)
_mΩ : MeasurableSpace Ω
κ : Kernel α Ω
μ : Measure α
u : Set ι
t1 t2 : Set Ω
ht1 : t1 ∈ ⋂ n ∈ u, s n
ht2 : t2 ∈ s'
n : ι
hn : n ∈ u
h : IndepSets (s n) s' κ μ
⊢ ∀ᵐ (a : α) ∂μ, (κ a) (t1 ∩ t2) = (κ a) t1 * (κ a) t2
state_after: no goals
tactic: exact h t1 t2 (Set.biInter_subset_of_mem hn ht1) ht2
Theorem: ContinuousMap.setOfIdeal_ofSet_eq_interior
File: Mathlib/Topology/ContinuousFunction/Ideals.lean

Proof steps:
state_before: X : Type u_1
𝕜 : Type u_2
inst✝³ : RCLike 𝕜
inst✝² : TopologicalSpace X
inst✝¹ : CompactSpace X
inst✝ : T2Space X
s : Set X
⊢ setOfIdeal (idealOfSet 𝕜 s) = interior s
state_after: X : Type u_1
𝕜 : Type u_2
inst✝³ : RCLike 𝕜
inst✝² : TopologicalSpace X
inst✝¹ : CompactSpace X
inst✝ : T2Space X
s : Set X
x : X
hx : x ∈ interior s
⊢ x ∈ setOfIdeal (idealOfSet 𝕜 s)
tactic: refine
    Set.Subset.antisymm
      ((setOfIdeal_open (idealOfSet 𝕜 s)).subset_interior_iff.mpr fun x hx =>
        let ⟨f, hf, hfx⟩ := mem_setOfIdeal.mp hx
        Set.not_mem_compl_iff.mp (mt (@hf x) hfx))
      fun x hx => ?_
state_before: X : Type u_1
𝕜 : Type u_2
inst✝³ : RCLike 𝕜
inst✝² : TopologicalSpace X
inst✝¹ : CompactSpace X
inst✝ : T2Space X
s : Set X
x : X
hx : x ∈ interior s
⊢ x ∈ setOfIdeal (idealOfSet 𝕜 s)
state_after: X : Type u_1
𝕜 : Type u_2
inst✝³ : RCLike 𝕜
inst✝² : TopologicalSpace X
inst✝¹ : CompactSpace X
inst✝ : T2Space X
s : Set X
x : X
hx : x ∈ (closure sᶜ)ᶜ
⊢ x ∈ setOfIdeal (idealOfSet 𝕜 s)
tactic: rw [← compl_compl (interior s), ← closure_compl] at hx
state_before: X : Type u_1
𝕜 : Type u_2
inst✝³ : RCLike 𝕜
inst✝² : TopologicalSpace X
inst✝¹ : CompactSpace X
inst✝ : T2Space X
s : Set X
x : X
hx : x ∈ (closure sᶜ)ᶜ
⊢ x ∈ setOfIdeal (idealOfSet 𝕜 s)
state_after: X : Type u_1
𝕜 : Type u_2
inst✝³ : RCLike 𝕜
inst✝² : TopologicalSpace X
inst✝¹ : CompactSpace X
inst✝ : T2Space X
s : Set X
x : X
hx : x ∈ (closure sᶜ)ᶜ
⊢ ∃ f, (∀ ⦃x : X⦄, x ∈ sᶜ → f x = 0) ∧ f x ≠ 0
tactic: simp_rw [mem_setOfIdeal, mem_idealOfSet]
state_before: X : Type u_1
𝕜 : Type u_2
inst✝³ : RCLike 𝕜
inst✝² : TopologicalSpace X
inst✝¹ : CompactSpace X
inst✝ : T2Space X
s : Set X
x : X
hx : x ∈ (closure sᶜ)ᶜ
⊢ ∃ f, (∀ ⦃x : X⦄, x ∈ sᶜ → f x = 0) ∧ f x ≠ 0
state_after: case intro.intro.intro
X : Type u_1
𝕜 : Type u_2
inst✝³ : RCLike 𝕜
inst✝² : TopologicalSpace X
inst✝¹ : CompactSpace X
inst✝ : T2Space X
s : Set X
x : X
hx : x ∈ (closure sᶜ)ᶜ
g : C(X, ℝ)
hgs : Set.EqOn (⇑g) 0 (closure sᶜ)
hgx : Set.EqOn (⇑g) 1 {x}
⊢ ∃ f, (∀ ⦃x : X⦄, x ∈ sᶜ → f x = 0) ∧ f x ≠ 0
tactic: obtain ⟨g, hgs, hgx : Set.EqOn g 1 {x}, -⟩ :=
    exists_continuous_zero_one_of_isClosed isClosed_closure isClosed_singleton
      (Set.disjoint_singleton_right.mpr hx)
state_before: case intro.intro.intro
X : Type u_1
𝕜 : Type u_2
inst✝³ : RCLike 𝕜
inst✝² : TopologicalSpace X
inst✝¹ : CompactSpace X
inst✝ : T2Space X
s : Set X
x : X
hx : x ∈ (closure sᶜ)ᶜ
g : C(X, ℝ)
hgs : Set.EqOn (⇑g) 0 (closure sᶜ)
hgx : Set.EqOn (⇑g) 1 {x}
⊢ ∃ f, (∀ ⦃x : X⦄, x ∈ sᶜ → f x = 0) ∧ f x ≠ 0
state_after: no goals
tactic: exact
    ⟨⟨fun x => g x, continuous_ofReal.comp (map_continuous g)⟩, by
      simpa only [coe_mk, ofReal_eq_zero] using fun x hx => hgs (subset_closure hx), by
      simpa only [coe_mk, hgx (Set.mem_singleton x), Pi.one_apply, RCLike.ofReal_one] using
        one_ne_zero⟩
Theorem: Polynomial.content_C
File: Mathlib/RingTheory/Polynomial/Content.lean

Proof steps:
state_before: R : Type u_1
inst✝² : CommRing R
inst✝¹ : IsDomain R
inst✝ : NormalizedGCDMonoid R
r : R
⊢ (C r).content = normalize r
state_after: R : Type u_1
inst✝² : CommRing R
inst✝¹ : IsDomain R
inst✝ : NormalizedGCDMonoid R
r : R
⊢ (C r).support.gcd (C r).coeff = normalize r
tactic: rw [content]
state_before: R : Type u_1
inst✝² : CommRing R
inst✝¹ : IsDomain R
inst✝ : NormalizedGCDMonoid R
r : R
⊢ (C r).support.gcd (C r).coeff = normalize r
state_after: case pos
R : Type u_1
inst✝² : CommRing R
inst✝¹ : IsDomain R
inst✝ : NormalizedGCDMonoid R
r : R
h0 : r = 0
⊢ (C r).support.gcd (C r).coeff = normalize r

case neg
R : Type u_1
inst✝² : CommRing R
inst✝¹ : IsDomain R
inst✝ : NormalizedGCDMonoid R
r : R
h0 : ¬r = 0
⊢ (C r).support.gcd (C r).coeff = normalize r
tactic: by_cases h0 : r = 0
state_before: case neg
R : Type u_1
inst✝² : CommRing R
inst✝¹ : IsDomain R
inst✝ : NormalizedGCDMonoid R
r : R
h0 : ¬r = 0
⊢ (C r).support.gcd (C r).coeff = normalize r
state_after: case neg
R : Type u_1
inst✝² : CommRing R
inst✝¹ : IsDomain R
inst✝ : NormalizedGCDMonoid R
r : R
h0 : ¬r = 0
h : (C r).support = {0}
⊢ (C r).support.gcd (C r).coeff = normalize r
tactic: have h : (C r).support = {0} := support_monomial _ h0
state_before: case neg
R : Type u_1
inst✝² : CommRing R
inst✝¹ : IsDomain R
inst✝ : NormalizedGCDMonoid R
r : R
h0 : ¬r = 0
h : (C r).support = {0}
⊢ (C r).support.gcd (C r).coeff = normalize r
state_after: no goals
tactic: simp [h]
Theorem: Equiv.Set.sumCompl_symm_apply_of_not_mem
File: Mathlib/Logic/Equiv/Set.lean

Proof steps:
state_before: α✝ : Sort u
β : Sort v
γ : Sort w
α : Type u
s : Set α
inst✝ : DecidablePred fun x => x ∈ s
x : α
hx : x ∉ s
⊢ (Set.sumCompl s).symm x = Sum.inr ⟨x, hx⟩
state_after: α✝ : Sort u
β : Sort v
γ : Sort w
α : Type u
s : Set α
inst✝ : DecidablePred fun x => x ∈ s
x : α
hx : x ∉ s
this : ↑⟨x, ⋯⟩ ∈ sᶜ
⊢ (Set.sumCompl s).symm x = Sum.inr ⟨x, hx⟩
tactic: have : ((⟨x, Or.inr hx⟩ : (s ∪ sᶜ : Set α)) : α) ∈ sᶜ := hx
state_before: α✝ : Sort u
β : Sort v
γ : Sort w
α : Type u
s : Set α
inst✝ : DecidablePred fun x => x ∈ s
x : α
hx : x ∉ s
this : ↑⟨x, ⋯⟩ ∈ sᶜ
⊢ (Set.sumCompl s).symm x = Sum.inr ⟨x, hx⟩
state_after: α✝ : Sort u
β : Sort v
γ : Sort w
α : Type u
s : Set α
inst✝ : DecidablePred fun x => x ∈ s
x : α
hx : x ∉ s
this : ↑⟨x, ⋯⟩ ∈ sᶜ
⊢ (Trans.trans (Trans.trans (Set.union ⋯).symm (Set.ofEq ⋯)) (Set.univ α)).symm x = Sum.inr ⟨x, hx⟩
tactic: rw [Equiv.Set.sumCompl]
state_before: α✝ : Sort u
β : Sort v
γ : Sort w
α : Type u
s : Set α
inst✝ : DecidablePred fun x => x ∈ s
x : α
hx : x ∉ s
this : ↑⟨x, ⋯⟩ ∈ sᶜ
⊢ (Trans.trans (Trans.trans (Set.union ⋯).symm (Set.ofEq ⋯)) (Set.univ α)).symm x = Sum.inr ⟨x, hx⟩
state_after: no goals
tactic: simpa using Set.union_apply_right (by simp) this
Theorem: MeasureTheory.AEStronglyMeasurable.aestronglyMeasurable_uIoc_iff
File: Mathlib/MeasureTheory/Function/StronglyMeasurable/Basic.lean

Proof steps:
state_before: α : Type u_1
β : Type u_2
γ : Type u_3
ι : Type u_4
inst✝⁴ : Countable ι
m : MeasurableSpace α
μ ν : Measure α
inst✝³ : TopologicalSpace β
inst✝² : TopologicalSpace γ
f✝ g : α → β
inst✝¹ : LinearOrder α
inst✝ : PseudoMetrizableSpace β
f : α → β
a b : α
⊢ AEStronglyMeasurable f (μ.restrict (Ι a b)) ↔
    AEStronglyMeasurable f (μ.restrict (Ioc a b)) ∧ AEStronglyMeasurable f (μ.restrict (Ioc b a))
state_after: no goals
tactic: rw [uIoc_eq_union, aestronglyMeasurable_union_iff]
Theorem: dist_right_midpoint
File: Mathlib/Analysis/NormedSpace/AddTorsor.lean

Proof steps:
state_before: α : Type u_1
V : Type u_2
P : Type u_3
W : Type u_4
Q : Type u_5
inst✝⁹ : SeminormedAddCommGroup V
inst✝⁸ : PseudoMetricSpace P
inst✝⁷ : NormedAddTorsor V P
inst✝⁶ : NormedAddCommGroup W
inst✝⁵ : MetricSpace Q
inst✝⁴ : NormedAddTorsor W Q
𝕜 : Type u_6
inst✝³ : NormedField 𝕜
inst✝² : NormedSpace 𝕜 V
inst✝¹ : NormedSpace 𝕜 W
inst✝ : Invertible 2
p₁ p₂ : P
⊢ dist p₂ (midpoint 𝕜 p₁ p₂) = ‖2‖⁻¹ * dist p₁ p₂
state_after: no goals
tactic: rw [dist_comm, dist_midpoint_right]
Theorem: NNReal.rpow_arith_mean_le_arith_mean2_rpow
File: Mathlib/Analysis/MeanInequalitiesPow.lean

Proof steps:
state_before: ι : Type u
s : Finset ι
w₁ w₂ z₁ z₂ : ℝ≥0
hw' : w₁ + w₂ = 1
p : ℝ
hp : 1 ≤ p
⊢ (w₁ * z₁ + w₂ * z₂) ^ p ≤ w₁ * z₁ ^ p + w₂ * z₂ ^ p
state_after: case refine_2
ι : Type u
s : Finset ι
w₁ w₂ z₁ z₂ : ℝ≥0
hw' : w₁ + w₂ = 1
p : ℝ
hp : 1 ≤ p
h :
  (∑ i : Fin (Nat.succ 0).succ, ![w₁, w₂] i * ![z₁, z₂] i) ^ p ≤
    ∑ i : Fin (Nat.succ 0).succ, ![w₁, w₂] i * ![z₁, z₂] i ^ p
⊢ (w₁ * z₁ + w₂ * z₂) ^ p ≤ w₁ * z₁ ^ p + w₂ * z₂ ^ p

case refine_1
ι : Type u
s : Finset ι
w₁ w₂ z₁ z₂ : ℝ≥0
hw' : w₁ + w₂ = 1
p : ℝ
hp : 1 ≤ p
⊢ ∑ i : Fin (Nat.succ 0).succ, ![w₁, w₂] i = 1
tactic: have h := rpow_arith_mean_le_arith_mean_rpow univ ![w₁, w₂] ![z₁, z₂] ?_ hp
Theorem: Mathlib.Tactic.Ring.pow_prod_atom
File: Mathlib/Tactic/Ring/Basic.lean

Proof steps:
state_before: u✝ : Lean.Level
arg : Q(Type u✝)
sα✝ : Q(CommSemiring «$arg»)
u : Lean.Level
α : Q(Type u)
sα : Q(CommSemiring «$α»)
R : Type u_1
inst✝ : CommSemiring R
a✝ a' a₁ a₂ a₃ b✝ b' b₁ b₂ b₃ c c₁ c₂ a : R
b : ℕ
⊢ a ^ b = (a + 0) ^ b * Nat.rawCast 1
state_after: no goals
tactic: simp
Theorem: MeasureTheory.OuterMeasure.isCaratheodory_union
File: Mathlib/MeasureTheory/OuterMeasure/Caratheodory.lean

Proof steps:
state_before: α : Type u
m : OuterMeasure α
s s₁ s₂ : Set α
h₁ : m.IsCaratheodory s₁
h₂ : m.IsCaratheodory s₂
t : Set α
⊢ m t = m (t ∩ (s₁ ∪ s₂)) + m (t \ (s₁ ∪ s₂))
state_after: α : Type u
m : OuterMeasure α
s s₁ s₂ : Set α
h₁ : m.IsCaratheodory s₁
h₂ : m.IsCaratheodory s₂
t : Set α
⊢ m (t ∩ s₁ ∩ s₂) + m ((t ∩ s₁) \ s₂) + (m (t \ s₁ ∩ s₂) + m ((t \ s₁) \ s₂)) =
    m (t ∩ s₁ ∩ s₂) + m ((t ∩ s₁) \ s₂) + m (t ∩ (s₂ \ s₁)) + m (t \ (s₁ ∪ s₂))
tactic: rw [h₁ t, h₂ (t ∩ s₁), h₂ (t \ s₁), h₁ (t ∩ (s₁ ∪ s₂)), inter_diff_assoc _ _ s₁,
    Set.inter_assoc _ _ s₁, inter_eq_self_of_subset_right Set.subset_union_left,
    union_diff_left, h₂ (t ∩ s₁)]
state_before: α : Type u
m : OuterMeasure α
s s₁ s₂ : Set α
h₁ : m.IsCaratheodory s₁
h₂ : m.IsCaratheodory s₂
t : Set α
⊢ m (t ∩ s₁ ∩ s₂) + m ((t ∩ s₁) \ s₂) + (m (t \ s₁ ∩ s₂) + m ((t \ s₁) \ s₂)) =
    m (t ∩ s₁ ∩ s₂) + m ((t ∩ s₁) \ s₂) + m (t ∩ (s₂ \ s₁)) + m (t \ (s₁ ∪ s₂))
state_after: no goals
tactic: simp [diff_eq, add_assoc]
Theorem: toIocMod_zsmul_add'
File: Mathlib/Algebra/Order/ToIntervalMod.lean

Proof steps:
state_before: α : Type u_1
inst✝ : LinearOrderedAddCommGroup α
hα : Archimedean α
p : α
hp : 0 < p
a✝ b✝ c : α
n : ℤ
a b : α
m : ℤ
⊢ toIocMod hp (m • p + a) b = m • p + toIocMod hp a b
state_after: no goals
tactic: rw [add_comm, toIocMod_add_zsmul', add_comm]
Theorem: Polynomial.algEquivOfCompEqX_symm_apply
File: Mathlib/Algebra/Polynomial/AlgebraMap.lean

Proof steps:
state_before: R : Type u
S : Type v
T : Type w
A : Type z
A' : Type u_1
B : Type u_2
a b : R
n : ℕ
inst✝⁶ : CommSemiring R
inst✝⁵ : Semiring A
inst✝⁴ : CommSemiring A'
inst✝³ : Semiring B
inst✝² : Algebra R A
inst✝¹ : Algebra R A'
inst✝ : Algebra R B
p✝ q✝ : R[X]
x : A
p q : R[X]
hpq : p.comp q = X
hqp : q.comp p = X
⊢ R[X] ≃ₐ[R] R[X]
state_after: no goals
tactic: refine AlgEquiv.ofAlgHom (aeval p) (aeval q) ?_ ?_ <;>
    exact AlgHom.ext fun _ ↦ by simp [← comp_eq_aeval, comp_assoc, hpq, hqp]
Theorem: Real.exp_1_approx_succ_eq
File: Mathlib/Data/Complex/Exponential.lean

Proof steps:
state_before: n : ℕ
a₁ b₁ : ℝ
m : ℕ
en : n + 1 = m
rm : ℝ
er : ↑m = rm
h : |rexp 1 - expNear m 1 ((a₁ - 1) * rm)| ≤ |1| ^ m / ↑m.factorial * (b₁ * rm)
⊢ |rexp 1 - expNear n 1 a₁| ≤ |1| ^ n / ↑n.factorial * b₁
state_after: n : ℕ
a₁ b₁ : ℝ
m : ℕ
en : n + 1 = m
h : |rexp 1 - expNear m 1 ((a₁ - 1) * ↑m)| ≤ |1| ^ m / ↑m.factorial * (b₁ * ↑m)
⊢ |rexp 1 - expNear n 1 a₁| ≤ |1| ^ n / ↑n.factorial * b₁
tactic: subst er
state_before: n : ℕ
a₁ b₁ : ℝ
m : ℕ
en : n + 1 = m
h : |rexp 1 - expNear m 1 ((a₁ - 1) * ↑m)| ≤ |1| ^ m / ↑m.factorial * (b₁ * ↑m)
⊢ |rexp 1 - expNear n 1 a₁| ≤ |1| ^ n / ↑n.factorial * b₁
state_after: n : ℕ
a₁ b₁ : ℝ
m : ℕ
en : n + 1 = m
h : |rexp 1 - expNear m 1 ((a₁ - 1) * ↑m)| ≤ |1| ^ m / ↑m.factorial * (b₁ * ↑m)
⊢ |1 + 1 / ↑m * ((a₁ - 1) * ↑m) - a₁| ≤ b₁ - |1| / ↑m * (b₁ * ↑m)
tactic: refine exp_approx_succ _ en _ _ ?_ h
state_before: n : ℕ
a₁ b₁ : ℝ
m : ℕ
en : n + 1 = m
h : |rexp 1 - expNear m 1 ((a₁ - 1) * ↑m)| ≤ |1| ^ m / ↑m.factorial * (b₁ * ↑m)
⊢ |1 + 1 / ↑m * ((a₁ - 1) * ↑m) - a₁| ≤ b₁ - |1| / ↑m * (b₁ * ↑m)
state_after: no goals
tactic: field_simp [show (m : ℝ) ≠ 0 by norm_cast; omega]
Theorem: Bool.toNat_beq_one
File: Mathlib/Data/Bool/Basic.lean

Proof steps:
state_before: b : Bool
⊢ (b.toNat == 1) = b
state_after: no goals
tactic: cases b <;> rfl
Theorem: Set.einfsep_pair_le_right
File: Mathlib/Topology/MetricSpace/Infsep.lean

Proof steps:
state_before: α : Type u_1
β : Type u_2
inst✝ : EDist α
x y : α
s t : Set α
hxy : x ≠ y
⊢ {x, y}.einfsep ≤ edist y x
state_after: α : Type u_1
β : Type u_2
inst✝ : EDist α
x y : α
s t : Set α
hxy : x ≠ y
⊢ {y, x}.einfsep ≤ edist y x
tactic: rw [pair_comm]
state_before: α : Type u_1
β : Type u_2
inst✝ : EDist α
x y : α
s t : Set α
hxy : x ≠ y
⊢ {y, x}.einfsep ≤ edist y x
state_after: no goals
tactic: exact einfsep_pair_le_left hxy.symm
Theorem: Finset.pimage_eq_image_filter
File: Mathlib/Data/Finset/PImage.lean

Proof steps:
state_before: α : Type u_1
β : Type u_2
inst✝² : DecidableEq β
f g : α →. β
inst✝¹ : (x : α) → Decidable (f x).Dom
inst✝ : (x : α) → Decidable (g x).Dom
s t : Finset α
b : β
⊢ pimage f s = image (fun x => (f ↑x).get ⋯) (filter (fun x => (f x).Dom) s).attach
state_after: case a
α : Type u_1
β : Type u_2
inst✝² : DecidableEq β
f g : α →. β
inst✝¹ : (x : α) → Decidable (f x).Dom
inst✝ : (x : α) → Decidable (g x).Dom
s t : Finset α
b x : β
⊢ x ∈ pimage f s ↔ x ∈ image (fun x => (f ↑x).get ⋯) (filter (fun x => (f x).Dom) s).attach
tactic: ext x
state_before: case a
α : Type u_1
β : Type u_2
inst✝² : DecidableEq β
f g : α →. β
inst✝¹ : (x : α) → Decidable (f x).Dom
inst✝ : (x : α) → Decidable (g x).Dom
s t : Finset α
b x : β
⊢ x ∈ pimage f s ↔ x ∈ image (fun x => (f ↑x).get ⋯) (filter (fun x => (f x).Dom) s).attach
state_after: case a
α : Type u_1
β : Type u_2
inst✝² : DecidableEq β
f g : α →. β
inst✝¹ : (x : α) → Decidable (f x).Dom
inst✝ : (x : α) → Decidable (g x).Dom
s t : Finset α
b x : β
⊢ (∃ a ∈ s, ∃ (h : (f a).Dom), (f a).get h = x) ↔ ∃ a, ∃ (hp : a ∈ s) (hq : (f a).Dom), (f a).get ⋯ = x
tactic: simp [Part.mem_eq, And.exists]
state_before: case a
α : Type u_1
β : Type u_2
inst✝² : DecidableEq β
f g : α →. β
inst✝¹ : (x : α) → Decidable (f x).Dom
inst✝ : (x : α) → Decidable (g x).Dom
s t : Finset α
b x : β
⊢ (∃ a ∈ s, ∃ (h : (f a).Dom), (f a).get h = x) ↔ ∃ a, ∃ (hp : a ∈ s) (hq : (f a).Dom), (f a).get ⋯ = x
state_after: no goals
tactic: simp only [← exists_prop]