ruc-ai4math/mathlib_handler_benchmark_410 huggingface dataset:
Theorem: Set.preimage_neg_Ioo
File: Mathlib/Data/Set/Pointwise/Interval.lean

Proof steps:
state_before: α : Type u_1
inst✝ : OrderedAddCommGroup α
a b c : α
⊢ -Ioo a b = Ioo (-b) (-a)
state_after: no goals
tactic: simp [← Ioi_inter_Iio, inter_comm]
Theorem: tsum_pi_single
File: Mathlib/Topology/Algebra/InfiniteSum/Constructions.lean

Proof steps:
state_before: α : Type u_1
β : Type u_2
γ : Type u_3
δ : Type u_4
inst✝² : CommMonoid α
inst✝¹ : TopologicalSpace α
inst✝ : DecidableEq β
b : β
a : α
⊢ ∏' (b' : β), Pi.mulSingle b a b' = a
state_after: α : Type u_1
β : Type u_2
γ : Type u_3
δ : Type u_4
inst✝² : CommMonoid α
inst✝¹ : TopologicalSpace α
inst✝ : DecidableEq β
b : β
a : α
⊢ Pi.mulSingle b a b = a

α : Type u_1
β : Type u_2
γ : Type u_3
δ : Type u_4
inst✝² : CommMonoid α
inst✝¹ : TopologicalSpace α
inst✝ : DecidableEq β
b : β
a : α
⊢ ∀ (b' : β), b' ≠ b → Pi.mulSingle b a b' = 1
tactic: rw [tprod_eq_mulSingle b]
Theorem: Function.Surjective.iSup_comp
File: Mathlib/Order/CompleteLattice.lean

Proof steps:
state_before: α : Type u_1
β : Type u_2
β₂ : Type u_3
γ : Type u_4
ι : Sort u_5
ι' : Sort u_6
κ : ι → Sort u_7
κ' : ι' → Sort u_8
inst✝ : SupSet α
f✝ g✝ : ι → α
f : ι → ι'
hf : Surjective f
g : ι' → α
⊢ ⨆ x, g (f x) = ⨆ y, g y
state_after: α : Type u_1
β : Type u_2
β₂ : Type u_3
γ : Type u_4
ι : Sort u_5
ι' : Sort u_6
κ : ι → Sort u_7
κ' : ι' → Sort u_8
inst✝ : SupSet α
f✝ g✝ : ι → α
f : ι → ι'
hf : Surjective f
g : ι' → α
⊢ sSup (range fun x => g (f x)) = sSup (range fun y => g y)
tactic: simp only [iSup.eq_1]
state_before: α : Type u_1
β : Type u_2
β₂ : Type u_3
γ : Type u_4
ι : Sort u_5
ι' : Sort u_6
κ : ι → Sort u_7
κ' : ι' → Sort u_8
inst✝ : SupSet α
f✝ g✝ : ι → α
f : ι → ι'
hf : Surjective f
g : ι' → α
⊢ sSup (range fun x => g (f x)) = sSup (range fun y => g y)
state_after: case e_a
α : Type u_1
β : Type u_2
β₂ : Type u_3
γ : Type u_4
ι : Sort u_5
ι' : Sort u_6
κ : ι → Sort u_7
κ' : ι' → Sort u_8
inst✝ : SupSet α
f✝ g✝ : ι → α
f : ι → ι'
hf : Surjective f
g : ι' → α
⊢ (range fun x => g (f x)) = range fun y => g y
tactic: congr
state_before: case e_a
α : Type u_1
β : Type u_2
β₂ : Type u_3
γ : Type u_4
ι : Sort u_5
ι' : Sort u_6
κ : ι → Sort u_7
κ' : ι' → Sort u_8
inst✝ : SupSet α
f✝ g✝ : ι → α
f : ι → ι'
hf : Surjective f
g : ι' → α
⊢ (range fun x => g (f x)) = range fun y => g y
state_after: no goals
tactic: exact hf.range_comp g
Theorem: RingHom.surjectiveOnStalks_iff_forall_maximal'
File: Mathlib/RingTheory/SurjectiveOnStalks.lean

Proof steps:
state_before: R : Type u_1
inst✝⁶ : CommRing R
M : Submonoid R
S : Type u_2
inst✝⁵ : CommRing S
inst✝⁴ : Algebra R S
T : Type u_3
inst✝³ : CommRing T
inst✝² : Algebra R T
inst✝¹ : Algebra S T
inst✝ : IsScalarTower R S T
g : S →+* T
f : R →+* S
⊢ f.SurjectiveOnStalks ↔ ∀ (I : Ideal S), I.IsMaximal → ∀ (s : S), ∃ x r, ∃ c ∉ I, f r ∉ I ∧ c * f r * s = c * f x
state_after: no goals
tactic: simp only [surjectiveOnStalks_iff_forall_maximal, surjective_localRingHom_iff]
Theorem: Nat.dist_eq_zero
File: Mathlib/Data/Nat/Dist.lean

Proof steps:
state_before: n m : ℕ
h : n = m
⊢ n.dist m = 0
state_after: no goals
tactic: rw [h, dist_self]
Theorem: SimpleGraph.induceHom_id
File: Mathlib/Combinatorics/SimpleGraph/Maps.lean

Proof steps:
state_before: V : Type u_1
W : Type u_2
X : Type u_3
G✝ : SimpleGraph V
G' : SimpleGraph W
u v : V
G'' : SimpleGraph X
s✝ : Set V
t : Set W
r : Set X
φ : G✝ →g G'
φst : Set.MapsTo (⇑φ) s✝ t
ψ : G' →g G''
ψtr : Set.MapsTo (⇑ψ) t r
G : SimpleGraph V
s : Set V
⊢ induceHom Hom.id ⋯ = Hom.id
state_after: case h.a
V : Type u_1
W : Type u_2
X : Type u_3
G✝ : SimpleGraph V
G' : SimpleGraph W
u v : V
G'' : SimpleGraph X
s✝ : Set V
t : Set W
r : Set X
φ : G✝ →g G'
φst : Set.MapsTo (⇑φ) s✝ t
ψ : G' →g G''
ψtr : Set.MapsTo (⇑ψ) t r
G : SimpleGraph V
s : Set V
x : ↑s
⊢ ↑((induceHom Hom.id ⋯) x) = ↑(Hom.id x)
tactic: ext x
state_before: case h.a
V : Type u_1
W : Type u_2
X : Type u_3
G✝ : SimpleGraph V
G' : SimpleGraph W
u v : V
G'' : SimpleGraph X
s✝ : Set V
t : Set W
r : Set X
φ : G✝ →g G'
φst : Set.MapsTo (⇑φ) s✝ t
ψ : G' →g G''
ψtr : Set.MapsTo (⇑ψ) t r
G : SimpleGraph V
s : Set V
x : ↑s
⊢ ↑((induceHom Hom.id ⋯) x) = ↑(Hom.id x)
state_after: no goals
tactic: rfl
Theorem: IsLocalization.ext
File: Mathlib/RingTheory/Localization/Basic.lean

Proof steps:
state_before: R : Type u_1
inst✝⁴ : CommSemiring R
M : Submonoid R
S : Type u_2
inst✝³ : CommSemiring S
inst✝² : Algebra R S
P : Type u_3
inst✝¹ : CommSemiring P
inst✝ : IsLocalization M S
g : R →+* P
hg : ∀ (y : ↥M), IsUnit (g ↑y)
j k : S → P
hj1 : j 1 = 1
hk1 : k 1 = 1
hjm : ∀ (a b : S), j (a * b) = j a * j b
hkm : ∀ (a b : S), k (a * b) = k a * k b
h : ∀ (a : R), j ((algebraMap R S) a) = k ((algebraMap R S) a)
j' : S →* P := { toFun := j, map_one' := hj1, map_mul' := hjm }
k' : S →* P := { toFun := k, map_one' := hk1, map_mul' := hkm }
this : j' = k'
⊢ (↑j').toFun = (↑k').toFun
state_after: no goals
tactic: rw [this]
Theorem: Polynomial.map_toSubring
File: Mathlib/RingTheory/Polynomial/Basic.lean

Proof steps:
state_before: R : Type u
S : Type u_1
inst✝¹ : Ring R
inst✝ : Semiring S
f : R →+* S
x : S
p : R[X]
T : Subring R
hp : ↑p.coeffs ⊆ ↑T
⊢ map T.subtype (p.toSubring T hp) = p
state_after: case a
R : Type u
S : Type u_1
inst✝¹ : Ring R
inst✝ : Semiring S
f : R →+* S
x : S
p : R[X]
T : Subring R
hp : ↑p.coeffs ⊆ ↑T
n : ℕ
⊢ (map T.subtype (p.toSubring T hp)).coeff n = p.coeff n
tactic: ext n
state_before: case a
R : Type u
S : Type u_1
inst✝¹ : Ring R
inst✝ : Semiring S
f : R →+* S
x : S
p : R[X]
T : Subring R
hp : ↑p.coeffs ⊆ ↑T
n : ℕ
⊢ (map T.subtype (p.toSubring T hp)).coeff n = p.coeff n
state_after: no goals
tactic: simp [coeff_map]
Theorem: HomologicalComplex.mem_quasiIso_iff
File: Mathlib/Algebra/Homology/QuasiIso.lean

Proof steps:
state_before: ι : Type u_1
C : Type u
inst✝² : Category.{v, u} C
inst✝¹ : HasZeroMorphisms C
c : ComplexShape ι
K L M K' L' : HomologicalComplex C c
inst✝ : CategoryWithHomology C
f : K ⟶ L
⊢ quasiIso C c f ↔ QuasiIso f
state_after: no goals
tactic: rfl
Theorem: Set.Ico_eq_empty_iff
File: Mathlib/Order/Interval/Set/Basic.lean

Proof steps:
state_before: α : Type u_1
β : Type u_2
inst✝ : Preorder α
a a₁ a₂ b b₁ b₂ c x : α
⊢ Ico a b = ∅ ↔ ¬a < b
state_after: no goals
tactic: rw [← not_nonempty_iff_eq_empty, not_iff_not, nonempty_Ico]
Theorem: ZMod.isQuadratic_χ₈'
File: Mathlib/NumberTheory/LegendreSymbol/ZModChar.lean

Proof steps:
state_before: ⊢ χ₈'.IsQuadratic
state_after: ⊢ ∀ (a : ZMod 8), χ₈' a = 0 ∨ χ₈' a = 1 ∨ χ₈' a = -1
tactic: unfold MulChar.IsQuadratic
state_before: ⊢ ∀ (a : ZMod 8), χ₈' a = 0 ∨ χ₈' a = 1 ∨ χ₈' a = -1
state_after: no goals
tactic: decide
Theorem: slope_same
File: Mathlib/LinearAlgebra/AffineSpace/Slope.lean

Proof steps:
state_before: k : Type u_1
E : Type u_2
PE : Type u_3
inst✝³ : Field k
inst✝² : AddCommGroup E
inst✝¹ : Module k E
inst✝ : AddTorsor E PE
f : k → PE
a : k
⊢ slope f a a = 0
state_after: no goals
tactic: rw [slope, sub_self, inv_zero, zero_smul]
Theorem: Stream'.WSeq.join_map_ret
File: Mathlib/Data/Seq/WSeq.lean

Proof steps:
state_before: α : Type u
β : Type v
γ : Type w
s : WSeq α
⊢ (map ret s).join ~ʷ s
state_after: α : Type u
β : Type v
γ : Type w
s : WSeq α
⊢ ∀ {s t : WSeq α},
    (fun s1 s2 => (map ret s2).join = s1) s t →
      Computation.LiftRel (LiftRelO (fun x x_1 => x = x_1) fun s1 s2 => (map ret s2).join = s1) s.destruct t.destruct
tactic: refine ⟨fun s1 s2 => join (map ret s2) = s1, rfl, ?_⟩
state_before: α : Type u
β : Type v
γ : Type w
s : WSeq α
⊢ ∀ {s t : WSeq α},
    (fun s1 s2 => (map ret s2).join = s1) s t →
      Computation.LiftRel (LiftRelO (fun x x_1 => x = x_1) fun s1 s2 => (map ret s2).join = s1) s.destruct t.destruct
state_after: α : Type u
β : Type v
γ : Type w
s✝ s' s : WSeq α
h : (map ret s).join = s'
⊢ Computation.LiftRel (LiftRelO (fun x x_1 => x = x_1) fun s1 s2 => (map ret s2).join = s1) s'.destruct s.destruct
tactic: intro s' s h
state_before: α : Type u
β : Type v
γ : Type w
s✝ s' s : WSeq α
h : (map ret s).join = s'
⊢ Computation.LiftRel (LiftRelO (fun x x_1 => x = x_1) fun s1 s2 => (map ret s2).join = s1) s'.destruct s.destruct
state_after: α : Type u
β : Type v
γ : Type w
s✝ s' s : WSeq α
h : (map ret s).join = s'
⊢ Computation.LiftRel (LiftRelO (fun x x_1 => x = x_1) fun s1 s2 => (map ret s2).join = s1) (map ret s).join.destruct
    s.destruct
tactic: rw [← h]
state_before: α : Type u
β : Type v
γ : Type w
s✝ s' s : WSeq α
h : (map ret s).join = s'
⊢ Computation.LiftRel (LiftRelO (fun x x_1 => x = x_1) fun s1 s2 => (map ret s2).join = s1) (map ret s).join.destruct
    s.destruct
state_after: case H
α : Type u
β : Type v
γ : Type w
s✝ s' s : WSeq α
h : (map ret s).join = s'
⊢ ∀ {ca cb : Computation (Option (α × WSeq α))},
    (∃ s, ca = (map ret s).join.destruct ∧ cb = s.destruct) →
      LiftRelAux (LiftRelO (fun x x_1 => x = x_1) fun s1 s2 => (map ret s2).join = s1)
        (fun c1 c2 => ∃ s, c1 = (map ret s).join.destruct ∧ c2 = s.destruct) ca.destruct cb.destruct

case Hc
α : Type u
β : Type v
γ : Type w
s✝ s' s : WSeq α
h : (map ret s).join = s'
⊢ ∃ s_1, (map ret s).join.destruct = (map ret s_1).join.destruct ∧ s.destruct = s_1.destruct
tactic: apply liftRel_rec fun c1 c2 => ∃ s, c1 = destruct (join (map ret s)) ∧ c2 = destruct s
Theorem: Polynomial.nextCoeff_map
File: Mathlib/Algebra/Polynomial/Monic.lean

Proof steps:
state_before: R : Type u
S : Type v
a b : R
m n : ℕ
ι : Type y
inst✝¹ : Semiring R
inst✝ : Semiring S
f : R →+* S
hf : Injective ⇑f
p : R[X]
⊢ (map f p).nextCoeff = f p.nextCoeff
state_after: R : Type u
S : Type v
a b : R
m n : ℕ
ι : Type y
inst✝¹ : Semiring R
inst✝ : Semiring S
f : R →+* S
hf : Injective ⇑f
p : R[X]
⊢ (if (map f p).natDegree = 0 then 0 else (map f p).coeff ((map f p).natDegree - 1)) =
    f (if p.natDegree = 0 then 0 else p.coeff (p.natDegree - 1))
tactic: unfold nextCoeff
state_before: R : Type u
S : Type v
a b : R
m n : ℕ
ι : Type y
inst✝¹ : Semiring R
inst✝ : Semiring S
f : R →+* S
hf : Injective ⇑f
p : R[X]
⊢ (if (map f p).natDegree = 0 then 0 else (map f p).coeff ((map f p).natDegree - 1)) =
    f (if p.natDegree = 0 then 0 else p.coeff (p.natDegree - 1))
state_after: R : Type u
S : Type v
a b : R
m n : ℕ
ι : Type y
inst✝¹ : Semiring R
inst✝ : Semiring S
f : R →+* S
hf : Injective ⇑f
p : R[X]
⊢ (if p.natDegree = 0 then 0 else (map f p).coeff (p.natDegree - 1)) =
    f (if p.natDegree = 0 then 0 else p.coeff (p.natDegree - 1))
tactic: rw [natDegree_map_eq_of_injective hf]
state_before: R : Type u
S : Type v
a b : R
m n : ℕ
ι : Type y
inst✝¹ : Semiring R
inst✝ : Semiring S
f : R →+* S
hf : Injective ⇑f
p : R[X]
⊢ (if p.natDegree = 0 then 0 else (map f p).coeff (p.natDegree - 1)) =
    f (if p.natDegree = 0 then 0 else p.coeff (p.natDegree - 1))
state_after: no goals
tactic: split_ifs <;> simp [*]
Theorem: AddCircle.norm_eq_of_zero
File: Mathlib/Analysis/Normed/Group/AddCircle.lean

Proof steps:
state_before: p x : ℝ
⊢ ‖↑x‖ = |x|
state_after: p x : ℝ
⊢ {y | ↑y = ↑x} = {x}
tactic: suffices { y : ℝ | (y : AddCircle (0 : ℝ)) = (x : AddCircle (0 : ℝ)) } = {x} by
    rw [quotient_norm_eq, this, image_singleton, Real.norm_eq_abs, csInf_singleton]
state_before: p x : ℝ
⊢ {y | ↑y = ↑x} = {x}
state_after: case h
p x y : ℝ
⊢ y ∈ {y | ↑y = ↑x} ↔ y ∈ {x}
tactic: ext y
state_before: case h
p x y : ℝ
⊢ y ∈ {y | ↑y = ↑x} ↔ y ∈ {x}
state_after: no goals
tactic: simp [QuotientAddGroup.eq_iff_sub_mem, mem_zmultiples_iff, sub_eq_zero]
Theorem: CategoryTheory.Limits.equalizerSubobject_arrow'
File: Mathlib/CategoryTheory/Subobject/Limits.lean

Proof steps:
state_before: C : Type u
inst✝¹ : Category.{v, u} C
X Y Z : C
f g : X ⟶ Y
inst✝ : HasEqualizer f g
⊢ (equalizerSubobjectIso f g).inv ≫ (equalizerSubobject f g).arrow = equalizer.ι f g
state_after: no goals
tactic: simp [equalizerSubobjectIso]
Theorem: ProbabilityTheory.IndepSet_iff
File: Mathlib/Probability/Independence/Basic.lean

Proof steps:
state_before: Ω : Type u_1
ι : Type u_2
β : Type u_3
γ : Type u_4
κ : ι → Type u_5
π : ι → Set (Set Ω)
m : ι → MeasurableSpace Ω
x✝ : MeasurableSpace Ω
μ✝ : Measure Ω
S : Finset ι
s✝ : ι → Set Ω
s t : Set Ω
μ : Measure Ω
⊢ IndepSet s t μ ↔ ∀ (t1 t2 : Set Ω), MeasurableSet t1 → MeasurableSet t2 → μ (t1 ∩ t2) = μ t1 * μ t2
state_after: no goals
tactic: simp only [IndepSet_iff_Indep, Indep_iff]
Theorem: fourierCoeff_toLp
File: Mathlib/Analysis/Fourier/AddCircle.lean

Proof steps:
state_before: T : ℝ
hT : Fact (0 < T)
f : C(AddCircle T, ℂ)
n : ℤ
⊢ ∀ (x : AddCircle T), (fourier (-n)) x = (fourier (-n)) x
state_after: no goals
tactic: tauto
Theorem: LinearMap.ker_eq_bot_of_injective
File: Mathlib/Algebra/Module/Submodule/Ker.lean

Proof steps:
state_before: R : Type u_1
R₁ : Type u_2
R₂ : Type u_3
R₃ : Type u_4
K : Type u_5
M : Type u_6
M₁ : Type u_7
M₂ : Type u_8
M₃ : Type u_9
V : Type u_10
V₂ : Type u_11
inst✝¹² : Semiring R
inst✝¹¹ : Semiring R₂
inst✝¹⁰ : Semiring R₃
inst✝⁹ : AddCommMonoid M
inst✝⁸ : AddCommMonoid M₂
inst✝⁷ : AddCommMonoid M₃
σ₁₂ : R →+* R₂
σ₂₃ : R₂ →+* R₃
σ₁₃ : R →+* R₃
inst✝⁶ : RingHomCompTriple σ₁₂ σ₂₃ σ₁₃
inst✝⁵ : Module R M
inst✝⁴ : Module R₂ M₂
inst✝³ : Module R₃ M₃
σ₂₁ : R₂ →+* R
τ₁₂ : R →+* R₂
τ₂₃ : R₂ →+* R₃
τ₁₃ : R →+* R₃
inst✝² : RingHomCompTriple τ₁₂ τ₂₃ τ₁₃
F : Type u_12
inst✝¹ : FunLike F M M₂
inst✝ : SemilinearMapClass F τ₁₂ M M₂
f : F
hf : Injective ⇑f
⊢ ker f = ⊥
state_after: R : Type u_1
R₁ : Type u_2
R₂ : Type u_3
R₃ : Type u_4
K : Type u_5
M : Type u_6
M₁ : Type u_7
M₂ : Type u_8
M₃ : Type u_9
V : Type u_10
V₂ : Type u_11
inst✝¹² : Semiring R
inst✝¹¹ : Semiring R₂
inst✝¹⁰ : Semiring R₃
inst✝⁹ : AddCommMonoid M
inst✝⁸ : AddCommMonoid M₂
inst✝⁷ : AddCommMonoid M₃
σ₁₂ : R →+* R₂
σ₂₃ : R₂ →+* R₃
σ₁₃ : R →+* R₃
inst✝⁶ : RingHomCompTriple σ₁₂ σ₂₃ σ₁₃
inst✝⁵ : Module R M
inst✝⁴ : Module R₂ M₂
inst✝³ : Module R₃ M₃
σ₂₁ : R₂ →+* R
τ₁₂ : R →+* R₂
τ₂₃ : R₂ →+* R₃
τ₁₃ : R →+* R₃
inst✝² : RingHomCompTriple τ₁₂ τ₂₃ τ₁₃
F : Type u_12
inst✝¹ : FunLike F M M₂
inst✝ : SemilinearMapClass F τ₁₂ M M₂
f : F
hf : Injective ⇑f
this : Disjoint ⊤ (ker f)
⊢ ker f = ⊥
tactic: have : Disjoint ⊤ (ker f) := by
    -- Porting note: `← map_zero f` should work here, but it needs to be directly applied to H.
    rw [disjoint_ker]
    intros _ _ H
    rw [← map_zero f] at H
    exact hf H
state_before: R : Type u_1
R₁ : Type u_2
R₂ : Type u_3
R₃ : Type u_4
K : Type u_5
M : Type u_6
M₁ : Type u_7
M₂ : Type u_8
M₃ : Type u_9
V : Type u_10
V₂ : Type u_11
inst✝¹² : Semiring R
inst✝¹¹ : Semiring R₂
inst✝¹⁰ : Semiring R₃
inst✝⁹ : AddCommMonoid M
inst✝⁸ : AddCommMonoid M₂
inst✝⁷ : AddCommMonoid M₃
σ₁₂ : R →+* R₂
σ₂₃ : R₂ →+* R₃
σ₁₃ : R →+* R₃
inst✝⁶ : RingHomCompTriple σ₁₂ σ₂₃ σ₁₃
inst✝⁵ : Module R M
inst✝⁴ : Module R₂ M₂
inst✝³ : Module R₃ M₃
σ₂₁ : R₂ →+* R
τ₁₂ : R →+* R₂
τ₂₃ : R₂ →+* R₃
τ₁₃ : R →+* R₃
inst✝² : RingHomCompTriple τ₁₂ τ₂₃ τ₁₃
F : Type u_12
inst✝¹ : FunLike F M M₂
inst✝ : SemilinearMapClass F τ₁₂ M M₂
f : F
hf : Injective ⇑f
this : Disjoint ⊤ (ker f)
⊢ ker f = ⊥
state_after: no goals
tactic: simpa [disjoint_iff_inf_le]
Theorem: comp_add_left
File: Mathlib/Algebra/Group/Basic.lean

Proof steps:
state_before: α : Type u_1
β : Type u_2
G : Type u_3
M : Type u_4
inst✝ : Semigroup α
x y : α
⊢ ((fun x_1 => x * x_1) ∘ fun x => y * x) = fun x_1 => x * y * x_1
state_after: case h
α : Type u_1
β : Type u_2
G : Type u_3
M : Type u_4
inst✝ : Semigroup α
x y z : α
⊢ ((fun x_1 => x * x_1) ∘ fun x => y * x) z = x * y * z
tactic: ext z
state_before: case h
α : Type u_1
β : Type u_2
G : Type u_3
M : Type u_4
inst✝ : Semigroup α
x y z : α
⊢ ((fun x_1 => x * x_1) ∘ fun x => y * x) z = x * y * z
state_after: no goals
tactic: simp [mul_assoc]
Theorem: Function.LeftInverse.iterate
File: Mathlib/Logic/Function/Iterate.lean

Proof steps:
state_before: α : Type u
β : Type v
f : α → α
m n✝¹ : ℕ
a : α
g : α → α
hg : LeftInverse g f
n✝ n : ℕ
ihn : LeftInverse g^[n] f^[n]
⊢ LeftInverse g^[n.succ] f^[n.succ]
state_after: α : Type u
β : Type v
f : α → α
m n✝¹ : ℕ
a : α
g : α → α
hg : LeftInverse g f
n✝ n : ℕ
ihn : LeftInverse g^[n] f^[n]
⊢ LeftInverse (g ∘ g^[n]) (f^[n] ∘ f)
tactic: rw [iterate_succ', iterate_succ]
state_before: α : Type u
β : Type v
f : α → α
m n✝¹ : ℕ
a : α
g : α → α
hg : LeftInverse g f
n✝ n : ℕ
ihn : LeftInverse g^[n] f^[n]
⊢ LeftInverse (g ∘ g^[n]) (f^[n] ∘ f)
state_after: no goals
tactic: exact ihn.comp hg
Theorem: List.filterMap_congr
File: Mathlib/Data/List/Basic.lean

Proof steps:
state_before: ι : Type u_1
α : Type u
β : Type v
γ : Type w
l₁ l₂ : List α
f g : α → Option β
l : List α
h : ∀ (x : α), x ∈ l → f x = g x
⊢ filterMap f l = filterMap g l
state_after: case cons
ι : Type u_1
α : Type u
β : Type v
γ : Type w
l₁ l₂ : List α
f g : α → Option β
a : α
l : List α
ih : (∀ (x : α), x ∈ l → f x = g x) → filterMap f l = filterMap g l
h : ∀ (x : α), x ∈ a :: l → f x = g x
⊢ (match f a with
    | none => filterMap f l
    | some b => b :: filterMap f l) =
    match g a with
    | none => filterMap g l
    | some b => b :: filterMap g l
tactic: induction' l with a l ih <;> simp [filterMap_cons]
state_before: case cons
ι : Type u_1
α : Type u
β : Type v
γ : Type w
l₁ l₂ : List α
f g : α → Option β
a : α
l : List α
ih : (∀ (x : α), x ∈ l → f x = g x) → filterMap f l = filterMap g l
h : ∀ (x : α), x ∈ a :: l → f x = g x
⊢ (match f a with
    | none => filterMap f l
    | some b => b :: filterMap f l) =
    match g a with
    | none => filterMap g l
    | some b => b :: filterMap g l
state_after: case cons
ι : Type u_1
α : Type u
β : Type v
γ : Type w
l₁ l₂ : List α
f g : α → Option β
a : α
l : List α
ih : (∀ (x : α), x ∈ l → f x = g x) → filterMap f l = filterMap g l
h : ∀ (x : α), x ∈ a :: l → f x = g x
⊢ (match f a with
    | none => filterMap g l
    | some b => b :: filterMap g l) =
    match g a with
    | none => filterMap g l
    | some b => b :: filterMap g l
tactic: simp [ih (fun x hx ↦ h x (List.mem_cons_of_mem a hx))]
state_before: case cons
ι : Type u_1
α : Type u
β : Type v
γ : Type w
l₁ l₂ : List α
f g : α → Option β
a : α
l : List α
ih : (∀ (x : α), x ∈ l → f x = g x) → filterMap f l = filterMap g l
h : ∀ (x : α), x ∈ a :: l → f x = g x
⊢ (match f a with
    | none => filterMap g l
    | some b => b :: filterMap g l) =
    match g a with
    | none => filterMap g l
    | some b => b :: filterMap g l
state_after: case cons.none
ι : Type u_1
α : Type u
β : Type v
γ : Type w
l₁ l₂ : List α
f g : α → Option β
a : α
l : List α
ih : (∀ (x : α), x ∈ l → f x = g x) → filterMap f l = filterMap g l
h : ∀ (x : α), x ∈ a :: l → f x = g x
hfa : f a = none
⊢ (match none with
    | none => filterMap g l
    | some b => b :: filterMap g l) =
    match g a with
    | none => filterMap g l
    | some b => b :: filterMap g l

case cons.some
ι : Type u_1
α : Type u
β : Type v
γ : Type w
l₁ l₂ : List α
f g : α → Option β
a : α
l : List α
ih : (∀ (x : α), x ∈ l → f x = g x) → filterMap f l = filterMap g l
h : ∀ (x : α), x ∈ a :: l → f x = g x
b : β
hfa : f a = some b
⊢ (match some b with
    | none => filterMap g l
    | some b => b :: filterMap g l) =
    match g a with
    | none => filterMap g l
    | some b => b :: filterMap g l
tactic: cases' hfa : f a with b
Theorem: Multiset.filter_sub
File: Mathlib/Data/Multiset/Basic.lean

Proof steps:
state_before: α : Type u_1
β : Type v
γ : Type u_2
p : α → Prop
inst✝¹ : DecidablePred p
inst✝ : DecidableEq α
s t : Multiset α
⊢ filter p (s - t) = filter p s - filter p t
state_after: α : Type u_1
β : Type v
γ : Type u_2
p : α → Prop
inst✝¹ : DecidablePred p
inst✝ : DecidableEq α
t : Multiset α
⊢ ∀ (s : Multiset α), filter p (s - t) = filter p s - filter p t
tactic: revert s
state_before: α : Type u_1
β : Type v
γ : Type u_2
p : α → Prop
inst✝¹ : DecidablePred p
inst✝ : DecidableEq α
t : Multiset α
⊢ ∀ (s : Multiset α), filter p (s - t) = filter p s - filter p t
state_after: α : Type u_1
β : Type v
γ : Type u_2
p : α → Prop
inst✝¹ : DecidablePred p
inst✝ : DecidableEq α
t✝ : Multiset α
a : α
t : Multiset α
IH : ∀ (s : Multiset α), filter p (s - t) = filter p s - filter p t
s : Multiset α
⊢ filter p (s - a ::ₘ t) = filter p s - filter p (a ::ₘ t)
tactic: refine Multiset.induction_on t (by simp) fun a t IH s => ?_
state_before: α : Type u_1
β : Type v
γ : Type u_2
p : α → Prop
inst✝¹ : DecidablePred p
inst✝ : DecidableEq α
t✝ : Multiset α
a : α
t : Multiset α
IH : ∀ (s : Multiset α), filter p (s - t) = filter p s - filter p t
s : Multiset α
⊢ filter p (s - a ::ₘ t) = filter p s - filter p (a ::ₘ t)
state_after: α : Type u_1
β : Type v
γ : Type u_2
p : α → Prop
inst✝¹ : DecidablePred p
inst✝ : DecidableEq α
t✝ : Multiset α
a : α
t : Multiset α
IH : ∀ (s : Multiset α), filter p (s - t) = filter p s - filter p t
s : Multiset α
⊢ filter p (s.erase a) - filter p t = filter p s - filter p (a ::ₘ t)
tactic: rw [sub_cons, IH]
state_before: α : Type u_1
β : Type v
γ : Type u_2
p : α → Prop
inst✝¹ : DecidablePred p
inst✝ : DecidableEq α
t✝ : Multiset α
a : α
t : Multiset α
IH : ∀ (s : Multiset α), filter p (s - t) = filter p s - filter p t
s : Multiset α
⊢ filter p (s.erase a) - filter p t = filter p s - filter p (a ::ₘ t)
state_after: case pos
α : Type u_1
β : Type v
γ : Type u_2
p : α → Prop
inst✝¹ : DecidablePred p
inst✝ : DecidableEq α
t✝ : Multiset α
a : α
t : Multiset α
IH : ∀ (s : Multiset α), filter p (s - t) = filter p s - filter p t
s : Multiset α
h : p a
⊢ filter p (s.erase a) - filter p t = filter p s - filter p (a ::ₘ t)

case neg
α : Type u_1
β : Type v
γ : Type u_2
p : α → Prop
inst✝¹ : DecidablePred p
inst✝ : DecidableEq α
t✝ : Multiset α
a : α
t : Multiset α
IH : ∀ (s : Multiset α), filter p (s - t) = filter p s - filter p t
s : Multiset α
h : ¬p a
⊢ filter p (s.erase a) - filter p t = filter p s - filter p (a ::ₘ t)
tactic: by_cases h : p a
Theorem: PosNum.add_one
File: Mathlib/Data/Num/Lemmas.lean

Proof steps:
state_before: α : Type u_1
n : PosNum
⊢ n + 1 = n.succ
state_after: no goals
tactic: cases n <;> rfl
Theorem: isLocalDiffeomorph_iff
File: Mathlib/Geometry/Manifold/LocalDiffeomorph.lean

Proof steps:
state_before: 𝕜 : Type u_1
inst✝¹⁰ : NontriviallyNormedField 𝕜
E : Type u_2
inst✝⁹ : NormedAddCommGroup E
inst✝⁸ : NormedSpace 𝕜 E
F : Type u_3
inst✝⁷ : NormedAddCommGroup F
inst✝⁶ : NormedSpace 𝕜 F
H : Type u_4
inst✝⁵ : TopologicalSpace H
G : Type u_5
inst✝⁴ : TopologicalSpace G
I : ModelWithCorners 𝕜 E H
J : ModelWithCorners 𝕜 F G
M : Type u_6
inst✝³ : TopologicalSpace M
inst✝² : ChartedSpace H M
N : Type u_7
inst✝¹ : TopologicalSpace N
inst✝ : ChartedSpace G N
n : ℕ∞
f : M → N
⊢ IsLocalDiffeomorph I J n f ↔ ∀ (x : M), IsLocalDiffeomorphAt I J n f x
state_after: no goals
tactic: rfl
Theorem: Complex.exp_im
File: Mathlib/Data/Complex/Exponential.lean

Proof steps:
state_before: x y : ℂ
⊢ (cexp x).im = Real.exp x.re * Real.sin x.im
state_after: x y : ℂ
⊢ (cexp ↑x.re * (cos ↑x.im + sin ↑x.im * I)).im = Real.exp x.re * Real.sin x.im
tactic: rw [exp_eq_exp_re_mul_sin_add_cos]
state_before: x y : ℂ
⊢ (cexp ↑x.re * (cos ↑x.im + sin ↑x.im * I)).im = Real.exp x.re * Real.sin x.im
state_after: no goals
tactic: simp [exp_ofReal_re, sin_ofReal_re]