ruc-ai4math/mathlib_handler_benchmark_410 huggingface dataset:
Theorem: Sym2.card_subtype_diag
File: Mathlib/Data/Sym/Card.lean

Proof steps:
state_before: α : Type u_1
β : Type u_2
inst✝¹ : DecidableEq α
inst✝ : Fintype α
⊢ Fintype.card { a // a.IsDiag } = Fintype.card α
state_after: case h.e'_2
α : Type u_1
β : Type u_2
inst✝¹ : DecidableEq α
inst✝ : Fintype α
⊢ Fintype.card { a // a.IsDiag } = (image Sym2.mk univ.diag).card
tactic: convert card_image_diag (univ : Finset α)
state_before: case h.e'_2
α : Type u_1
β : Type u_2
inst✝¹ : DecidableEq α
inst✝ : Fintype α
⊢ Fintype.card { a // a.IsDiag } = (image Sym2.mk univ.diag).card
state_after: case h.e'_2.H
α : Type u_1
β : Type u_2
inst✝¹ : DecidableEq α
inst✝ : Fintype α
⊢ ∀ (x : Sym2 α), x ∈ filter IsDiag (image Sym2.mk (univ ×ˢ univ)) ↔ x.IsDiag
tactic: rw [← filter_image_mk_isDiag, Fintype.card_of_subtype]
state_before: case h.e'_2.H
α : Type u_1
β : Type u_2
inst✝¹ : DecidableEq α
inst✝ : Fintype α
⊢ ∀ (x : Sym2 α), x ∈ filter IsDiag (image Sym2.mk (univ ×ˢ univ)) ↔ x.IsDiag
state_after: case h.e'_2.H
α : Type u_1
β : Type u_2
inst✝¹ : DecidableEq α
inst✝ : Fintype α
x : Sym2 α
⊢ x ∈ filter IsDiag (image Sym2.mk (univ ×ˢ univ)) ↔ x.IsDiag
tactic: rintro x
state_before: case h.e'_2.H
α : Type u_1
β : Type u_2
inst✝¹ : DecidableEq α
inst✝ : Fintype α
x : Sym2 α
⊢ x ∈ filter IsDiag (image Sym2.mk (univ ×ˢ univ)) ↔ x.IsDiag
state_after: case h.e'_2.H
α : Type u_1
β : Type u_2
inst✝¹ : DecidableEq α
inst✝ : Fintype α
x : Sym2 α
⊢ (∃ a ∈ univ, Sym2.mk a = x) ∧ x.IsDiag ↔ x.IsDiag
tactic: rw [mem_filter, univ_product_univ, mem_image]
state_before: case h.e'_2.H
α : Type u_1
β : Type u_2
inst✝¹ : DecidableEq α
inst✝ : Fintype α
x : Sym2 α
⊢ (∃ a ∈ univ, Sym2.mk a = x) ∧ x.IsDiag ↔ x.IsDiag
state_after: case h.e'_2.H.intro
α : Type u_1
β : Type u_2
inst✝¹ : DecidableEq α
inst✝ : Fintype α
x : Sym2 α
a : α × α
ha : Quot.mk (Rel α) a = x
⊢ (∃ a ∈ univ, Sym2.mk a = x) ∧ x.IsDiag ↔ x.IsDiag
tactic: obtain ⟨a, ha⟩ := Quot.exists_rep x
state_before: case h.e'_2.H.intro
α : Type u_1
β : Type u_2
inst✝¹ : DecidableEq α
inst✝ : Fintype α
x : Sym2 α
a : α × α
ha : Quot.mk (Rel α) a = x
⊢ (∃ a ∈ univ, Sym2.mk a = x) ∧ x.IsDiag ↔ x.IsDiag
state_after: no goals
tactic: exact and_iff_right ⟨a, mem_univ _, ha⟩
Theorem: RelEmbedding.inter_preimage_minimals_eq_of_subset
File: Mathlib/Order/Minimal.lean

Proof steps:
state_before: α : Type u_1
β : Type u_2
r✝ r₁ r₂ : α → α → Prop
s✝ t : Set α
a b x✝ : α
f✝ : α → β
r : α → α → Prop
s : β → β → Prop
y : Set β
x : Set α
f : r ↪r s
h : y ⊆ ⇑f '' x
⊢ x ∩ ⇑f ⁻¹' minimals s y = minimals r (x ∩ ⇑f ⁻¹' y)
state_after: α : Type u_1
β : Type u_2
r✝ r₁ r₂ : α → α → Prop
s✝ t : Set α
a b x✝ : α
f✝ : α → β
r : α → α → Prop
s : β → β → Prop
y : Set β
x : Set α
f : r ↪r s
h : y ⊆ ⇑f '' x
⊢ ∀ ⦃a a' : α⦄, a ∈ x → a' ∈ x → (r a a' ↔ s (f a) (f a'))
tactic: rw [inter_preimage_minimals_eq_of_rel_iff_rel_on_of_subset _ h]
state_before: α : Type u_1
β : Type u_2
r✝ r₁ r₂ : α → α → Prop
s✝ t : Set α
a b x✝ : α
f✝ : α → β
r : α → α → Prop
s : β → β → Prop
y : Set β
x : Set α
f : r ↪r s
h : y ⊆ ⇑f '' x
⊢ ∀ ⦃a a' : α⦄, a ∈ x → a' ∈ x → (r a a' ↔ s (f a) (f a'))
state_after: no goals
tactic: simp [f.map_rel_iff]
Theorem: ModelWithCorners.prod_source
File: Mathlib/Geometry/Manifold/SmoothManifoldWithCorners.lean

Proof steps:
state_before: 𝕜 : Type u
inst✝⁶ : NontriviallyNormedField 𝕜
E : Type v
inst✝⁵ : NormedAddCommGroup E
inst✝⁴ : NormedSpace 𝕜 E
H : Type w
inst✝³ : TopologicalSpace H
I : ModelWithCorners 𝕜 E H
E' : Type v'
inst✝² : NormedAddCommGroup E'
inst✝¹ : NormedSpace 𝕜 E'
H' : Type w'
inst✝ : TopologicalSpace H'
I' : ModelWithCorners 𝕜 E' H'
⊢ { toFun := fun x => (↑I x.1, ↑I' x.2), invFun := fun x => (↑I.symm x.1, ↑I'.symm x.2),
        source := {x | x.1 ∈ I.source ∧ x.2 ∈ I'.source}, target := __src✝.target, map_source' := ⋯, map_target' := ⋯,
        left_inv' := ⋯, right_inv' := ⋯ }.source =
    univ
state_after: no goals
tactic: simp only [setOf_true, mfld_simps]
Theorem: IsCoprime.add_mul_left_right
File: Mathlib/RingTheory/Coprime/Basic.lean

Proof steps:
state_before: R : Type u
inst✝ : CommRing R
x y : R
h : IsCoprime x y
z : R
⊢ IsCoprime x (y + x * z)
state_after: R : Type u
inst✝ : CommRing R
x y : R
h : IsCoprime x y
z : R
⊢ IsCoprime (y + x * z) x
tactic: rw [isCoprime_comm]
state_before: R : Type u
inst✝ : CommRing R
x y : R
h : IsCoprime x y
z : R
⊢ IsCoprime (y + x * z) x
state_after: no goals
tactic: exact h.symm.add_mul_left_left z
Theorem: Submodule.mem_annihilator_span
File: Mathlib/RingTheory/Ideal/Operations.lean

Proof steps:
state_before: R : Type u
M : Type v
M' : Type u_1
F : Type u_2
G : Type u_3
inst✝⁴ : CommSemiring R
inst✝³ : AddCommMonoid M
inst✝² : Module R M
inst✝¹ : AddCommMonoid M'
inst✝ : Module R M'
I J : Ideal R
N P : Submodule R M
s : Set M
r : R
⊢ r ∈ (span R s).annihilator ↔ ∀ (n : ↑s), r • ↑n = 0
state_after: R : Type u
M : Type v
M' : Type u_1
F : Type u_2
G : Type u_3
inst✝⁴ : CommSemiring R
inst✝³ : AddCommMonoid M
inst✝² : Module R M
inst✝¹ : AddCommMonoid M'
inst✝ : Module R M'
I J : Ideal R
N P : Submodule R M
s : Set M
r : R
⊢ (∀ n ∈ span R s, r • n = 0) ↔ ∀ (n : ↑s), r • ↑n = 0
tactic: rw [Submodule.mem_annihilator]
state_before: R : Type u
M : Type v
M' : Type u_1
F : Type u_2
G : Type u_3
inst✝⁴ : CommSemiring R
inst✝³ : AddCommMonoid M
inst✝² : Module R M
inst✝¹ : AddCommMonoid M'
inst✝ : Module R M'
I J : Ideal R
N P : Submodule R M
s : Set M
r : R
⊢ (∀ n ∈ span R s, r • n = 0) ↔ ∀ (n : ↑s), r • ↑n = 0
state_after: case mp
R : Type u
M : Type v
M' : Type u_1
F : Type u_2
G : Type u_3
inst✝⁴ : CommSemiring R
inst✝³ : AddCommMonoid M
inst✝² : Module R M
inst✝¹ : AddCommMonoid M'
inst✝ : Module R M'
I J : Ideal R
N P : Submodule R M
s : Set M
r : R
⊢ (∀ n ∈ span R s, r • n = 0) → ∀ (n : ↑s), r • ↑n = 0

case mpr
R : Type u
M : Type v
M' : Type u_1
F : Type u_2
G : Type u_3
inst✝⁴ : CommSemiring R
inst✝³ : AddCommMonoid M
inst✝² : Module R M
inst✝¹ : AddCommMonoid M'
inst✝ : Module R M'
I J : Ideal R
N P : Submodule R M
s : Set M
r : R
⊢ (∀ (n : ↑s), r • ↑n = 0) → ∀ n ∈ span R s, r • n = 0
tactic: constructor
Theorem: CategoryTheory.ShortComplex.op_X₃
File: Mathlib/Algebra/Homology/ShortComplex/Basic.lean

Proof steps:
state_before: C : Type u_1
D : Type u_2
inst✝³ : Category.{?u.58352, u_1} C
inst✝² : Category.{?u.58356, u_2} D
inst✝¹ : HasZeroMorphisms C
S S₁ S₂ S₃ : ShortComplex C
inst✝ : HasZeroMorphisms D
⊢ S.g.op ≫ S.f.op = 0
state_after: C : Type u_1
D : Type u_2
inst✝³ : Category.{?u.58352, u_1} C
inst✝² : Category.{?u.58356, u_2} D
inst✝¹ : HasZeroMorphisms C
S S₁ S₂ S₃ : ShortComplex C
inst✝ : HasZeroMorphisms D
⊢ Quiver.Hom.op 0 = 0
tactic: simp only [← op_comp, S.zero]
state_before: C : Type u_1
D : Type u_2
inst✝³ : Category.{?u.58352, u_1} C
inst✝² : Category.{?u.58356, u_2} D
inst✝¹ : HasZeroMorphisms C
S S₁ S₂ S₃ : ShortComplex C
inst✝ : HasZeroMorphisms D
⊢ Quiver.Hom.op 0 = 0
state_after: no goals
tactic: rfl
Theorem: AlgebraicGeometry.LocallyRingedSpace.IsOpenImmersion.invApp_app
File: Mathlib/Geometry/RingedSpace/OpenImmersion.lean

Proof steps:
state_before: C : Type u
inst✝ : Category.{v, u} C
X Y : LocallyRingedSpace
f : X ⟶ Y
H : IsOpenImmersion f
U : Opens ↑X.toTopCat
⊢ op U = (Opens.map f.val.base).op.obj (op ((opensFunctor f).obj U))
state_after: no goals
tactic: simp [Opens.map, Set.preimage_image_eq _ H.base_open.inj]
Theorem: Int.alternating_sum_range_choose_of_ne
File: Mathlib/Data/Nat/Choose/Sum.lean

Proof steps:
state_before: R : Type u_1
n : ℕ
h0 : n ≠ 0
⊢ ∑ m ∈ range (n + 1), (-1) ^ m * ↑(n.choose m) = 0
state_after: no goals
tactic: rw [Int.alternating_sum_range_choose, if_neg h0]
Theorem: Complex.logDeriv_cos
File: Mathlib/Analysis/SpecialFunctions/Trigonometric/Deriv.lean

Proof steps:
state_before: E : Type u_1
inst✝¹ : NormedAddCommGroup E
inst✝ : NormedSpace ℝ E
f : E → ℝ
f' : E →L[ℝ] ℝ
x : E
s : Set E
⊢ logDeriv cos = -tan
state_after: case h
E : Type u_1
inst✝¹ : NormedAddCommGroup E
inst✝ : NormedSpace ℝ E
f : E → ℝ
f' : E →L[ℝ] ℝ
x : E
s : Set E
x✝ : ℂ
⊢ logDeriv cos x✝ = (-tan) x✝
tactic: ext
state_before: case h
E : Type u_1
inst✝¹ : NormedAddCommGroup E
inst✝ : NormedSpace ℝ E
f : E → ℝ
f' : E →L[ℝ] ℝ
x : E
s : Set E
x✝ : ℂ
⊢ logDeriv cos x✝ = (-tan) x✝
state_after: no goals
tactic: rw [logDeriv, Complex.deriv_cos', Pi.div_apply, Pi.neg_apply, Complex.tan, neg_div]
Theorem: CategoryTheory.isPullback_of_cofan_isVanKampen
File: Mathlib/CategoryTheory/Limits/VanKampen.lean

Proof steps:
state_before: J : Type v'
inst✝⁵ : Category.{u', v'} J
C : Type u
inst✝⁴ : Category.{v, u} C
K : Type u_1
inst✝³ : Category.{?u.324351, u_1} K
D : Type u_2
inst✝² : Category.{?u.324358, u_2} D
inst✝¹ : HasInitial C
ι : Type u_3
X : ι → C
c : Cofan X
hc : IsVanKampenColimit c
i j : ι
inst✝ : DecidableEq ι
⊢ IsPullback (if h : j = i then eqToHom ⋯ else eqToHom ⋯ ≫ initial.to (X i))
    (if h : j = i then eqToHom ⋯ else eqToHom ⋯ ≫ initial.to (X j)) (c.inj i) (c.inj j)
state_after: case refine_1
J : Type v'
inst✝⁵ : Category.{u', v'} J
C : Type u
inst✝⁴ : Category.{v, u} C
K : Type u_1
inst✝³ : Category.{?u.324351, u_1} K
D : Type u_2
inst✝² : Category.{?u.324358, u_2} D
inst✝¹ : HasInitial C
ι : Type u_3
X : ι → C
c : Cofan X
hc : IsVanKampenColimit c
i j : ι
inst✝ : DecidableEq ι
⊢ (Discrete.natTrans fun k => if h : k.as = i then eqToHom ⋯ else eqToHom ⋯ ≫ initial.to ((Discrete.functor X).obj k)) ≫
      c.ι =
    (Cofan.mk (X i) fun k => if h : k = i then eqToHom ⋯ else eqToHom ⋯ ≫ initial.to (X i)).ι ≫
      (Functor.const (Discrete ι)).map (c.inj i)

case refine_2
J : Type v'
inst✝⁵ : Category.{u', v'} J
C : Type u
inst✝⁴ : Category.{v, u} C
K : Type u_1
inst✝³ : Category.{?u.324351, u_1} K
D : Type u_2
inst✝² : Category.{?u.324358, u_2} D
inst✝¹ : HasInitial C
ι : Type u_3
X : ι → C
c : Cofan X
hc : IsVanKampenColimit c
i j : ι
inst✝ : DecidableEq ι
⊢ IsColimit (Cofan.mk (X i) fun k => if h : k = i then eqToHom ⋯ else eqToHom ⋯ ≫ initial.to (X i))
tactic: refine (hc (Cofan.mk (X i) (f := fun k ↦ if k = i then X i else ⊥_ C)
    (fun k ↦ if h : k = i then (eqToHom <| if_pos h) else (eqToHom <| if_neg h) ≫ initial.to _))
    (Discrete.natTrans (fun k ↦ if h : k.1 = i then (eqToHom <| (if_pos h).trans
      (congr_arg X h.symm)) else (eqToHom <| if_neg h) ≫ initial.to _))
    (c.inj i) ?_ (NatTrans.equifibered_of_discrete _)).mp ⟨?_⟩ ⟨j⟩
Theorem: Commute.div_add_div
File: Mathlib/Algebra/Field/Basic.lean

Proof steps:
state_before: α : Type u_1
β : Type u_2
K : Type u_3
inst✝ : DivisionSemiring α
a b c d : α
hbc : Commute b c
hbd : Commute b d
hb : b ≠ 0
hd : d ≠ 0
⊢ a / b + c / d = (a * d + b * c) / (b * d)
state_after: no goals
tactic: rw [add_div, mul_div_mul_right _ b hd, hbc.eq, hbd.eq, mul_div_mul_right c d hb]
Theorem: LinearIsometryEquiv.comp_fderiv'
File: Mathlib/Analysis/Calculus/FDeriv/Equiv.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
G : Type u_4
inst✝³ : NormedAddCommGroup G
inst✝² : NormedSpace 𝕜 G
G' : Type u_5
inst✝¹ : NormedAddCommGroup G'
inst✝ : NormedSpace 𝕜 G'
f✝ f₀ f₁ g : E → F
f' f₀' f₁' g' e : E →L[𝕜] F
x : E
s t : Set E
L L₁ L₂ : Filter E
iso : E ≃ₗᵢ[𝕜] F
f : G → E
⊢ fderiv 𝕜 (⇑iso ∘ f) = fun x =>
    (↑{ toLinearEquiv := iso.toLinearEquiv, continuous_toFun := ⋯, continuous_invFun := ⋯ }).comp (fderiv 𝕜 f x)
state_after: case h
𝕜 : 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
G : Type u_4
inst✝³ : NormedAddCommGroup G
inst✝² : NormedSpace 𝕜 G
G' : Type u_5
inst✝¹ : NormedAddCommGroup G'
inst✝ : NormedSpace 𝕜 G'
f✝ f₀ f₁ g : E → F
f' f₀' f₁' g' e : E →L[𝕜] F
x✝ : E
s t : Set E
L L₁ L₂ : Filter E
iso : E ≃ₗᵢ[𝕜] F
f : G → E
x : G
⊢ fderiv 𝕜 (⇑iso ∘ f) x =
    (↑{ toLinearEquiv := iso.toLinearEquiv, continuous_toFun := ⋯, continuous_invFun := ⋯ }).comp (fderiv 𝕜 f x)
tactic: ext x : 1
state_before: case h
𝕜 : 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
G : Type u_4
inst✝³ : NormedAddCommGroup G
inst✝² : NormedSpace 𝕜 G
G' : Type u_5
inst✝¹ : NormedAddCommGroup G'
inst✝ : NormedSpace 𝕜 G'
f✝ f₀ f₁ g : E → F
f' f₀' f₁' g' e : E →L[𝕜] F
x✝ : E
s t : Set E
L L₁ L₂ : Filter E
iso : E ≃ₗᵢ[𝕜] F
f : G → E
x : G
⊢ fderiv 𝕜 (⇑iso ∘ f) x =
    (↑{ toLinearEquiv := iso.toLinearEquiv, continuous_toFun := ⋯, continuous_invFun := ⋯ }).comp (fderiv 𝕜 f x)
state_after: no goals
tactic: exact LinearIsometryEquiv.comp_fderiv iso
Theorem: Mathlib.Vector.map_snoc
File: Mathlib/Data/Vector/Snoc.lean

Proof steps:
state_before: α : Type u_2
n : ℕ
xs : Vector α n
α✝ : Type u_1
f : α → α✝
x : α
⊢ map f (xs.snoc x) = (map f xs).snoc (f x)
state_after: no goals
tactic: induction xs <;> simp_all
Theorem: Set.le_edist_of_le_infsep
File: Mathlib/Topology/MetricSpace/Infsep.lean

Proof steps:
state_before: α : Type u_1
β : Type u_2
inst✝ : PseudoMetricSpace α
x✝ y✝ z : α
s t : Set α
d : ℝ
x : α
hx : x ∈ s
y : α
hy : y ∈ s
hxy : x ≠ y
hd : d ≤ s.infsep
⊢ d ≤ dist x y
state_after: case pos
α : Type u_1
β : Type u_2
inst✝ : PseudoMetricSpace α
x✝ y✝ z : α
s t : Set α
d : ℝ
x : α
hx : x ∈ s
y : α
hy : y ∈ s
hxy : x ≠ y
hd : d ≤ s.infsep
hs : s.Nontrivial
⊢ d ≤ dist x y

case neg
α : Type u_1
β : Type u_2
inst✝ : PseudoMetricSpace α
x✝ y✝ z : α
s t : Set α
d : ℝ
x : α
hx : x ∈ s
y : α
hy : y ∈ s
hxy : x ≠ y
hd : d ≤ s.infsep
hs : ¬s.Nontrivial
⊢ d ≤ dist x y
tactic: by_cases hs : s.Nontrivial
Theorem: Matrix.blockDiagonal_conjTranspose
File: Mathlib/Data/Matrix/Block.lean

Proof steps:
state_before: l : Type u_1
m : Type u_2
n : Type u_3
o : Type u_4
p : Type u_5
q : Type u_6
m' : o → Type u_7
n' : o → Type u_8
p' : o → Type u_9
R : Type u_10
S : Type u_11
α✝ : Type u_12
β : Type u_13
inst✝⁴ : DecidableEq o
inst✝³ : Zero α✝
inst✝² : Zero β
α : Type u_14
inst✝¹ : AddMonoid α
inst✝ : StarAddMonoid α
M : o → Matrix m n α
⊢ (blockDiagonal M)ᴴ = blockDiagonal fun k => (M k)ᴴ
state_after: l : Type u_1
m : Type u_2
n : Type u_3
o : Type u_4
p : Type u_5
q : Type u_6
m' : o → Type u_7
n' : o → Type u_8
p' : o → Type u_9
R : Type u_10
S : Type u_11
α✝ : Type u_12
β : Type u_13
inst✝⁴ : DecidableEq o
inst✝³ : Zero α✝
inst✝² : Zero β
α : Type u_14
inst✝¹ : AddMonoid α
inst✝ : StarAddMonoid α
M : o → Matrix m n α
⊢ (blockDiagonal fun k => (M k)ᵀ).map star = blockDiagonal fun k => (M k)ᵀ.map star
tactic: simp only [conjTranspose, blockDiagonal_transpose]
state_before: l : Type u_1
m : Type u_2
n : Type u_3
o : Type u_4
p : Type u_5
q : Type u_6
m' : o → Type u_7
n' : o → Type u_8
p' : o → Type u_9
R : Type u_10
S : Type u_11
α✝ : Type u_12
β : Type u_13
inst✝⁴ : DecidableEq o
inst✝³ : Zero α✝
inst✝² : Zero β
α : Type u_14
inst✝¹ : AddMonoid α
inst✝ : StarAddMonoid α
M : o → Matrix m n α
⊢ (blockDiagonal fun k => (M k)ᵀ).map star = blockDiagonal fun k => (M k)ᵀ.map star
state_after: no goals
tactic: rw [blockDiagonal_map _ star (star_zero α)]
Theorem: LinearMap.trace_eq_matrix_trace_of_finset
File: Mathlib/LinearAlgebra/Trace.lean

Proof steps:
state_before: R : Type u
inst✝⁶ : CommSemiring R
M : Type v
inst✝⁵ : AddCommMonoid M
inst✝⁴ : Module R M
ι : Type w
inst✝³ : DecidableEq ι
inst✝² : Fintype ι
κ : Type u_1
inst✝¹ : DecidableEq κ
inst✝ : Fintype κ
b✝ : Basis ι R M
c : Basis κ R M
s : Finset M
b : Basis { x // x ∈ s } R M
f : M →ₗ[R] M
⊢ (trace R M) f = ((toMatrix b b) f).trace
state_after: R : Type u
inst✝⁶ : CommSemiring R
M : Type v
inst✝⁵ : AddCommMonoid M
inst✝⁴ : Module R M
ι : Type w
inst✝³ : DecidableEq ι
inst✝² : Fintype ι
κ : Type u_1
inst✝¹ : DecidableEq κ
inst✝ : Fintype κ
b✝ : Basis ι R M
c : Basis κ R M
s : Finset M
b : Basis { x // x ∈ s } R M
f : M →ₗ[R] M
this : ∃ s, Nonempty (Basis { x // x ∈ s } R M)
⊢ (trace R M) f = ((toMatrix b b) f).trace
tactic: have : ∃ s : Finset M, Nonempty (Basis s R M) := ⟨s, ⟨b⟩⟩
state_before: R : Type u
inst✝⁶ : CommSemiring R
M : Type v
inst✝⁵ : AddCommMonoid M
inst✝⁴ : Module R M
ι : Type w
inst✝³ : DecidableEq ι
inst✝² : Fintype ι
κ : Type u_1
inst✝¹ : DecidableEq κ
inst✝ : Fintype κ
b✝ : Basis ι R M
c : Basis κ R M
s : Finset M
b : Basis { x // x ∈ s } R M
f : M →ₗ[R] M
this : ∃ s, Nonempty (Basis { x // x ∈ s } R M)
⊢ (trace R M) f = ((toMatrix b b) f).trace
state_after: R : Type u
inst✝⁶ : CommSemiring R
M : Type v
inst✝⁵ : AddCommMonoid M
inst✝⁴ : Module R M
ι : Type w
inst✝³ : DecidableEq ι
inst✝² : Fintype ι
κ : Type u_1
inst✝¹ : DecidableEq κ
inst✝ : Fintype κ
b✝ : Basis ι R M
c : Basis κ R M
s : Finset M
b : Basis { x // x ∈ s } R M
f : M →ₗ[R] M
this : ∃ s, Nonempty (Basis { x // x ∈ s } R M)
⊢ (traceAux R ⋯.some) f = (traceAux R b) f
tactic: rw [trace, dif_pos this, ← traceAux_def]
state_before: R : Type u
inst✝⁶ : CommSemiring R
M : Type v
inst✝⁵ : AddCommMonoid M
inst✝⁴ : Module R M
ι : Type w
inst✝³ : DecidableEq ι
inst✝² : Fintype ι
κ : Type u_1
inst✝¹ : DecidableEq κ
inst✝ : Fintype κ
b✝ : Basis ι R M
c : Basis κ R M
s : Finset M
b : Basis { x // x ∈ s } R M
f : M →ₗ[R] M
this : ∃ s, Nonempty (Basis { x // x ∈ s } R M)
⊢ (traceAux R ⋯.some) f = (traceAux R b) f
state_after: case e_a
R : Type u
inst✝⁶ : CommSemiring R
M : Type v
inst✝⁵ : AddCommMonoid M
inst✝⁴ : Module R M
ι : Type w
inst✝³ : DecidableEq ι
inst✝² : Fintype ι
κ : Type u_1
inst✝¹ : DecidableEq κ
inst✝ : Fintype κ
b✝ : Basis ι R M
c : Basis κ R M
s : Finset M
b : Basis { x // x ∈ s } R M
f : M →ₗ[R] M
this : ∃ s, Nonempty (Basis { x // x ∈ s } R M)
⊢ traceAux R ⋯.some = traceAux R b
tactic: congr 1
state_before: case e_a
R : Type u
inst✝⁶ : CommSemiring R
M : Type v
inst✝⁵ : AddCommMonoid M
inst✝⁴ : Module R M
ι : Type w
inst✝³ : DecidableEq ι
inst✝² : Fintype ι
κ : Type u_1
inst✝¹ : DecidableEq κ
inst✝ : Fintype κ
b✝ : Basis ι R M
c : Basis κ R M
s : Finset M
b : Basis { x // x ∈ s } R M
f : M →ₗ[R] M
this : ∃ s, Nonempty (Basis { x // x ∈ s } R M)
⊢ traceAux R ⋯.some = traceAux R b
state_after: no goals
tactic: apply traceAux_eq
Theorem: inf_sdiff
File: Mathlib/Order/BooleanAlgebra.lean

Proof steps:
state_before: α : Type u
β : Type u_1
w x y z : α
inst✝ : GeneralizedBooleanAlgebra α
⊢ x ⊓ y ⊓ z ⊔ x \ z ⊓ y \ z = (x ⊓ y ⊓ z ⊔ x \ z) ⊓ (x ⊓ y ⊓ z ⊔ y \ z)
state_after: no goals
tactic: rw [sup_inf_left]
state_before: α : Type u
β : Type u_1
w x y z : α
inst✝ : GeneralizedBooleanAlgebra α
⊢ (x ⊓ y ⊓ z ⊔ x \ z) ⊓ (x ⊓ y ⊓ z ⊔ y \ z) = (x ⊓ y ⊓ (z ⊔ x) ⊔ x \ z) ⊓ (x ⊓ y ⊓ z ⊔ y \ z)
state_after: no goals
tactic: rw [sup_inf_right, sup_sdiff_self_right, inf_sup_right, inf_sdiff_sup_right]
state_before: α : Type u
β : Type u_1
w x y z : α
inst✝ : GeneralizedBooleanAlgebra α
⊢ (x ⊓ y ⊓ (z ⊔ x) ⊔ x \ z) ⊓ (x ⊓ y ⊓ z ⊔ y \ z) = (y ⊓ (x ⊓ (x ⊔ z)) ⊔ x \ z) ⊓ (x ⊓ y ⊓ z ⊔ y \ z)
state_after: no goals
tactic: ac_rfl
state_before: α : Type u
β : Type u_1
w x y z : α
inst✝ : GeneralizedBooleanAlgebra α
⊢ (y ⊓ (x ⊓ (x ⊔ z)) ⊔ x \ z) ⊓ (x ⊓ y ⊓ z ⊔ y \ z) = (y ⊓ x ⊔ x \ z) ⊓ (x ⊓ y ⊔ y \ z)
state_after: no goals
tactic: rw [inf_sup_self, sup_inf_inf_sdiff]
state_before: α : Type u
β : Type u_1
w x y z : α
inst✝ : GeneralizedBooleanAlgebra α
⊢ (y ⊓ x ⊔ x \ z) ⊓ (x ⊓ y ⊔ y \ z) = x ⊓ y ⊔ x \ z ⊓ y \ z
state_after: no goals
tactic: rw [inf_comm y, sup_inf_left]
state_before: α : Type u
β : Type u_1
w x y z : α
inst✝ : GeneralizedBooleanAlgebra α
⊢ x ⊓ y ⊓ z ⊓ (x \ z ⊓ y \ z) = x ⊓ y ⊓ (z ⊓ x \ z) ⊓ y \ z
state_after: no goals
tactic: ac_rfl
state_before: α : Type u
β : Type u_1
w x y z : α
inst✝ : GeneralizedBooleanAlgebra α
⊢ x ⊓ y ⊓ (z ⊓ x \ z) ⊓ y \ z = ⊥
state_after: no goals
tactic: rw [inf_sdiff_self_right, inf_bot_eq, bot_inf_eq]
Theorem: ENNReal.rpow_add_rpow_le
File: Mathlib/Analysis/MeanInequalitiesPow.lean

Proof steps:
state_before: ι : Type u
s : Finset ι
p q : ℝ
a b : ℝ≥0∞
hp_pos : 0 < p
hpq : p ≤ q
⊢ (a ^ q + b ^ q) ^ (1 / q) ≤ (a ^ p + b ^ p) ^ (1 / p)
state_after: ι : Type u
s : Finset ι
p q : ℝ
a b : ℝ≥0∞
hp_pos : 0 < p
hpq : p ≤ q
h_rpow : ∀ (a : ℝ≥0∞), a ^ q = (a ^ p) ^ (q / p)
⊢ (a ^ q + b ^ q) ^ (1 / q) ≤ (a ^ p + b ^ p) ^ (1 / p)
tactic: have h_rpow : ∀ a : ℝ≥0∞, a ^ q = (a ^ p) ^ (q / p) := fun a => by
    rw [← ENNReal.rpow_mul, mul_div_cancel₀ _ hp_pos.ne']
state_before: ι : Type u
s : Finset ι
p q : ℝ
a b : ℝ≥0∞
hp_pos : 0 < p
hpq : p ≤ q
h_rpow : ∀ (a : ℝ≥0∞), a ^ q = (a ^ p) ^ (q / p)
⊢ (a ^ q + b ^ q) ^ (1 / q) ≤ (a ^ p + b ^ p) ^ (1 / p)
state_after: ι : Type u
s : Finset ι
p q : ℝ
a b : ℝ≥0∞
hp_pos : 0 < p
hpq : p ≤ q
h_rpow : ∀ (a : ℝ≥0∞), a ^ q = (a ^ p) ^ (q / p)
h_rpow_add_rpow_le_add : ((a ^ p) ^ (q / p) + (b ^ p) ^ (q / p)) ^ (1 / (q / p)) ≤ a ^ p + b ^ p
⊢ (a ^ q + b ^ q) ^ (1 / q) ≤ (a ^ p + b ^ p) ^ (1 / p)
tactic: have h_rpow_add_rpow_le_add :
    ((a ^ p) ^ (q / p) + (b ^ p) ^ (q / p)) ^ (1 / (q / p)) ≤ a ^ p + b ^ p := by
    refine rpow_add_rpow_le_add (a ^ p) (b ^ p) ?_
    rwa [one_le_div hp_pos]
state_before: ι : Type u
s : Finset ι
p q : ℝ
a b : ℝ≥0∞
hp_pos : 0 < p
hpq : p ≤ q
h_rpow : ∀ (a : ℝ≥0∞), a ^ q = (a ^ p) ^ (q / p)
h_rpow_add_rpow_le_add : ((a ^ p) ^ (q / p) + (b ^ p) ^ (q / p)) ^ (1 / (q / p)) ≤ a ^ p + b ^ p
⊢ (a ^ q + b ^ q) ^ (1 / q) ≤ (a ^ p + b ^ p) ^ (1 / p)
state_after: ι : Type u
s : Finset ι
p q : ℝ
a b : ℝ≥0∞
hp_pos : 0 < p
hpq : p ≤ q
h_rpow : ∀ (a : ℝ≥0∞), a ^ q = (a ^ p) ^ (q / p)
h_rpow_add_rpow_le_add : ((a ^ p) ^ (q / p) + (b ^ p) ^ (q / p)) ^ (1 / (q / p)) ≤ a ^ p + b ^ p
⊢ ((a ^ p) ^ (q / p) + (b ^ p) ^ (q / p)) ^ (p / q) ≤ a ^ p + b ^ p
tactic: rw [h_rpow a, h_rpow b, one_div p, ENNReal.le_rpow_inv_iff hp_pos, ← ENNReal.rpow_mul, mul_comm,
    mul_one_div]
state_before: ι : Type u
s : Finset ι
p q : ℝ
a b : ℝ≥0∞
hp_pos : 0 < p
hpq : p ≤ q
h_rpow : ∀ (a : ℝ≥0∞), a ^ q = (a ^ p) ^ (q / p)
h_rpow_add_rpow_le_add : ((a ^ p) ^ (q / p) + (b ^ p) ^ (q / p)) ^ (1 / (q / p)) ≤ a ^ p + b ^ p
⊢ ((a ^ p) ^ (q / p) + (b ^ p) ^ (q / p)) ^ (p / q) ≤ a ^ p + b ^ p
state_after: no goals
tactic: rwa [one_div_div] at h_rpow_add_rpow_le_add
Theorem: Equiv.Perm.card_support_swap
File: Mathlib/GroupTheory/Perm/Support.lean

Proof steps:
state_before: α : Type u_1
inst✝¹ : DecidableEq α
inst✝ : Fintype α
f g : Perm α
x y : α
hxy : x ≠ y
⊢ (x ::ₘ y ::ₘ 0).Nodup
state_after: no goals
tactic: simp [hxy]
state_before: α : Type u_1
inst✝¹ : DecidableEq α
inst✝ : Fintype α
f g : Perm α
x y : α
hxy : x ≠ y
⊢ (swap x y).support = { val := x ::ₘ y ::ₘ 0, nodup := ⋯ }
state_after: no goals
tactic: simp [support_swap hxy, *, Finset.ext_iff]
Theorem: Set.InjOn.exists_subset_injOn_subset_range_eq
File: Mathlib/Data/Set/Function.lean

Proof steps:
state_before: α : Type u_1
β : Type u_2
γ : Type u_3
ι : Sort u_4
π : α → Type u_5
s s₁ s₂ : Set α
t : Set β
f : α → β
r : Set α
hinj : InjOn f r
hrs : r ⊆ s
⊢ ∃ u, r ⊆ u ∧ u ⊆ s ∧ f '' u = f '' s ∧ InjOn f u
state_after: case intro.intro.intro
α : Type u_1
β : Type u_2
γ : Type u_3
ι : Sort u_4
π : α → Type u_5
s s₁ s₂ : Set α
t : Set β
f : α → β
r : Set α
hinj : InjOn f r
hrs : r ⊆ s
u : Set α
hru : r ⊆ u
hus : u ⊆ s
h : BijOn f u (f '' s)
⊢ ∃ u, r ⊆ u ∧ u ⊆ s ∧ f '' u = f '' s ∧ InjOn f u
tactic: obtain ⟨u, hru, hus, h⟩ := hinj.bijOn_image.exists_extend_of_subset hrs
    (image_subset f hrs) Subset.rfl
state_before: case intro.intro.intro
α : Type u_1
β : Type u_2
γ : Type u_3
ι : Sort u_4
π : α → Type u_5
s s₁ s₂ : Set α
t : Set β
f : α → β
r : Set α
hinj : InjOn f r
hrs : r ⊆ s
u : Set α
hru : r ⊆ u
hus : u ⊆ s
h : BijOn f u (f '' s)
⊢ ∃ u, r ⊆ u ∧ u ⊆ s ∧ f '' u = f '' s ∧ InjOn f u
state_after: no goals
tactic: exact ⟨u, hru, hus, h.image_eq, h.injOn⟩
Theorem: RingHom.range_top_iff_surjective
File: Mathlib/Algebra/Ring/Subring/Basic.lean

Proof steps:
state_before: R : Type u
S : Type v
T : Type w
inst✝² : Ring R
inst✝¹ : Ring S
inst✝ : Ring T
s : Subring R
f : R →+* S
⊢ ↑f.range = ↑⊤ ↔ Set.range ⇑f = Set.univ
state_after: no goals
tactic: rw [coe_range, coe_top]
Theorem: MeasureTheory.Measure.bind_zero_left
File: Mathlib/MeasureTheory/Measure/GiryMonad.lean

Proof steps:
state_before: α : Type u_1
β : Type u_2
inst✝¹ : MeasurableSpace α
inst✝ : MeasurableSpace β
f : α → Measure β
⊢ bind 0 f = 0
state_after: no goals
tactic: simp [bind]