1337xyz1337xyz/leandojo-benchmark4-v10 huggingface dataset:
Theorem: AlgebraicGeometry.ΓSpec.SpecMap_ΓSpecIso_hom
File: Mathlib/AlgebraicGeometry/GammaSpecAdjunction.lean

tactic: have := ΓSpec.adjunction.right_triangle_components (op R)
state_before: R : CommRingCat
⊢ Spec.map (Scheme.ΓSpecIso R).hom = adjunction.unit.app (Spec R)
state_after: R : CommRingCat
this :
  adjunction.unit.app (Scheme.Spec.obj { unop := R }) ≫ Scheme.Spec.map (adjunction.counit.app { unop := R }) =
    𝟙 (Scheme.Spec.obj { unop := R })
⊢ Spec.map (Scheme.ΓSpecIso R).hom = adjunction.unit.app (Spec R)

tactic: dsimp at this
state_before: R : CommRingCat
this :
  adjunction.unit.app (Scheme.Spec.obj { unop := R }) ≫ Scheme.Spec.map (adjunction.counit.app { unop := R }) =
    𝟙 (Scheme.Spec.obj { unop := R })
⊢ Spec.map (Scheme.ΓSpecIso R).hom = adjunction.unit.app (Spec R)
state_after: R : CommRingCat
this : adjunction.unit.app (Spec R) ≫ Spec.map (Scheme.ΓSpecIso R).inv = 𝟙 (Spec R)
⊢ Spec.map (Scheme.ΓSpecIso R).hom = adjunction.unit.app (Spec R)

tactic: rwa [← IsIso.eq_comp_inv, Category.id_comp, ← Spec.map_inv, IsIso.Iso.inv_inv, eq_comm] at this
state_before: R : CommRingCat
this : adjunction.unit.app (Spec R) ≫ Spec.map (Scheme.ΓSpecIso R).inv = 𝟙 (Spec R)
⊢ Spec.map (Scheme.ΓSpecIso R).hom = adjunction.unit.app (Spec R)
state_after: no goals
Theorem: Real.infinite_rat_abs_sub_lt_one_div_den_sq_iff_irrational
File: Mathlib/NumberTheory/DiophantineApproximation.lean

tactic: refine
  ⟨fun h => (irrational_iff_ne_rational ξ).mpr fun a b H => Set.not_infinite.mpr ?_ h,
    Real.infinite_rat_abs_sub_lt_one_div_den_sq_of_irrational⟩
state_before: ξ : ℝ
⊢ {q | |ξ - ↑q| < 1 / ↑q.den ^ 2}.Infinite ↔ Irrational ξ
state_after: ξ : ℝ
h : {q | |ξ - ↑q| < 1 / ↑q.den ^ 2}.Infinite
a b : ℤ
H : ξ = ↑a / ↑b
⊢ {q | |ξ - ↑q| < 1 / ↑q.den ^ 2}.Finite

tactic: convert Rat.finite_rat_abs_sub_lt_one_div_den_sq ((a : ℚ) / b) with q
state_before: ξ : ℝ
h : {q | |ξ - ↑q| < 1 / ↑q.den ^ 2}.Infinite
a b : ℤ
H : ξ = ↑a / ↑b
⊢ {q | |ξ - ↑q| < 1 / ↑q.den ^ 2}.Finite
state_after: case h.e'_2.h.e'_2.h.a
ξ : ℝ
h : {q | |ξ - ↑q| < 1 / ↑q.den ^ 2}.Infinite
a b : ℤ
H : ξ = ↑a / ↑b
q : ℚ
⊢ |ξ - ↑q| < 1 / ↑q.den ^ 2 ↔ |↑a / ↑b - q| < 1 / ↑q.den ^ 2

tactic: rw [H, (by (push_cast; rfl) : (1 : ℝ) / (q.den : ℝ) ^ 2 = (1 / (q.den : ℚ) ^ 2 : ℚ))]
state_before: case h.e'_2.h.e'_2.h.a
ξ : ℝ
h : {q | |ξ - ↑q| < 1 / ↑q.den ^ 2}.Infinite
a b : ℤ
H : ξ = ↑a / ↑b
q : ℚ
⊢ |ξ - ↑q| < 1 / ↑q.den ^ 2 ↔ |↑a / ↑b - q| < 1 / ↑q.den ^ 2
state_after: case h.e'_2.h.e'_2.h.a
ξ : ℝ
h : {q | |ξ - ↑q| < 1 / ↑q.den ^ 2}.Infinite
a b : ℤ
H : ξ = ↑a / ↑b
q : ℚ
⊢ |↑a / ↑b - ↑q| < ↑(1 / ↑q.den ^ 2) ↔ |↑a / ↑b - q| < 1 / ↑q.den ^ 2

tactic: norm_cast
state_before: case h.e'_2.h.e'_2.h.a
ξ : ℝ
h : {q | |ξ - ↑q| < 1 / ↑q.den ^ 2}.Infinite
a b : ℤ
H : ξ = ↑a / ↑b
q : ℚ
⊢ |↑a / ↑b - ↑q| < ↑(1 / ↑q.den ^ 2) ↔ |↑a / ↑b - q| < 1 / ↑q.den ^ 2
state_after: no goals

tactic: (push_cast; rfl)
state_before: ξ : ℝ
h : {q | |ξ - ↑q| < 1 / ↑q.den ^ 2}.Infinite
a b : ℤ
H : ξ = ↑a / ↑b
q : ℚ
⊢ 1 / ↑q.den ^ 2 = ↑(1 / ↑q.den ^ 2)
state_after: no goals

tactic: push_cast
state_before: ξ : ℝ
h : {q | |ξ - ↑q| < 1 / ↑q.den ^ 2}.Infinite
a b : ℤ
H : ξ = ↑a / ↑b
q : ℚ
⊢ 1 / ↑q.den ^ 2 = ↑(1 / ↑q.den ^ 2)
state_after: ξ : ℝ
h : {q | |ξ - ↑q| < 1 / ↑q.den ^ 2}.Infinite
a b : ℤ
H : ξ = ↑a / ↑b
q : ℚ
⊢ 1 / ↑q.den ^ 2 = 1 / ↑q.den ^ 2

tactic: rfl
state_before: ξ : ℝ
h : {q | |ξ - ↑q| < 1 / ↑q.den ^ 2}.Infinite
a b : ℤ
H : ξ = ↑a / ↑b
q : ℚ
⊢ 1 / ↑q.den ^ 2 = 1 / ↑q.den ^ 2
state_after: no goals
Theorem: Polynomial.degree_cyclotomic_pos
File: Mathlib/RingTheory/Polynomial/Cyclotomic/Basic.lean

tactic: rwa [degree_cyclotomic n R, Nat.cast_pos, Nat.totient_pos]
state_before: n : ℕ
R : Type u_1
hpos : 0 < n
inst✝¹ : Ring R
inst✝ : Nontrivial R
⊢ 0 < (cyclotomic n R).degree
state_after: no goals
Theorem: measurable_to_prop
File: Mathlib/MeasureTheory/MeasurableSpace/Basic.lean

tactic: refine measurable_to_countable' fun x => ?_
state_before: α : Type u_1
β : Type u_2
γ : Type u_3
δ : Type u_4
δ' : Type u_5
ι : Sort uι
s t u : Set α
inst✝ : MeasurableSpace α
f : α → Prop
h : MeasurableSet (f ⁻¹' {True})
⊢ Measurable f
state_after: α : Type u_1
β : Type u_2
γ : Type u_3
δ : Type u_4
δ' : Type u_5
ι : Sort uι
s t u : Set α
inst✝ : MeasurableSpace α
f : α → Prop
h : MeasurableSet (f ⁻¹' {True})
x : Prop
⊢ MeasurableSet (f ⁻¹' {x})

tactic: by_cases hx : x
state_before: α : Type u_1
β : Type u_2
γ : Type u_3
δ : Type u_4
δ' : Type u_5
ι : Sort uι
s t u : Set α
inst✝ : MeasurableSpace α
f : α → Prop
h : MeasurableSet (f ⁻¹' {True})
x : Prop
⊢ MeasurableSet (f ⁻¹' {x})
state_after: case pos
α : Type u_1
β : Type u_2
γ : Type u_3
δ : Type u_4
δ' : Type u_5
ι : Sort uι
s t u : Set α
inst✝ : MeasurableSpace α
f : α → Prop
h : MeasurableSet (f ⁻¹' {True})
x : Prop
hx : x
⊢ MeasurableSet (f ⁻¹' {x})

case neg
α : Type u_1
β : Type u_2
γ : Type u_3
δ : Type u_4
δ' : Type u_5
ι : Sort uι
s t u : Set α
inst✝ : MeasurableSpace α
f : α → Prop
h : MeasurableSet (f ⁻¹' {True})
x : Prop
hx : ¬x
⊢ MeasurableSet (f ⁻¹' {x})

tactic: simpa [hx] using h
state_before: case pos
α : Type u_1
β : Type u_2
γ : Type u_3
δ : Type u_4
δ' : Type u_5
ι : Sort uι
s t u : Set α
inst✝ : MeasurableSpace α
f : α → Prop
h : MeasurableSet (f ⁻¹' {True})
x : Prop
hx : x
⊢ MeasurableSet (f ⁻¹' {x})
state_after: no goals

tactic: simpa only [hx, ← preimage_compl, Prop.compl_singleton, not_true, preimage_singleton_false]
  using h.compl
state_before: case neg
α : Type u_1
β : Type u_2
γ : Type u_3
δ : Type u_4
δ' : Type u_5
ι : Sort uι
s t u : Set α
inst✝ : MeasurableSpace α
f : α → Prop
h : MeasurableSet (f ⁻¹' {True})
x : Prop
hx : ¬x
⊢ MeasurableSet (f ⁻¹' {x})
state_after: no goals
Theorem: HasLineDerivAt.lineDeriv
File: Mathlib/Analysis/Calculus/LineDeriv/Basic.lean

tactic: rw [h.unique h.lineDifferentiableAt.hasLineDerivAt]
state_before: 𝕜 : Type u_1
inst✝⁴ : NontriviallyNormedField 𝕜
F : Type u_2
inst✝³ : NormedAddCommGroup F
inst✝² : NormedSpace 𝕜 F
E : Type u_3
inst✝¹ : AddCommGroup E
inst✝ : Module 𝕜 E
f f₁ : E → F
f' f₀' f₁' : F
s t : Set E
x v : E
h : HasLineDerivAt 𝕜 f f' x v
⊢ lineDeriv 𝕜 f x v = f'
state_after: no goals
Theorem: Subgroup.coe_inclusion
File: Mathlib/Algebra/Group/Subgroup/Basic.lean

tactic: cases a
state_before: G : Type u_1
G' : Type u_2
G'' : Type u_3
inst✝³ : Group G
inst✝² : Group G'
inst✝¹ : Group G''
A : Type u_4
inst✝ : AddGroup A
H✝ K✝ H K : Subgroup G
h : H ≤ K
a : ↥H
⊢ ↑((inclusion h) a) = ↑a
state_after: case mk
G : Type u_1
G' : Type u_2
G'' : Type u_3
inst✝³ : Group G
inst✝² : Group G'
inst✝¹ : Group G''
A : Type u_4
inst✝ : AddGroup A
H✝ K✝ H K : Subgroup G
h : H ≤ K
val✝ : G
property✝ : val✝ ∈ H
⊢ ↑((inclusion h) ⟨val✝, property✝⟩) = ↑⟨val✝, property✝⟩

tactic: simp only [inclusion, coe_mk, MonoidHom.mk'_apply]
state_before: case mk
G : Type u_1
G' : Type u_2
G'' : Type u_3
inst✝³ : Group G
inst✝² : Group G'
inst✝¹ : Group G''
A : Type u_4
inst✝ : AddGroup A
H✝ K✝ H K : Subgroup G
h : H ≤ K
val✝ : G
property✝ : val✝ ∈ H
⊢ ↑((inclusion h) ⟨val✝, property✝⟩) = ↑⟨val✝, property✝⟩
state_after: no goals
Theorem: SzemerediRegularity.m_le_card_of_mem_chunk_parts
File: Mathlib/Combinatorics/SimpleGraph/Regularity/Chunk.lean

tactic: simp [i]
state_before: α : Type u_1
inst✝² : Fintype α
inst✝¹ : DecidableEq α
P : Finpartition univ
hP : P.IsEquipartition
G : SimpleGraph α
inst✝ : DecidableRel G.Adj
ε : ℝ
U : Finset α
hU : U ∈ P.parts
V : Finset α
𝒜 : Finset (Finset α)
s : Finset α
hs : s ∈ (chunk hP G ε hU).parts
i : s.card = m + 1
⊢ m ≤ s.card
state_after: no goals
Theorem: CategoryTheory.Limits.PushoutCocone.coequalizer_ext
File: Mathlib/CategoryTheory/Limits/Shapes/Pullbacks.lean

tactic: rw [← t.w fst, Category.assoc, Category.assoc, h₀]
state_before: C : Type u
inst✝¹ : Category.{v, u} C
D : Type u₂
inst✝ : Category.{v₂, u₂} D
W✝ X Y Z : C
f : X ⟶ Y
g : X ⟶ Z
t : PushoutCocone f g
W : C
k l : t.pt ⟶ W
h₀ : t.inl ≫ k = t.inl ≫ l
h₁ : t.inr ≫ k = t.inr ≫ l
⊢ t.ι.app none ≫ k = t.ι.app none ≫ l
state_after: no goals
Theorem: CategoryTheory.ShortComplex.toCycles_moduleCatCyclesIso_hom
File: Mathlib/Algebra/Homology/ShortComplex/ModuleCat.lean

tactic: rw [← cancel_mono S.moduleCatLeftHomologyData.i, moduleCatLeftHomologyData_i,
  Category.assoc, S.moduleCatCyclesIso_hom_subtype, toCycles_i]
state_before: R : Type u
inst✝ : Ring R
S : ShortComplex (ModuleCat R)
⊢ S.toCycles ≫ S.moduleCatCyclesIso.hom = S.moduleCatToCycles
state_after: R : Type u
inst✝ : Ring R
S : ShortComplex (ModuleCat R)
⊢ S.f = S.moduleCatToCycles ≫ (LinearMap.ker S.g).subtype

tactic: rfl
state_before: R : Type u
inst✝ : Ring R
S : ShortComplex (ModuleCat R)
⊢ S.f = S.moduleCatToCycles ≫ (LinearMap.ker S.g).subtype
state_after: no goals
Theorem: Interval.mem_pure
File: Mathlib/Order/Interval/Basic.lean

tactic: rw [← SetLike.mem_coe, coe_pure, mem_singleton_iff]
state_before: α : Type u_1
β : Type u_2
γ : Type u_3
δ : Type u_4
ι : Sort u_5
κ : ι → Sort u_6
inst✝¹ : PartialOrder α
inst✝ : PartialOrder β
s t : Interval α
a b : α
⊢ b ∈ pure a ↔ b = a
state_after: no goals
Theorem: Seminorm.convexOn
File: Mathlib/Analysis/Seminorm.lean

tactic: refine ⟨convex_univ, fun x _ y _ a b ha hb _ => ?_⟩
state_before: R : Type u_1
R' : Type u_2
𝕜 : Type u_3
𝕜₂ : Type u_4
𝕜₃ : Type u_5
𝕝 : Type u_6
E : Type u_7
E₂ : Type u_8
E₃ : Type u_9
F : Type u_10
G : Type u_11
ι : Type u_12
inst✝⁵ : NormedField 𝕜
inst✝⁴ : AddCommGroup E
inst✝³ : NormedSpace ℝ 𝕜
inst✝² : Module 𝕜 E
inst✝¹ : SMul ℝ E
inst✝ : IsScalarTower ℝ 𝕜 E
p : Seminorm 𝕜 E
⊢ ConvexOn ℝ univ ⇑p
state_after: R : Type u_1
R' : Type u_2
𝕜 : Type u_3
𝕜₂ : Type u_4
𝕜₃ : Type u_5
𝕝 : Type u_6
E : Type u_7
E₂ : Type u_8
E₃ : Type u_9
F : Type u_10
G : Type u_11
ι : Type u_12
inst✝⁵ : NormedField 𝕜
inst✝⁴ : AddCommGroup E
inst✝³ : NormedSpace ℝ 𝕜
inst✝² : Module 𝕜 E
inst✝¹ : SMul ℝ E
inst✝ : IsScalarTower ℝ 𝕜 E
p : Seminorm 𝕜 E
x : E
x✝² : x ∈ univ
y : E
x✝¹ : y ∈ univ
a b : ℝ
ha : 0 ≤ a
hb : 0 ≤ b
x✝ : a + b = 1
⊢ p (a • x + b • y) ≤ a • p x + b • p y

tactic: calc
  p (a • x + b • y) ≤ p (a • x) + p (b • y) := map_add_le_add p _ _
  _ = ‖a • (1 : 𝕜)‖ * p x + ‖b • (1 : 𝕜)‖ * p y := by
    rw [← map_smul_eq_mul p, ← map_smul_eq_mul p, smul_one_smul, smul_one_smul]
  _ = a * p x + b * p y := by
    rw [norm_smul, norm_smul, norm_one, mul_one, mul_one, Real.norm_of_nonneg ha,
      Real.norm_of_nonneg hb]
state_before: R : Type u_1
R' : Type u_2
𝕜 : Type u_3
𝕜₂ : Type u_4
𝕜₃ : Type u_5
𝕝 : Type u_6
E : Type u_7
E₂ : Type u_8
E₃ : Type u_9
F : Type u_10
G : Type u_11
ι : Type u_12
inst✝⁵ : NormedField 𝕜
inst✝⁴ : AddCommGroup E
inst✝³ : NormedSpace ℝ 𝕜
inst✝² : Module 𝕜 E
inst✝¹ : SMul ℝ E
inst✝ : IsScalarTower ℝ 𝕜 E
p : Seminorm 𝕜 E
x : E
x✝² : x ∈ univ
y : E
x✝¹ : y ∈ univ
a b : ℝ
ha : 0 ≤ a
hb : 0 ≤ b
x✝ : a + b = 1
⊢ p (a • x + b • y) ≤ a • p x + b • p y
state_after: no goals

tactic: rw [← map_smul_eq_mul p, ← map_smul_eq_mul p, smul_one_smul, smul_one_smul]
state_before: R : Type u_1
R' : Type u_2
𝕜 : Type u_3
𝕜₂ : Type u_4
𝕜₃ : Type u_5
𝕝 : Type u_6
E : Type u_7
E₂ : Type u_8
E₃ : Type u_9
F : Type u_10
G : Type u_11
ι : Type u_12
inst✝⁵ : NormedField 𝕜
inst✝⁴ : AddCommGroup E
inst✝³ : NormedSpace ℝ 𝕜
inst✝² : Module 𝕜 E
inst✝¹ : SMul ℝ E
inst✝ : IsScalarTower ℝ 𝕜 E
p : Seminorm 𝕜 E
x : E
x✝² : x ∈ univ
y : E
x✝¹ : y ∈ univ
a b : ℝ
ha : 0 ≤ a
hb : 0 ≤ b
x✝ : a + b = 1
⊢ p (a • x) + p (b • y) = ‖a • 1‖ * p x + ‖b • 1‖ * p y
state_after: no goals

tactic: rw [norm_smul, norm_smul, norm_one, mul_one, mul_one, Real.norm_of_nonneg ha,
  Real.norm_of_nonneg hb]
state_before: R : Type u_1
R' : Type u_2
𝕜 : Type u_3
𝕜₂ : Type u_4
𝕜₃ : Type u_5
𝕝 : Type u_6
E : Type u_7
E₂ : Type u_8
E₃ : Type u_9
F : Type u_10
G : Type u_11
ι : Type u_12
inst✝⁵ : NormedField 𝕜
inst✝⁴ : AddCommGroup E
inst✝³ : NormedSpace ℝ 𝕜
inst✝² : Module 𝕜 E
inst✝¹ : SMul ℝ E
inst✝ : IsScalarTower ℝ 𝕜 E
p : Seminorm 𝕜 E
x : E
x✝² : x ∈ univ
y : E
x✝¹ : y ∈ univ
a b : ℝ
ha : 0 ≤ a
hb : 0 ≤ b
x✝ : a + b = 1
⊢ ‖a • 1‖ * p x + ‖b • 1‖ * p y = a * p x + b * p y
state_after: no goals
Theorem: LinearEquiv.conj_id
File: Mathlib/Algebra/Module/Equiv.lean

tactic: ext
state_before: R : Type u_1
R₁ : Type u_2
R₂ : Type u_3
R₃ : Type u_4
k : Type u_5
K : Type u_6
S : Type u_7
M : Type u_8
M₁ : Type u_9
M₂ : Type u_10
M₃ : Type u_11
N₁ : Type u_12
N₂ : Type u_13
N₃ : Type u_14
N₄ : Type u_15
ι : Type u_16
inst✝⁶ : CommSemiring R
inst✝⁵ : AddCommMonoid M
inst✝⁴ : AddCommMonoid M₂
inst✝³ : AddCommMonoid M₃
inst✝² : Module R M
inst✝¹ : Module R M₂
inst✝ : Module R M₃
e : M ≃ₗ[R] M₂
⊢ e.conj LinearMap.id = LinearMap.id
state_after: case h
R : Type u_1
R₁ : Type u_2
R₂ : Type u_3
R₃ : Type u_4
k : Type u_5
K : Type u_6
S : Type u_7
M : Type u_8
M₁ : Type u_9
M₂ : Type u_10
M₃ : Type u_11
N₁ : Type u_12
N₂ : Type u_13
N₃ : Type u_14
N₄ : Type u_15
ι : Type u_16
inst✝⁶ : CommSemiring R
inst✝⁵ : AddCommMonoid M
inst✝⁴ : AddCommMonoid M₂
inst✝³ : AddCommMonoid M₃
inst✝² : Module R M
inst✝¹ : Module R M₂
inst✝ : Module R M₃
e : M ≃ₗ[R] M₂
x✝ : M₂
⊢ (e.conj LinearMap.id) x✝ = LinearMap.id x✝

tactic: simp [conj_apply]
state_before: case h
R : Type u_1
R₁ : Type u_2
R₂ : Type u_3
R₃ : Type u_4
k : Type u_5
K : Type u_6
S : Type u_7
M : Type u_8
M₁ : Type u_9
M₂ : Type u_10
M₃ : Type u_11
N₁ : Type u_12
N₂ : Type u_13
N₃ : Type u_14
N₄ : Type u_15
ι : Type u_16
inst✝⁶ : CommSemiring R
inst✝⁵ : AddCommMonoid M
inst✝⁴ : AddCommMonoid M₂
inst✝³ : AddCommMonoid M₃
inst✝² : Module R M
inst✝¹ : Module R M₂
inst✝ : Module R M₃
e : M ≃ₗ[R] M₂
x✝ : M₂
⊢ (e.conj LinearMap.id) x✝ = LinearMap.id x✝
state_after: no goals
Theorem: Matrix.IsHermitian.posSemidef_of_eigenvalues_nonneg
File: Mathlib/LinearAlgebra/Matrix/PosDef.lean

tactic: rw [hA.spectral_theorem]
state_before: m : Type u_1
n : Type u_2
R : Type u_3
𝕜 : Type u_4
inst✝⁷ : Fintype m
inst✝⁶ : Fintype n
inst✝⁵ : CommRing R
inst✝⁴ : PartialOrder R
inst✝³ : StarRing R
inst✝² : StarOrderedRing R
inst✝¹ : RCLike 𝕜
inst✝ : DecidableEq n
A : Matrix n n 𝕜
hA : A.IsHermitian
h : ∀ (i : n), 0 ≤ hA.eigenvalues i
⊢ A.PosSemidef
state_after: m : Type u_1
n : Type u_2
R : Type u_3
𝕜 : Type u_4
inst✝⁷ : Fintype m
inst✝⁶ : Fintype n
inst✝⁵ : CommRing R
inst✝⁴ : PartialOrder R
inst✝³ : StarRing R
inst✝² : StarOrderedRing R
inst✝¹ : RCLike 𝕜
inst✝ : DecidableEq n
A : Matrix n n 𝕜
hA : A.IsHermitian
h : ∀ (i : n), 0 ≤ hA.eigenvalues i
⊢ (↑hA.eigenvectorUnitary * diagonal (RCLike.ofReal ∘ hA.eigenvalues) * star ↑hA.eigenvectorUnitary).PosSemidef

tactic: refine (posSemidef_diagonal_iff.mpr ?_).mul_mul_conjTranspose_same _
state_before: m : Type u_1
n : Type u_2
R : Type u_3
𝕜 : Type u_4
inst✝⁷ : Fintype m
inst✝⁶ : Fintype n
inst✝⁵ : CommRing R
inst✝⁴ : PartialOrder R
inst✝³ : StarRing R
inst✝² : StarOrderedRing R
inst✝¹ : RCLike 𝕜
inst✝ : DecidableEq n
A : Matrix n n 𝕜
hA : A.IsHermitian
h : ∀ (i : n), 0 ≤ hA.eigenvalues i
⊢ (↑hA.eigenvectorUnitary * diagonal (RCLike.ofReal ∘ hA.eigenvalues) * star ↑hA.eigenvectorUnitary).PosSemidef
state_after: m : Type u_1
n : Type u_2
R : Type u_3
𝕜 : Type u_4
inst✝⁷ : Fintype m
inst✝⁶ : Fintype n
inst✝⁵ : CommRing R
inst✝⁴ : PartialOrder R
inst✝³ : StarRing R
inst✝² : StarOrderedRing R
inst✝¹ : RCLike 𝕜
inst✝ : DecidableEq n
A : Matrix n n 𝕜
hA : A.IsHermitian
h : ∀ (i : n), 0 ≤ hA.eigenvalues i
⊢ ∀ (i : n), 0 ≤ (RCLike.ofReal ∘ hA.eigenvalues) i

tactic: simpa using h
state_before: m : Type u_1
n : Type u_2
R : Type u_3
𝕜 : Type u_4
inst✝⁷ : Fintype m
inst✝⁶ : Fintype n
inst✝⁵ : CommRing R
inst✝⁴ : PartialOrder R
inst✝³ : StarRing R
inst✝² : StarOrderedRing R
inst✝¹ : RCLike 𝕜
inst✝ : DecidableEq n
A : Matrix n n 𝕜
hA : A.IsHermitian
h : ∀ (i : n), 0 ≤ hA.eigenvalues i
⊢ ∀ (i : n), 0 ≤ (RCLike.ofReal ∘ hA.eigenvalues) i
state_after: no goals
Theorem: Nat.Ico_succ_right_eq_insert_Ico
File: Mathlib/Order/Interval/Finset/Nat.lean

tactic: rw [Ico_succ_right, ← Ico_insert_right h]
state_before: a b c : ℕ
h : a ≤ b
⊢ Ico a (b + 1) = insert b (Ico a b)
state_after: no goals
Theorem: LinearMap.trace_eq_contract_apply
File: Mathlib/LinearAlgebra/Trace.lean

tactic: rw [← comp_apply, trace_eq_contract]
state_before: R : Type u_1
inst✝¹² : CommRing R
M : Type u_2
inst✝¹¹ : AddCommGroup M
inst✝¹⁰ : Module R M
N : Type u_3
P : Type u_4
inst✝⁹ : AddCommGroup N
inst✝⁸ : Module R N
inst✝⁷ : AddCommGroup P
inst✝⁶ : Module R P
ι : Type u_5
inst✝⁵ : Module.Free R M
inst✝⁴ : Module.Finite R M
inst✝³ : Module.Free R N
inst✝² : Module.Finite R N
inst✝¹ : Module.Free R P
inst✝ : Module.Finite R P
x : Module.Dual R M ⊗[R] M
⊢ (trace R M) ((dualTensorHom R M M) x) = (contractLeft R M) x
state_after: no goals
Theorem: Con.sup_eq_conGen
File: Mathlib/GroupTheory/Congruence/Basic.lean

tactic: rw [conGen_eq]
state_before: M : Type u_1
N : Type u_2
P : Type u_3
inst✝² : Mul M
inst✝¹ : Mul N
inst✝ : Mul P
c✝ c d : Con M
⊢ c ⊔ d = conGen fun x y => c x y ∨ d x y
state_after: M : Type u_1
N : Type u_2
P : Type u_3
inst✝² : Mul M
inst✝¹ : Mul N
inst✝ : Mul P
c✝ c d : Con M
⊢ c ⊔ d = sInf {s | ∀ (x y : M), c x y ∨ d x y → s x y}

tactic: apply congr_arg sInf
state_before: M : Type u_1
N : Type u_2
P : Type u_3
inst✝² : Mul M
inst✝¹ : Mul N
inst✝ : Mul P
c✝ c d : Con M
⊢ c ⊔ d = sInf {s | ∀ (x y : M), c x y ∨ d x y → s x y}
state_after: M : Type u_1
N : Type u_2
P : Type u_3
inst✝² : Mul M
inst✝¹ : Mul N
inst✝ : Mul P
c✝ c d : Con M
⊢ {x | c ≤ x ∧ d ≤ x} = {s | ∀ (x y : M), c x y ∨ d x y → s x y}

tactic: simp only [le_def, or_imp, ← forall_and]
state_before: M : Type u_1
N : Type u_2
P : Type u_3
inst✝² : Mul M
inst✝¹ : Mul N
inst✝ : Mul P
c✝ c d : Con M
⊢ {x | c ≤ x ∧ d ≤ x} = {s | ∀ (x y : M), c x y ∨ d x y → s x y}
state_after: no goals
Theorem: integral_one_div_one_add_sq
File: Mathlib/Analysis/SpecialFunctions/Integrals.lean

tactic: refine integral_deriv_eq_sub' _ Real.deriv_arctan (fun _ _ => differentiableAt_arctan _)
  (continuous_const.div ?_ fun x => ?_).continuousOn
state_before: a b : ℝ
n : ℕ
⊢ ∫ (x : ℝ) in a..b, 1 / (1 + x ^ 2) = arctan b - arctan a
state_after: case refine_1
a b : ℝ
n : ℕ
⊢ Continuous fun x => 1 + x ^ 2

case refine_2
a b : ℝ
n : ℕ
x : ℝ
⊢ 1 + x ^ 2 ≠ 0

tactic: fun_prop
state_before: case refine_1
a b : ℝ
n : ℕ
⊢ Continuous fun x => 1 + x ^ 2
state_after: no goals

tactic: nlinarith
state_before: case refine_2
a b : ℝ
n : ℕ
x : ℝ
⊢ 1 + x ^ 2 ≠ 0
state_after: no goals
Theorem: FractionalIdeal.map_inv
File: Mathlib/RingTheory/DedekindDomain/Ideal.lean

tactic: rw [inv_eq, map_div, map_one, inv_eq]
state_before: R : Type u_1
A : Type u_2
K : Type u_3
inst✝⁹ : CommRing R
inst✝⁸ : CommRing A
inst✝⁷ : Field K
R₁ : Type u_4
inst✝⁶ : CommRing R₁
inst✝⁵ : IsDomain R₁
inst✝⁴ : Algebra R₁ K
inst✝³ : IsFractionRing R₁ K
I✝ J : FractionalIdeal R₁⁰ K
K' : Type u_5
inst✝² : Field K'
inst✝¹ : Algebra R₁ K'
inst✝ : IsFractionRing R₁ K'
I : FractionalIdeal R₁⁰ K
h : K ≃ₐ[R₁] K'
⊢ map (↑h) I⁻¹ = (map (↑h) I)⁻¹
state_after: no goals
Theorem: Geometry.SimplicialComplex.vertex_mem_convexHull_iff
File: Mathlib/Analysis/Convex/SimplicialComplex/Basic.lean

tactic: refine ⟨fun h => ?_, fun h => subset_convexHull 𝕜 _ h⟩
state_before: 𝕜 : Type u_1
E : Type u_2
ι : Type u_3
inst✝² : OrderedRing 𝕜
inst✝¹ : AddCommGroup E
inst✝ : Module 𝕜 E
K : SimplicialComplex 𝕜 E
s t : Finset E
x : E
hx : x ∈ K.vertices
hs : s ∈ K.faces
⊢ x ∈ (convexHull 𝕜) ↑s ↔ x ∈ s
state_after: 𝕜 : Type u_1
E : Type u_2
ι : Type u_3
inst✝² : OrderedRing 𝕜
inst✝¹ : AddCommGroup E
inst✝ : Module 𝕜 E
K : SimplicialComplex 𝕜 E
s t : Finset E
x : E
hx : x ∈ K.vertices
hs : s ∈ K.faces
h : x ∈ (convexHull 𝕜) ↑s
⊢ x ∈ s

tactic: classical
have h := K.inter_subset_convexHull hx hs ⟨by simp, h⟩
by_contra H
rwa [← coe_inter, Finset.disjoint_iff_inter_eq_empty.1 (Finset.disjoint_singleton_right.2 H).symm,
  coe_empty, convexHull_empty] at h
state_before: 𝕜 : Type u_1
E : Type u_2
ι : Type u_3
inst✝² : OrderedRing 𝕜
inst✝¹ : AddCommGroup E
inst✝ : Module 𝕜 E
K : SimplicialComplex 𝕜 E
s t : Finset E
x : E
hx : x ∈ K.vertices
hs : s ∈ K.faces
h : x ∈ (convexHull 𝕜) ↑s
⊢ x ∈ s
state_after: no goals

tactic: have h := K.inter_subset_convexHull hx hs ⟨by simp, h⟩
state_before: 𝕜 : Type u_1
E : Type u_2
ι : Type u_3
inst✝² : OrderedRing 𝕜
inst✝¹ : AddCommGroup E
inst✝ : Module 𝕜 E
K : SimplicialComplex 𝕜 E
s t : Finset E
x : E
hx : x ∈ K.vertices
hs : s ∈ K.faces
h : x ∈ (convexHull 𝕜) ↑s
⊢ x ∈ s
state_after: 𝕜 : Type u_1
E : Type u_2
ι : Type u_3
inst✝² : OrderedRing 𝕜
inst✝¹ : AddCommGroup E
inst✝ : Module 𝕜 E
K : SimplicialComplex 𝕜 E
s t : Finset E
x : E
hx : x ∈ K.vertices
hs : s ∈ K.faces
h✝ : x ∈ (convexHull 𝕜) ↑s
h : x ∈ (convexHull 𝕜) (↑{x} ∩ ↑s)
⊢ x ∈ s

tactic: by_contra H
state_before: 𝕜 : Type u_1
E : Type u_2
ι : Type u_3
inst✝² : OrderedRing 𝕜
inst✝¹ : AddCommGroup E
inst✝ : Module 𝕜 E
K : SimplicialComplex 𝕜 E
s t : Finset E
x : E
hx : x ∈ K.vertices
hs : s ∈ K.faces
h✝ : x ∈ (convexHull 𝕜) ↑s
h : x ∈ (convexHull 𝕜) (↑{x} ∩ ↑s)
⊢ x ∈ s
state_after: 𝕜 : Type u_1
E : Type u_2
ι : Type u_3
inst✝² : OrderedRing 𝕜
inst✝¹ : AddCommGroup E
inst✝ : Module 𝕜 E
K : SimplicialComplex 𝕜 E
s t : Finset E
x : E
hx : x ∈ K.vertices
hs : s ∈ K.faces
h✝ : x ∈ (convexHull 𝕜) ↑s
h : x ∈ (convexHull 𝕜) (↑{x} ∩ ↑s)
H : ¬x ∈ s
⊢ False

tactic: rwa [← coe_inter, Finset.disjoint_iff_inter_eq_empty.1 (Finset.disjoint_singleton_right.2 H).symm,
  coe_empty, convexHull_empty] at h
state_before: 𝕜 : Type u_1
E : Type u_2
ι : Type u_3
inst✝² : OrderedRing 𝕜
inst✝¹ : AddCommGroup E
inst✝ : Module 𝕜 E
K : SimplicialComplex 𝕜 E
s t : Finset E
x : E
hx : x ∈ K.vertices
hs : s ∈ K.faces
h✝ : x ∈ (convexHull 𝕜) ↑s
h : x ∈ (convexHull 𝕜) (↑{x} ∩ ↑s)
H : ¬x ∈ s
⊢ False
state_after: no goals

tactic: simp
state_before: 𝕜 : Type u_1
E : Type u_2
ι : Type u_3
inst✝² : OrderedRing 𝕜
inst✝¹ : AddCommGroup E
inst✝ : Module 𝕜 E
K : SimplicialComplex 𝕜 E
s t : Finset E
x : E
hx : x ∈ K.vertices
hs : s ∈ K.faces
h : x ∈ (convexHull 𝕜) ↑s
⊢ x ∈ (convexHull 𝕜) ↑{x}
state_after: no goals
Theorem: Finset.piecewise_insert_of_ne
File: Mathlib/Data/Finset/Piecewise.lean

tactic: simp [piecewise, h]
state_before: ι : Type u_1
π : ι → Sort u_2
s : Finset ι
f g : (i : ι) → π i
inst✝² : (j : ι) → Decidable (j ∈ s)
inst✝¹ : DecidableEq ι
i j : ι
inst✝ : (i : ι) → Decidable (i ∈ insert j s)
h : i ≠ j
⊢ (insert j s).piecewise f g i = s.piecewise f g i
state_after: no goals