ruc-ai4math/mathlib_handler_benchmark_410 huggingface dataset:
Theorem: RatFunc.toFractionRingRingEquiv_apply
File: Mathlib/FieldTheory/RatFunc/Basic.lean

Proof steps:
state_before: K : Type u
inst✝ : CommRing K
x✝¹ x✝ : RatFunc K
toFractionRing✝¹ toFractionRing✝ : FractionRing K[X]
⊢ { toFun := toFractionRing, invFun := ofFractionRing, left_inv := ⋯, right_inv := ⋯ }.toFun
      ({ toFractionRing := toFractionRing✝¹ } + { toFractionRing := toFractionRing✝ }) =
    { toFun := toFractionRing, invFun := ofFractionRing, left_inv := ⋯, right_inv := ⋯ }.toFun
        { toFractionRing := toFractionRing✝¹ } +
      { toFun := toFractionRing, invFun := ofFractionRing, left_inv := ⋯, right_inv := ⋯ }.toFun
        { toFractionRing := toFractionRing✝ }
state_after: no goals
tactic: simp [← ofFractionRing_add]
state_before: K : Type u
inst✝ : CommRing K
x✝¹ x✝ : RatFunc K
toFractionRing✝¹ toFractionRing✝ : FractionRing K[X]
⊢ { toFun := toFractionRing, invFun := ofFractionRing, left_inv := ⋯, right_inv := ⋯ }.toFun
      ({ toFractionRing := toFractionRing✝¹ } * { toFractionRing := toFractionRing✝ }) =
    { toFun := toFractionRing, invFun := ofFractionRing, left_inv := ⋯, right_inv := ⋯ }.toFun
        { toFractionRing := toFractionRing✝¹ } *
      { toFun := toFractionRing, invFun := ofFractionRing, left_inv := ⋯, right_inv := ⋯ }.toFun
        { toFractionRing := toFractionRing✝ }
state_after: no goals
tactic: simp [← ofFractionRing_mul]
Theorem: HasDerivWithinAt.complexToReal_fderiv
File: Mathlib/Analysis/Complex/RealDeriv.lean

Proof steps:
state_before: e : ℂ → ℂ
e' : ℂ
z : ℝ
E : Type u_1
inst✝¹ : NormedAddCommGroup E
inst✝ : NormedSpace ℂ E
f : ℂ → ℂ
s : Set ℂ
f' x : ℂ
h : HasDerivWithinAt f f' s x
⊢ HasFDerivWithinAt f (f' • 1) s x
state_after: no goals
tactic: simpa only [Complex.restrictScalars_one_smulRight] using h.hasFDerivWithinAt.restrictScalars ℝ
Theorem: zpow_negSucc
File: Mathlib/Algebra/Group/Defs.lean

Proof steps:
state_before: G : Type u_1
inst✝ : DivInvMonoid G
a✝ b a : G
n : ℕ
⊢ a ^ Int.negSucc n = (a ^ (n + 1))⁻¹
state_after: G : Type u_1
inst✝ : DivInvMonoid G
a✝ b a : G
n : ℕ
⊢ a ^ Int.negSucc n = (a ^ ↑(n + 1))⁻¹
tactic: rw [← zpow_natCast]
state_before: G : Type u_1
inst✝ : DivInvMonoid G
a✝ b a : G
n : ℕ
⊢ a ^ Int.negSucc n = (a ^ ↑(n + 1))⁻¹
state_after: no goals
tactic: exact DivInvMonoid.zpow_neg' n a
Theorem: List.range_map_iterate
File: Mathlib/Data/List/Iterate.lean

Proof steps:
state_before: α : Type u_1
n : ℕ
f : α → α
a : α
⊢ map (fun x => f^[x] a) (range n) = iterate f a n
state_after: no goals
tactic: apply List.ext_get <;> simp
Theorem: Nat.smoothNumbers_zero
File: Mathlib/NumberTheory/SmoothNumbers.lean

Proof steps:
state_before: ⊢ smoothNumbers 0 = {1}
state_after: no goals
tactic: simp only [smoothNumbers_eq_factoredNumbers, Finset.range_zero, factoredNumbers_empty]
Theorem: Algebra.trace_eq_zero_of_not_exists_basis
File: Mathlib/RingTheory/Trace/Defs.lean

Proof steps:
state_before: R : Type u_1
S : Type u_2
T : Type u_3
inst✝⁵ : CommRing R
inst✝⁴ : CommRing S
inst✝³ : CommRing T
inst✝² : Algebra R S
inst✝¹ : Algebra R T
ι κ : Type w
inst✝ : Fintype ι
b : Basis ι R S
h : ¬∃ s, Nonempty (Basis { x // x ∈ s } R S)
⊢ trace R S = 0
state_after: case h
R : Type u_1
S : Type u_2
T : Type u_3
inst✝⁵ : CommRing R
inst✝⁴ : CommRing S
inst✝³ : CommRing T
inst✝² : Algebra R S
inst✝¹ : Algebra R T
ι κ : Type w
inst✝ : Fintype ι
b : Basis ι R S
h : ¬∃ s, Nonempty (Basis { x // x ∈ s } R S)
s : S
⊢ (trace R S) s = 0 s
tactic: ext s
state_before: case h
R : Type u_1
S : Type u_2
T : Type u_3
inst✝⁵ : CommRing R
inst✝⁴ : CommRing S
inst✝³ : CommRing T
inst✝² : Algebra R S
inst✝¹ : Algebra R T
ι κ : Type w
inst✝ : Fintype ι
b : Basis ι R S
h : ¬∃ s, Nonempty (Basis { x // x ∈ s } R S)
s : S
⊢ (trace R S) s = 0 s
state_after: no goals
tactic: simp [trace_apply, LinearMap.trace, h]
Theorem: Lat.Iso.mk_hom_toSupHom_toFun
File: Mathlib/Order/Category/Lat.lean

Proof steps:
state_before: α β : Lat
e : ↑α ≃o ↑β
⊢ { toFun := ⇑e, map_sup' := ⋯, map_inf' := ⋯ } ≫ { toFun := ⇑e.symm, map_sup' := ⋯, map_inf' := ⋯ } = 𝟙 α
state_after: case w
α β : Lat
e : ↑α ≃o ↑β
x✝ : (forget Lat).obj α
⊢ ({ toFun := ⇑e, map_sup' := ⋯, map_inf' := ⋯ } ≫ { toFun := ⇑e.symm, map_sup' := ⋯, map_inf' := ⋯ }) x✝ = (𝟙 α) x✝
tactic: ext
state_before: case w
α β : Lat
e : ↑α ≃o ↑β
x✝ : (forget Lat).obj α
⊢ ({ toFun := ⇑e, map_sup' := ⋯, map_inf' := ⋯ } ≫ { toFun := ⇑e.symm, map_sup' := ⋯, map_inf' := ⋯ }) x✝ = (𝟙 α) x✝
state_after: no goals
tactic: exact e.symm_apply_apply _
state_before: α β : Lat
e : ↑α ≃o ↑β
⊢ { toFun := ⇑e.symm, map_sup' := ⋯, map_inf' := ⋯ } ≫ { toFun := ⇑e, map_sup' := ⋯, map_inf' := ⋯ } = 𝟙 β
state_after: case w
α β : Lat
e : ↑α ≃o ↑β
x✝ : (forget Lat).obj β
⊢ ({ toFun := ⇑e.symm, map_sup' := ⋯, map_inf' := ⋯ } ≫ { toFun := ⇑e, map_sup' := ⋯, map_inf' := ⋯ }) x✝ = (𝟙 β) x✝
tactic: ext
state_before: case w
α β : Lat
e : ↑α ≃o ↑β
x✝ : (forget Lat).obj β
⊢ ({ toFun := ⇑e.symm, map_sup' := ⋯, map_inf' := ⋯ } ≫ { toFun := ⇑e, map_sup' := ⋯, map_inf' := ⋯ }) x✝ = (𝟙 β) x✝
state_after: no goals
tactic: exact e.apply_symm_apply _
Theorem: Turing.ToPartrec.Code.cons_eval
File: Mathlib/Computability/TMToPartrec.lean

Proof steps:
state_before: f fs : Code
⊢ (f.cons fs).eval = fun v => do
    let n ← f.eval v
    let ns ← fs.eval v
    pure (n.headI :: ns)
state_after: no goals
tactic: simp [eval]
Theorem: Set.prod_range_range_eq
File: Mathlib/Data/Set/Prod.lean

Proof steps:
state_before: α : Type u_1
β : Type u_2
γ : Type u_3
δ : Type u_4
s s₁ s₂ : Set α
t t₁ t₂ : Set β
a : α
b : β
m₁ : α → γ
m₂ : β → δ
⊢ ∀ (x : γ × δ), x ∈ range m₁ ×ˢ range m₂ ↔ x ∈ range fun p => (m₁ p.1, m₂ p.2)
state_after: no goals
tactic: simp [range]
Theorem: disjointed_eq_inf_compl
File: Mathlib/Order/Disjointed.lean

Proof steps:
state_before: α : Type u_1
β : Type u_2
inst✝ : CompleteBooleanAlgebra α
f : ℕ → α
n : ℕ
⊢ disjointed f n = f n ⊓ ⨅ i, ⨅ (_ : i < n), (f i)ᶜ
state_after: case zero
α : Type u_1
β : Type u_2
inst✝ : CompleteBooleanAlgebra α
f : ℕ → α
⊢ disjointed f 0 = f 0 ⊓ ⨅ i, ⨅ (_ : i < 0), (f i)ᶜ

case succ
α : Type u_1
β : Type u_2
inst✝ : CompleteBooleanAlgebra α
f : ℕ → α
n✝ : ℕ
⊢ disjointed f (n✝ + 1) = f (n✝ + 1) ⊓ ⨅ i, ⨅ (_ : i < n✝ + 1), (f i)ᶜ
tactic: cases n
state_before: case succ
α : Type u_1
β : Type u_2
inst✝ : CompleteBooleanAlgebra α
f : ℕ → α
n✝ : ℕ
⊢ disjointed f (n✝ + 1) = f (n✝ + 1) ⊓ ⨅ i, ⨅ (_ : i < n✝ + 1), (f i)ᶜ
state_after: case succ
α : Type u_1
β : Type u_2
inst✝ : CompleteBooleanAlgebra α
f : ℕ → α
n✝ : ℕ
⊢ f (n✝ + 1) ⊓ ⨅ i, ⨅ (_ : i ≤ n✝), (f i)ᶜ = f (n✝ + 1) ⊓ ⨅ i, ⨅ (_ : i < n✝ + 1), (f i)ᶜ
tactic: simp_rw [disjointed_succ, partialSups_eq_biSup, sdiff_eq, compl_iSup]
state_before: case succ
α : Type u_1
β : Type u_2
inst✝ : CompleteBooleanAlgebra α
f : ℕ → α
n✝ : ℕ
⊢ f (n✝ + 1) ⊓ ⨅ i, ⨅ (_ : i ≤ n✝), (f i)ᶜ = f (n✝ + 1) ⊓ ⨅ i, ⨅ (_ : i < n✝ + 1), (f i)ᶜ
state_after: case succ.e_a.e_s
α : Type u_1
β : Type u_2
inst✝ : CompleteBooleanAlgebra α
f : ℕ → α
n✝ : ℕ
⊢ (fun i => ⨅ (_ : i ≤ n✝), (f i)ᶜ) = fun i => ⨅ (_ : i < n✝ + 1), (f i)ᶜ
tactic: congr
state_before: case succ.e_a.e_s
α : Type u_1
β : Type u_2
inst✝ : CompleteBooleanAlgebra α
f : ℕ → α
n✝ : ℕ
⊢ (fun i => ⨅ (_ : i ≤ n✝), (f i)ᶜ) = fun i => ⨅ (_ : i < n✝ + 1), (f i)ᶜ
state_after: case succ.e_a.e_s.h
α : Type u_1
β : Type u_2
inst✝ : CompleteBooleanAlgebra α
f : ℕ → α
n✝ i : ℕ
⊢ ⨅ (_ : i ≤ n✝), (f i)ᶜ = ⨅ (_ : i < n✝ + 1), (f i)ᶜ
tactic: ext i
state_before: case succ.e_a.e_s.h
α : Type u_1
β : Type u_2
inst✝ : CompleteBooleanAlgebra α
f : ℕ → α
n✝ i : ℕ
⊢ ⨅ (_ : i ≤ n✝), (f i)ᶜ = ⨅ (_ : i < n✝ + 1), (f i)ᶜ
state_after: no goals
tactic: rw [Nat.lt_succ_iff]
Theorem: RingHom.map_ite_one_zero
File: Mathlib/Algebra/Ring/Hom/Defs.lean

Proof steps:
state_before: F✝ : Type u_1
α : Type u_2
β : Type u_3
γ : Type u_4
x✝¹ : NonAssocSemiring α
x✝ : NonAssocSemiring β
f✝ : α →+* β
x y : α
F : Type u_5
inst✝² : FunLike F α β
inst✝¹ : RingHomClass F α β
f : F
p : Prop
inst✝ : Decidable p
⊢ f (if p then 1 else 0) = if p then 1 else 0
state_after: no goals
tactic: split_ifs with h <;> simp [h]
Theorem: Multiset.strongInductionOn_eq
File: Mathlib/Data/Multiset/Basic.lean

Proof steps:
state_before: α : Type u_1
β : Type v
γ : Type u_2
p : Multiset α → Sort u_3
s : Multiset α
H : (s : Multiset α) → ((t : Multiset α) → t < s → p t) → p s
⊢ s.strongInductionOn H = H s fun t _h => t.strongInductionOn H
state_after: no goals
tactic: rw [strongInductionOn]
Theorem: CategoryTheory.Abelian.Pseudoelement.zero_of_map_zero
File: Mathlib/CategoryTheory/Abelian/Pseudoelements.lean

Proof steps:
state_before: C : Type u
inst✝¹ : Category.{v, u} C
inst✝ : Abelian C
P Q : C
f : P ⟶ Q
h : Function.Injective (pseudoApply f)
a : Pseudoelement P
ha : pseudoApply f a = 0
⊢ a = 0
state_after: C : Type u
inst✝¹ : Category.{v, u} C
inst✝ : Abelian C
P Q : C
f : P ⟶ Q
h : Function.Injective (pseudoApply f)
a : Pseudoelement P
ha : pseudoApply f a = pseudoApply f 0
⊢ a = 0
tactic: rw [← apply_zero f] at ha
state_before: C : Type u
inst✝¹ : Category.{v, u} C
inst✝ : Abelian C
P Q : C
f : P ⟶ Q
h : Function.Injective (pseudoApply f)
a : Pseudoelement P
ha : pseudoApply f a = pseudoApply f 0
⊢ a = 0
state_after: no goals
tactic: exact h ha
Theorem: exists_closed_nhds_zero_neg_eq_add_subset
File: Mathlib/Topology/Algebra/Group/Basic.lean

Proof steps:
state_before: G : Type w
H : Type x
α : Type u
β : Type v
inst✝² : TopologicalSpace G
inst✝¹ : Group G
inst✝ : TopologicalGroup G
U : Set G
hU : U ∈ 𝓝 1
⊢ ∃ V ∈ 𝓝 1, IsClosed V ∧ V⁻¹ = V ∧ V * V ⊆ U
state_after: case intro.intro.intro
G : Type w
H : Type x
α : Type u
β : Type v
inst✝² : TopologicalSpace G
inst✝¹ : Group G
inst✝ : TopologicalGroup G
U : Set G
hU : U ∈ 𝓝 1
V : Set G
V_open : IsOpen V
V_mem : 1 ∈ V
hV : V * V ⊆ U
⊢ ∃ V ∈ 𝓝 1, IsClosed V ∧ V⁻¹ = V ∧ V * V ⊆ U
tactic: rcases exists_open_nhds_one_mul_subset hU with ⟨V, V_open, V_mem, hV⟩
state_before: case intro.intro.intro
G : Type w
H : Type x
α : Type u
β : Type v
inst✝² : TopologicalSpace G
inst✝¹ : Group G
inst✝ : TopologicalGroup G
U : Set G
hU : U ∈ 𝓝 1
V : Set G
V_open : IsOpen V
V_mem : 1 ∈ V
hV : V * V ⊆ U
⊢ ∃ V ∈ 𝓝 1, IsClosed V ∧ V⁻¹ = V ∧ V * V ⊆ U
state_after: case intro.intro.intro.intro.intro.intro
G : Type w
H : Type x
α : Type u
β : Type v
inst✝² : TopologicalSpace G
inst✝¹ : Group G
inst✝ : TopologicalGroup G
U : Set G
hU : U ∈ 𝓝 1
V : Set G
V_open : IsOpen V
V_mem : 1 ∈ V
hV : V * V ⊆ U
W : Set G
W_mem : W ∈ 𝓝 1
W_closed : IsClosed W
hW : W ⊆ V
⊢ ∃ V ∈ 𝓝 1, IsClosed V ∧ V⁻¹ = V ∧ V * V ⊆ U
tactic: rcases exists_mem_nhds_isClosed_subset (V_open.mem_nhds V_mem) with ⟨W, W_mem, W_closed, hW⟩
state_before: case intro.intro.intro.intro.intro.intro
G : Type w
H : Type x
α : Type u
β : Type v
inst✝² : TopologicalSpace G
inst✝¹ : Group G
inst✝ : TopologicalGroup G
U : Set G
hU : U ∈ 𝓝 1
V : Set G
V_open : IsOpen V
V_mem : 1 ∈ V
hV : V * V ⊆ U
W : Set G
W_mem : W ∈ 𝓝 1
W_closed : IsClosed W
hW : W ⊆ V
⊢ ∃ V ∈ 𝓝 1, IsClosed V ∧ V⁻¹ = V ∧ V * V ⊆ U
state_after: case intro.intro.intro.intro.intro.intro
G : Type w
H : Type x
α : Type u
β : Type v
inst✝² : TopologicalSpace G
inst✝¹ : Group G
inst✝ : TopologicalGroup G
U : Set G
hU : U ∈ 𝓝 1
V : Set G
V_open : IsOpen V
V_mem : 1 ∈ V
hV : V * V ⊆ U
W : Set G
W_mem : W ∈ 𝓝 1
W_closed : IsClosed W
hW : W ⊆ V
⊢ W ∩ W⁻¹ * (W ∩ W⁻¹) ⊆ U
tactic: refine ⟨W ∩ W⁻¹, Filter.inter_mem W_mem (inv_mem_nhds_one G W_mem), W_closed.inter W_closed.inv,
    by simp [inter_comm], ?_⟩
state_before: case intro.intro.intro.intro.intro.intro
G : Type w
H : Type x
α : Type u
β : Type v
inst✝² : TopologicalSpace G
inst✝¹ : Group G
inst✝ : TopologicalGroup G
U : Set G
hU : U ∈ 𝓝 1
V : Set G
V_open : IsOpen V
V_mem : 1 ∈ V
hV : V * V ⊆ U
W : Set G
W_mem : W ∈ 𝓝 1
W_closed : IsClosed W
hW : W ⊆ V
⊢ W ∩ W⁻¹ * (W ∩ W⁻¹) ⊆ U
state_after: no goals
tactic: calc
  W ∩ W⁻¹ * (W ∩ W⁻¹)
    ⊆ W * W := mul_subset_mul inter_subset_left inter_subset_left
  _ ⊆ V * V := mul_subset_mul hW hW
  _ ⊆ U := hV
Theorem: Fin.predAbove_last_apply
File: Mathlib/Data/Fin/Basic.lean

Proof steps:
state_before: n m : ℕ
i : Fin (n + 2)
⊢ (last n).predAbove i = if hi : i = last (n + 1) then last n else i.castPred hi
state_after: case pos
n m : ℕ
i : Fin (n + 2)
hi : i = last (n + 1)
⊢ (last n).predAbove i = last n

case neg
n m : ℕ
i : Fin (n + 2)
hi : ¬i = last (n + 1)
⊢ (last n).predAbove i = i.castPred hi
tactic: split_ifs with hi
Theorem: continuousAt_update_of_ne
File: Mathlib/Topology/Separation.lean

Proof steps:
state_before: X : Type u_1
Y : Type u_2
inst✝³ : TopologicalSpace X
inst✝² : T1Space X
inst✝¹ : DecidableEq X
inst✝ : TopologicalSpace Y
f : X → Y
x x' : X
y : Y
hne : x' ≠ x
⊢ ContinuousAt (update f x y) x' ↔ ContinuousAt f x'
state_after: no goals
tactic: simp only [← continuousWithinAt_univ, continuousWithinAt_update_of_ne hne]
Theorem: RingCat.Colimits.quot_add
File: Mathlib/Algebra/Category/Ring/Colimits.lean

Proof steps:
state_before: J : Type v
inst✝ : SmallCategory J
F : J ⥤ RingCat
x : ?m.26992
y : ?m.26995
⊢ ColimitType F
state_after: no goals
tactic: exact Quot.mk Setoid.r (add x y)
state_before: J : Type v
inst✝ : SmallCategory J
F : J ⥤ RingCat
x y : Prequotient F
⊢ ColimitType F
state_after: no goals
tactic: exact Quot.mk _ x
state_before: J : Type v
inst✝ : SmallCategory J
F : J ⥤ RingCat
x y : Prequotient F
⊢ ColimitType F
state_after: no goals
tactic: exact Quot.mk _ y
Theorem: List.Nodup.sym2
File: Mathlib/Data/List/Sym.lean

Proof steps:
state_before: α : Type u_1
β : Type u_2
xs : List α
h : xs.Nodup
⊢ xs.sym2.Nodup
state_after: no goals
tactic: induction xs with
  | nil => simp only [List.sym2, nodup_nil]
  | cons x xs ih =>
    rw [List.sym2]
    specialize ih h.of_cons
    rw [nodup_cons] at h
    refine Nodup.append (Nodup.cons ?notmem (h.2.map ?inj)) ih ?disj
    case disj =>
      intro z hz hz'
      simp only [mem_cons, mem_map] at hz
      obtain ⟨_, (rfl | _), rfl⟩ := hz
        <;> simp [left_mem_of_mk_mem_sym2 hz'] at h
    case notmem =>
      intro h'
      simp only [h.1, mem_map, Sym2.eq_iff, true_and, or_self, exists_eq_right] at h'
    case inj =>
      intro a b
      simp only [Sym2.eq_iff, true_and]
      rintro (rfl | ⟨rfl, rfl⟩) <;> rfl
Theorem: Equiv.Perm.IsThreeCycle.inv_iff
File: Mathlib/GroupTheory/Perm/Cycle/Type.lean

Proof steps:
state_before: α : Type u_1
inst✝¹ : Fintype α
inst✝ : DecidableEq α
σ f : Perm α
⊢ f⁻¹.IsThreeCycle → f.IsThreeCycle
state_after: α : Type u_1
inst✝¹ : Fintype α
inst✝ : DecidableEq α
σ f : Perm α
⊢ f⁻¹⁻¹⁻¹.IsThreeCycle → f⁻¹⁻¹.IsThreeCycle
tactic: rw [← inv_inv f]
state_before: α : Type u_1
inst✝¹ : Fintype α
inst✝ : DecidableEq α
σ f : Perm α
⊢ f⁻¹⁻¹⁻¹.IsThreeCycle → f⁻¹⁻¹.IsThreeCycle
state_after: no goals
tactic: apply inv
Theorem: StrictConcaveOn.map_sum_eq_iff
File: Mathlib/Analysis/Convex/Jensen.lean

Proof steps:
state_before: 𝕜 : Type u_1
E : Type u_2
F : Type u_3
β : Type u_4
ι : Type u_5
inst✝⁵ : LinearOrderedField 𝕜
inst✝⁴ : AddCommGroup E
inst✝³ : OrderedAddCommGroup β
inst✝² : Module 𝕜 E
inst✝¹ : Module 𝕜 β
inst✝ : OrderedSMul 𝕜 β
s : Set E
f : E → β
t : Finset ι
w : ι → 𝕜
p : ι → E
v : 𝕜
q : E
hf : StrictConcaveOn 𝕜 s f
h₀ : ∀ i ∈ t, 0 < w i
h₁ : ∑ i ∈ t, w i = 1
hmem : ∀ i ∈ t, p i ∈ s
⊢ f (∑ i ∈ t, w i • p i) = ∑ i ∈ t, w i • f (p i) ↔ ∀ j ∈ t, p j = ∑ i ∈ t, w i • p i
state_after: no goals
tactic: simpa using hf.neg.map_sum_eq_iff h₀ h₁ hmem
Theorem: Antivary.sum_smul_comp_perm_eq_sum_smul_iff
File: Mathlib/Algebra/Order/Rearrangement.lean

Proof steps:
state_before: ι : Type u_1
α : Type u_2
β : Type u_3
inst✝⁴ : LinearOrderedRing α
inst✝³ : LinearOrderedAddCommGroup β
inst✝² : Module α β
inst✝¹ : OrderedSMul α β
s : Finset ι
σ : Perm ι
f : ι → α
g : ι → β
inst✝ : Fintype ι
hfg : Antivary f g
⊢ ∑ i : ι, f i • g (σ i) = ∑ i : ι, f i • g i ↔ Antivary f (g ∘ ⇑σ)
state_after: no goals
tactic: simp [(hfg.antivaryOn _).sum_smul_comp_perm_eq_sum_smul_iff fun _ _ ↦ mem_univ _]
Theorem: AList.insert_insert
File: Mathlib/Data/List/AList.lean

Proof steps:
state_before: α : Type u
β : α → Type v
inst✝ : DecidableEq α
a : α
b b' : β a
s : AList β
⊢ insert a b' (insert a b s) = insert a b' s
state_after: case a
α : Type u
β : α → Type v
inst✝ : DecidableEq α
a : α
b b' : β a
s : AList β
⊢ (insert a b' (insert a b s)).entries = (insert a b' s).entries
tactic: ext : 1
state_before: case a
α : Type u
β : α → Type v
inst✝ : DecidableEq α
a : α
b b' : β a
s : AList β
⊢ (insert a b' (insert a b s)).entries = (insert a b' s).entries
state_after: no goals
tactic: simp only [AList.insert_entries, List.kerase_cons_eq]
Theorem: Algebra.trace_algebraMap
File: Mathlib/RingTheory/Trace/Defs.lean

Proof steps:
state_before: R : Type u_1
S : Type u_2
T : Type u_3
inst✝⁷ : CommRing R
inst✝⁶ : CommRing S
inst✝⁵ : CommRing T
inst✝⁴ : Algebra R S
inst✝³ : Algebra R T
ι κ : Type w
inst✝² : Fintype ι
b : Basis ι R S
inst✝¹ : StrongRankCondition R
inst✝ : Module.Free R S
x : R
⊢ (trace R S) ((algebraMap R S) x) = finrank R S • x
state_after: case pos
R : Type u_1
S : Type u_2
T : Type u_3
inst✝⁷ : CommRing R
inst✝⁶ : CommRing S
inst✝⁵ : CommRing T
inst✝⁴ : Algebra R S
inst✝³ : Algebra R T
ι κ : Type w
inst✝² : Fintype ι
b : Basis ι R S
inst✝¹ : StrongRankCondition R
inst✝ : Module.Free R S
x : R
H : ∃ s, Nonempty (Basis { x // x ∈ s } R S)
⊢ (trace R S) ((algebraMap R S) x) = finrank R S • x

case neg
R : Type u_1
S : Type u_2
T : Type u_3
inst✝⁷ : CommRing R
inst✝⁶ : CommRing S
inst✝⁵ : CommRing T
inst✝⁴ : Algebra R S
inst✝³ : Algebra R T
ι κ : Type w
inst✝² : Fintype ι
b : Basis ι R S
inst✝¹ : StrongRankCondition R
inst✝ : Module.Free R S
x : R
H : ¬∃ s, Nonempty (Basis { x // x ∈ s } R S)
⊢ (trace R S) ((algebraMap R S) x) = finrank R S • x
tactic: by_cases H : ∃ s : Finset S, Nonempty (Basis s R S)
Theorem: Finset.Icc_erase_left
File: Mathlib/Order/Interval/Finset/Basic.lean

Proof steps:
state_before: ι : Type u_1
α : Type u_2
inst✝² : PartialOrder α
inst✝¹ : LocallyFiniteOrder α
a✝ b✝ c : α
inst✝ : DecidableEq α
a b : α
⊢ (Icc a b).erase a = Ioc a b
state_after: no goals
tactic: simp [← coe_inj]
Theorem: LipschitzOnWith.of_dist_le'
File: Mathlib/Topology/MetricSpace/Lipschitz.lean

Proof steps:
state_before: α : Type u
β : Type v
γ : Type w
ι : Type x
inst✝² : PseudoMetricSpace α
inst✝¹ : PseudoMetricSpace β
inst✝ : PseudoMetricSpace γ
K✝ : ℝ≥0
s : Set α
f : α → β
K : ℝ
h : ∀ x ∈ s, ∀ y ∈ s, dist (f x) (f y) ≤ K * dist x y
x : α
hx : x ∈ s
y : α
hy : y ∈ s
⊢ K * dist x y ≤ ↑K.toNNReal * dist x y
state_after: case h
α : Type u
β : Type v
γ : Type w
ι : Type x
inst✝² : PseudoMetricSpace α
inst✝¹ : PseudoMetricSpace β
inst✝ : PseudoMetricSpace γ
K✝ : ℝ≥0
s : Set α
f : α → β
K : ℝ
h : ∀ x ∈ s, ∀ y ∈ s, dist (f x) (f y) ≤ K * dist x y
x : α
hx : x ∈ s
y : α
hy : y ∈ s
⊢ K ≤ ↑K.toNNReal
tactic: gcongr
state_before: case h
α : Type u
β : Type v
γ : Type w
ι : Type x
inst✝² : PseudoMetricSpace α
inst✝¹ : PseudoMetricSpace β
inst✝ : PseudoMetricSpace γ
K✝ : ℝ≥0
s : Set α
f : α → β
K : ℝ
h : ∀ x ∈ s, ∀ y ∈ s, dist (f x) (f y) ≤ K * dist x y
x : α
hx : x ∈ s
y : α
hy : y ∈ s
⊢ K ≤ ↑K.toNNReal
state_after: no goals
tactic: apply Real.le_coe_toNNReal
Theorem: MonoidHom.cancel_left
File: Mathlib/Algebra/Group/Hom/Defs.lean

Proof steps:
state_before: ι : Type u_1
α : Type u_2
β : Type u_3
M : Type u_4
N : Type u_5
P : Type u_6
G : Type u_7
H : Type u_8
F : Type u_9
inst✝² : MulOneClass M
inst✝¹ : MulOneClass N
inst✝ : MulOneClass P
g : N →* P
f₁ f₂ : M →* N
hg : Function.Injective ⇑g
h : g.comp f₁ = g.comp f₂
x : M
⊢ g (f₁ x) = g (f₂ x)
state_after: no goals
tactic: rw [← MonoidHom.comp_apply, h, MonoidHom.comp_apply]
Theorem: Set.exists_ne_of_one_lt_ncard
File: Mathlib/Data/Set/Card.lean

Proof steps:
state_before: α : Type u_1
β : Type u_2
s t : Set α
f : α → β
hs : 1 < s.ncard
a : α
⊢ ∃ b ∈ s, b ≠ a
state_after: α : Type u_1
β : Type u_2
s t : Set α
f : α → β
hs : 1 < s.ncard
a : α
hsf : s.Finite
⊢ ∃ b ∈ s, b ≠ a
tactic: have hsf := finite_of_ncard_ne_zero (zero_lt_one.trans hs).ne.symm
state_before: α : Type u_1
β : Type u_2
s t : Set α
f : α → β
hs : 1 < s.ncard
a : α
hsf : s.Finite
⊢ ∃ b ∈ s, b ≠ a
state_after: α : Type u_1
β : Type u_2
s t : Set α
f : α → β
a : α
hsf : s.Finite
hs : 1 < hsf.toFinset.card
⊢ ∃ b ∈ s, b ≠ a
tactic: rw [ncard_eq_toFinset_card _ hsf] at hs
state_before: α : Type u_1
β : Type u_2
s t : Set α
f : α → β
a : α
hsf : s.Finite
hs : 1 < hsf.toFinset.card
⊢ ∃ b ∈ s, b ≠ a
state_after: no goals
tactic: simpa only [Finite.mem_toFinset] using Finset.exists_ne_of_one_lt_card hs a
Theorem: SetTheory.PGame.lf_zero_le
File: Mathlib/SetTheory/Game/PGame.lean

Proof steps:
state_before: xl xr : Type u
x : PGame
⊢ x ⧏ 0 ↔ ∃ j, x.moveRight j ≤ 0
state_after: xl xr : Type u
x : PGame
⊢ ((∃ i, x ≤ moveLeft 0 i) ∨ ∃ j, x.moveRight j ≤ 0) ↔ ∃ j, x.moveRight j ≤ 0
tactic: rw [lf_iff_exists_le]
state_before: xl xr : Type u
x : PGame
⊢ ((∃ i, x ≤ moveLeft 0 i) ∨ ∃ j, x.moveRight j ≤ 0) ↔ ∃ j, x.moveRight j ≤ 0
state_after: no goals
tactic: simp
Theorem: FiniteDimensional.finrank_linearMap
File: Mathlib/LinearAlgebra/FreeModule/Finite/Matrix.lean

Proof steps:
state_before: R : Type u
S : Type u'
M : Type v
N : Type w
inst✝¹² : Ring R
inst✝¹¹ : Ring S
inst✝¹⁰ : AddCommGroup M
inst✝⁹ : Module R M
inst✝⁸ : Module.Free R M
inst✝⁷ : Module.Finite R M
inst✝⁶ : AddCommGroup N
inst✝⁵ : Module R N
inst✝⁴ : Module S N
inst✝³ : SMulCommClass R S N
inst✝² : StrongRankCondition R
inst✝¹ : StrongRankCondition S
inst✝ : Module.Free S N
⊢ finrank S (M →ₗ[R] N) = finrank R M * finrank S N
state_after: no goals
tactic: simp_rw [finrank, rank_linearMap, toNat_mul, toNat_lift]
Theorem: Ideal.isPrime_of_isPrime_prod_top
File: Mathlib/RingTheory/Ideal/Prod.lean

Proof steps:
state_before: R : Type u
S : Type v
inst✝¹ : Semiring R
inst✝ : Semiring S
I✝ I' : Ideal R
J J' : Ideal S
I : Ideal R
h : (I.prod ⊤).IsPrime
⊢ I.IsPrime
state_after: case ne_top'
R : Type u
S : Type v
inst✝¹ : Semiring R
inst✝ : Semiring S
I✝ I' : Ideal R
J J' : Ideal S
I : Ideal R
h : (I.prod ⊤).IsPrime
⊢ I ≠ ⊤

case mem_or_mem'
R : Type u
S : Type v
inst✝¹ : Semiring R
inst✝ : Semiring S
I✝ I' : Ideal R
J J' : Ideal S
I : Ideal R
h : (I.prod ⊤).IsPrime
⊢ ∀ {x y : R}, x * y ∈ I → x ∈ I ∨ y ∈ I
tactic: constructor
Theorem: CategoryTheory.Limits.coneOfDiagramTerminal_π_app
File: Mathlib/CategoryTheory/Limits/Shapes/Terminal.lean

Proof steps:
state_before: C : Type u₁
inst✝² : Category.{v₁, u₁} C
J : Type u
inst✝¹ : Category.{v, u} J
X : J
hX : IsTerminal X
F : J ⥤ C
inst✝ : ∀ (i j : J) (f : i ⟶ j), IsIso (F.map f)
⊢ ∀ ⦃X_1 Y : J⦄ (f : X_1 ⟶ Y),
    ((Functor.const J).obj (F.obj X)).map f ≫ (fun i => inv (F.map (hX.from i))) Y =
      (fun i => inv (F.map (hX.from i))) X_1 ≫ F.map f
state_after: C : Type u₁
inst✝² : Category.{v₁, u₁} C
J : Type u
inst✝¹ : Category.{v, u} J
X : J
hX : IsTerminal X
F : J ⥤ C
inst✝ : ∀ (i j : J) (f : i ⟶ j), IsIso (F.map f)
i j : J
f : i ⟶ j
⊢ ((Functor.const J).obj (F.obj X)).map f ≫ (fun i => inv (F.map (hX.from i))) j =
    (fun i => inv (F.map (hX.from i))) i ≫ F.map f
tactic: intro i j f
state_before: C : Type u₁
inst✝² : Category.{v₁, u₁} C
J : Type u
inst✝¹ : Category.{v, u} J
X : J
hX : IsTerminal X
F : J ⥤ C
inst✝ : ∀ (i j : J) (f : i ⟶ j), IsIso (F.map f)
i j : J
f : i ⟶ j
⊢ ((Functor.const J).obj (F.obj X)).map f ≫ (fun i => inv (F.map (hX.from i))) j =
    (fun i => inv (F.map (hX.from i))) i ≫ F.map f
state_after: C : Type u₁
inst✝² : Category.{v₁, u₁} C
J : Type u
inst✝¹ : Category.{v, u} J
X : J
hX : IsTerminal X
F : J ⥤ C
inst✝ : ∀ (i j : J) (f : i ⟶ j), IsIso (F.map f)
i j : J
f : i ⟶ j
⊢ 𝟙 (F.obj X) ≫ inv (F.map (hX.from j)) = inv (F.map (hX.from i)) ≫ F.map f
tactic: dsimp
state_before: C : Type u₁
inst✝² : Category.{v₁, u₁} C
J : Type u
inst✝¹ : Category.{v, u} J
X : J
hX : IsTerminal X
F : J ⥤ C
inst✝ : ∀ (i j : J) (f : i ⟶ j), IsIso (F.map f)
i j : J
f : i ⟶ j
⊢ 𝟙 (F.obj X) ≫ inv (F.map (hX.from j)) = inv (F.map (hX.from i)) ≫ F.map f
state_after: no goals
tactic: simp only [IsIso.eq_inv_comp, IsIso.comp_inv_eq, Category.id_comp, ← F.map_comp,
          hX.hom_ext (hX.from i) (f ≫ hX.from j)]