ruc-ai4math/mathlib_handler_benchmark_410 huggingface dataset:
Theorem: List.tails_eq_tailsTR
File: .lake/packages/batteries/Batteries/Data/List/Basic.lean

Proof steps:
state_before: ⊢ @tails = @tailsTR
state_after: case h
α : Type u_1
⊢ tails = tailsTR
tactic: funext α
state_before: case h
α : Type u_1
⊢ tails = tailsTR
state_after: case h
α : Type u_1
H : ∀ (l : List α) (acc : Array (List α)), tailsTR.go l acc = acc.toList ++ l.tails
⊢ tails = tailsTR
tactic: have H (l : List α) : ∀ acc, tailsTR.go l acc = acc.toList ++ tails l := by
    induction l <;> simp [*, tailsTR.go]
state_before: case h
α : Type u_1
H : ∀ (l : List α) (acc : Array (List α)), tailsTR.go l acc = acc.toList ++ l.tails
⊢ tails = tailsTR
state_after: no goals
tactic: simp (config := { unfoldPartialApp := true }) [tailsTR, H]
Theorem: smul_eq_smul_iff_eq_and_eq_of_pos
File: Mathlib/Algebra/Order/Module/Defs.lean

Proof steps:
state_before: α : Type u_1
β : Type u_2
a a₁ a₂ : α
b b₁ b₂ : β
inst✝⁶ : Zero α
inst✝⁵ : Zero β
inst✝⁴ : SMulWithZero α β
inst✝³ : PartialOrder α
inst✝² : PartialOrder β
inst✝¹ : PosSMulStrictMono α β
inst✝ : SMulPosStrictMono α β
ha : a₁ ≤ a₂
hb : b₁ ≤ b₂
h₁ : 0 < a₁
h₂ : 0 < b₂
⊢ a₁ • b₁ = a₂ • b₂ ↔ a₁ = a₂ ∧ b₁ = b₂
state_after: α : Type u_1
β : Type u_2
a a₁ a₂ : α
b b₁ b₂ : β
inst✝⁶ : Zero α
inst✝⁵ : Zero β
inst✝⁴ : SMulWithZero α β
inst✝³ : PartialOrder α
inst✝² : PartialOrder β
inst✝¹ : PosSMulStrictMono α β
inst✝ : SMulPosStrictMono α β
ha : a₁ ≤ a₂
hb : b₁ ≤ b₂
h₁ : 0 < a₁
h₂ : 0 < b₂
h : a₁ • b₁ = a₂ • b₂
⊢ a₁ = a₂ ∧ b₁ = b₂
tactic: refine ⟨fun h ↦ ?_, by rintro ⟨rfl, rfl⟩; rfl⟩
state_before: α : Type u_1
β : Type u_2
a a₁ a₂ : α
b b₁ b₂ : β
inst✝⁶ : Zero α
inst✝⁵ : Zero β
inst✝⁴ : SMulWithZero α β
inst✝³ : PartialOrder α
inst✝² : PartialOrder β
inst✝¹ : PosSMulStrictMono α β
inst✝ : SMulPosStrictMono α β
ha : a₁ ≤ a₂
hb : b₁ ≤ b₂
h₁ : 0 < a₁
h₂ : 0 < b₂
h : a₁ • b₁ = a₂ • b₂
⊢ a₁ = a₂ ∧ b₁ = b₂
state_after: α : Type u_1
β : Type u_2
a a₁ a₂ : α
b b₁ b₂ : β
inst✝⁶ : Zero α
inst✝⁵ : Zero β
inst✝⁴ : SMulWithZero α β
inst✝³ : PartialOrder α
inst✝² : PartialOrder β
inst✝¹ : PosSMulStrictMono α β
inst✝ : SMulPosStrictMono α β
ha : a₁ ≤ a₂
hb : b₁ ≤ b₂
h₁ : 0 < a₁
h₂ : 0 < b₂
h : a₁ • b₁ = a₂ • b₂
⊢ ¬a₁ < a₂ ∧ ¬b₁ < b₂
tactic: simp only [eq_iff_le_not_lt, ha, hb, true_and]
state_before: α : Type u_1
β : Type u_2
a a₁ a₂ : α
b b₁ b₂ : β
inst✝⁶ : Zero α
inst✝⁵ : Zero β
inst✝⁴ : SMulWithZero α β
inst✝³ : PartialOrder α
inst✝² : PartialOrder β
inst✝¹ : PosSMulStrictMono α β
inst✝ : SMulPosStrictMono α β
ha : a₁ ≤ a₂
hb : b₁ ≤ b₂
h₁ : 0 < a₁
h₂ : 0 < b₂
h : a₁ • b₁ = a₂ • b₂
⊢ ¬a₁ < a₂ ∧ ¬b₁ < b₂
state_after: case refine_1
α : Type u_1
β : Type u_2
a a₁ a₂ : α
b b₁ b₂ : β
inst✝⁶ : Zero α
inst✝⁵ : Zero β
inst✝⁴ : SMulWithZero α β
inst✝³ : PartialOrder α
inst✝² : PartialOrder β
inst✝¹ : PosSMulStrictMono α β
inst✝ : SMulPosStrictMono α β
ha✝ : a₁ ≤ a₂
hb : b₁ ≤ b₂
h₁ : 0 < a₁
h₂ : 0 < b₂
h : a₁ • b₁ = a₂ • b₂
ha : a₁ < a₂
⊢ a₁ • b₁ < a₂ • b₂

case refine_2
α : Type u_1
β : Type u_2
a a₁ a₂ : α
b b₁ b₂ : β
inst✝⁶ : Zero α
inst✝⁵ : Zero β
inst✝⁴ : SMulWithZero α β
inst✝³ : PartialOrder α
inst✝² : PartialOrder β
inst✝¹ : PosSMulStrictMono α β
inst✝ : SMulPosStrictMono α β
ha : a₁ ≤ a₂
hb✝ : b₁ ≤ b₂
h₁ : 0 < a₁
h₂ : 0 < b₂
h : a₁ • b₁ = a₂ • b₂
hb : b₁ < b₂
⊢ a₁ • b₁ < a₂ • b₂
tactic: refine ⟨fun ha ↦ h.not_lt ?_, fun hb ↦ h.not_lt ?_⟩
Theorem: List.prev_ne_cons_cons
File: Mathlib/Data/List/Cycle.lean

Proof steps:
state_before: α : Type u_1
inst✝ : DecidableEq α
l : List α
x y z : α
h : x ∈ y :: z :: l
hy : x ≠ y
hz : x ≠ z
⊢ x ∈ z :: l
state_after: no goals
tactic: simpa [hy] using h
state_before: α : Type u_1
inst✝ : DecidableEq α
l : List α
x y z : α
h : x ∈ y :: z :: l
hy : x ≠ y
hz : x ≠ z
⊢ (y :: z :: l).prev x h = (z :: l).prev x ⋯
state_after: case nil
α : Type u_1
inst✝ : DecidableEq α
x y z : α
hy : x ≠ y
hz : x ≠ z
h : x ∈ [y, z]
⊢ [y, z].prev x h = [z].prev x ⋯

case cons
α : Type u_1
inst✝ : DecidableEq α
x y z : α
hy : x ≠ y
hz : x ≠ z
head✝ : α
tail✝ : List α
h : x ∈ y :: z :: head✝ :: tail✝
⊢ (y :: z :: head✝ :: tail✝).prev x h = (z :: head✝ :: tail✝).prev x ⋯
tactic: cases l
Theorem: CategoryTheory.ShortComplex.rightHomologyMapIso_inv
File: Mathlib/Algebra/Homology/ShortComplex/RightHomology.lean

Proof steps:
state_before: C : Type u_1
inst✝³ : Category.{?u.119316, u_1} C
inst✝² : HasZeroMorphisms C
S S₁ S₂ S₃ : ShortComplex C
e : S₁ ≅ S₂
inst✝¹ : S₁.HasRightHomology
inst✝ : S₂.HasRightHomology
⊢ rightHomologyMap e.hom ≫ rightHomologyMap e.inv = 𝟙 S₁.rightHomology
state_after: no goals
tactic: rw [← rightHomologyMap_comp, e.hom_inv_id, rightHomologyMap_id]
state_before: C : Type u_1
inst✝³ : Category.{?u.119316, u_1} C
inst✝² : HasZeroMorphisms C
S S₁ S₂ S₃ : ShortComplex C
e : S₁ ≅ S₂
inst✝¹ : S₁.HasRightHomology
inst✝ : S₂.HasRightHomology
⊢ rightHomologyMap e.inv ≫ rightHomologyMap e.hom = 𝟙 S₂.rightHomology
state_after: no goals
tactic: rw [← rightHomologyMap_comp, e.inv_hom_id, rightHomologyMap_id]
Theorem: CategoryTheory.Localization.essSurj_mapComposableArrows
File: Mathlib/CategoryTheory/Localization/CalculusOfFractions/ComposableArrows.lean

Proof steps:
state_before: C : Type u_1
D : Type u_2
inst✝³ : Category.{u_3, u_1} C
inst✝² : Category.{u_4, u_2} D
L : C ⥤ D
W : MorphismProperty C
inst✝¹ : L.IsLocalization W
inst✝ : W.HasLeftCalculusOfFractions
n : ℕ
⊢ (L.mapComposableArrows n).EssSurj
state_after: C : Type u_1
D : Type u_2
inst✝³ : Category.{u_3, u_1} C
inst✝² : Category.{u_4, u_2} D
L : C ⥤ D
W : MorphismProperty C
inst✝¹ : L.IsLocalization W
inst✝ : W.HasLeftCalculusOfFractions
n : ℕ
this : (L.op.mapComposableArrows n).EssSurj
⊢ (L.mapComposableArrows n).EssSurj
tactic: have := essSurj_mapComposableArrows_of_hasRightCalculusOfFractions L.op W.op n
state_before: C : Type u_1
D : Type u_2
inst✝³ : Category.{u_3, u_1} C
inst✝² : Category.{u_4, u_2} D
L : C ⥤ D
W : MorphismProperty C
inst✝¹ : L.IsLocalization W
inst✝ : W.HasLeftCalculusOfFractions
n : ℕ
this : (L.op.mapComposableArrows n).EssSurj
⊢ (L.mapComposableArrows n).EssSurj
state_after: C : Type u_1
D : Type u_2
inst✝³ : Category.{u_3, u_1} C
inst✝² : Category.{u_4, u_2} D
L : C ⥤ D
W : MorphismProperty C
inst✝¹ : L.IsLocalization W
inst✝ : W.HasLeftCalculusOfFractions
n : ℕ
this✝ : (L.op.mapComposableArrows n).EssSurj
this : (L.mapComposableArrows n ⋙ (opEquivalence D n).functor.rightOp).EssSurj
⊢ (L.mapComposableArrows n).EssSurj
tactic: have := Functor.essSurj_of_iso (L.mapComposableArrowsOpIso n).symm
state_before: C : Type u_1
D : Type u_2
inst✝³ : Category.{u_3, u_1} C
inst✝² : Category.{u_4, u_2} D
L : C ⥤ D
W : MorphismProperty C
inst✝¹ : L.IsLocalization W
inst✝ : W.HasLeftCalculusOfFractions
n : ℕ
this✝ : (L.op.mapComposableArrows n).EssSurj
this : (L.mapComposableArrows n ⋙ (opEquivalence D n).functor.rightOp).EssSurj
⊢ (L.mapComposableArrows n).EssSurj
state_after: no goals
tactic: exact Functor.essSurj_of_comp_fully_faithful _ (opEquivalence D n).functor.rightOp
Theorem: Submodule.torsion'AddSubMonoid_coe
File: Mathlib/Algebra/Module/Torsion.lean

Proof steps:
state_before: R : Type u_1
M : Type u_2
inst✝⁴ : CommSemiring R
inst✝³ : AddCommMonoid M
inst✝² : Module R M
S : Type u_3
inst✝¹ : CommMonoid S
inst✝ : DistribMulAction S M
⊢ ∀ {a b : M}, a ∈ {x | ∃ a, a • x = 0} → b ∈ {x | ∃ a, a • x = 0} → a + b ∈ {x | ∃ a, a • x = 0}
state_after: R : Type u_1
M : Type u_2
inst✝⁴ : CommSemiring R
inst✝³ : AddCommMonoid M
inst✝² : Module R M
S : Type u_3
inst✝¹ : CommMonoid S
inst✝ : DistribMulAction S M
x y : M
a : S
hx : a • x = 0
b : S
hy : b • y = 0
⊢ x + y ∈ {x | ∃ a, a • x = 0}
tactic: intro x y ⟨a,hx⟩ ⟨b,hy⟩
state_before: R : Type u_1
M : Type u_2
inst✝⁴ : CommSemiring R
inst✝³ : AddCommMonoid M
inst✝² : Module R M
S : Type u_3
inst✝¹ : CommMonoid S
inst✝ : DistribMulAction S M
x y : M
a : S
hx : a • x = 0
b : S
hy : b • y = 0
⊢ x + y ∈ {x | ∃ a, a • x = 0}
state_after: case h
R : Type u_1
M : Type u_2
inst✝⁴ : CommSemiring R
inst✝³ : AddCommMonoid M
inst✝² : Module R M
S : Type u_3
inst✝¹ : CommMonoid S
inst✝ : DistribMulAction S M
x y : M
a : S
hx : a • x = 0
b : S
hy : b • y = 0
⊢ (b * a) • (x + y) = 0
tactic: use b * a
state_before: case h
R : Type u_1
M : Type u_2
inst✝⁴ : CommSemiring R
inst✝³ : AddCommMonoid M
inst✝² : Module R M
S : Type u_3
inst✝¹ : CommMonoid S
inst✝ : DistribMulAction S M
x y : M
a : S
hx : a • x = 0
b : S
hy : b • y = 0
⊢ (b * a) • (x + y) = 0
state_after: no goals
tactic: rw [smul_add, mul_smul, mul_comm, mul_smul, hx, hy, smul_zero, smul_zero, add_zero]
Theorem: Multiset.lcm_dedup
File: Mathlib/Algebra/GCDMonoid/Multiset.lean

Proof steps:
state_before: α : Type u_1
inst✝² : CancelCommMonoidWithZero α
inst✝¹ : NormalizedGCDMonoid α
inst✝ : DecidableEq α
s : Multiset α
⊢ (dedup 0).lcm = lcm 0
state_after: no goals
tactic: simp
state_before: α : Type u_1
inst✝² : CancelCommMonoidWithZero α
inst✝¹ : NormalizedGCDMonoid α
inst✝ : DecidableEq α
s✝ : Multiset α
a : α
s : Multiset α
IH : s.dedup.lcm = s.lcm
⊢ (a ::ₘ s).dedup.lcm = (a ::ₘ s).lcm
state_after: case pos
α : Type u_1
inst✝² : CancelCommMonoidWithZero α
inst✝¹ : NormalizedGCDMonoid α
inst✝ : DecidableEq α
s✝ : Multiset α
a : α
s : Multiset α
IH : s.dedup.lcm = s.lcm
h : a ∈ s
⊢ s.lcm = GCDMonoid.lcm a s.lcm
tactic: by_cases h : a ∈ s <;> simp [IH, h]
state_before: case pos
α : Type u_1
inst✝² : CancelCommMonoidWithZero α
inst✝¹ : NormalizedGCDMonoid α
inst✝ : DecidableEq α
s✝ : Multiset α
a : α
s : Multiset α
IH : s.dedup.lcm = s.lcm
h : a ∈ s
⊢ s.lcm = GCDMonoid.lcm a s.lcm
state_after: case pos
α : Type u_1
inst✝² : CancelCommMonoidWithZero α
inst✝¹ : NormalizedGCDMonoid α
inst✝ : DecidableEq α
s✝ : Multiset α
a : α
s : Multiset α
IH : s.dedup.lcm = s.lcm
h : a ∈ s
⊢ fold GCDMonoid.lcm 1 s = GCDMonoid.lcm a (fold GCDMonoid.lcm 1 s)
tactic: unfold lcm
state_before: case pos
α : Type u_1
inst✝² : CancelCommMonoidWithZero α
inst✝¹ : NormalizedGCDMonoid α
inst✝ : DecidableEq α
s✝ : Multiset α
a : α
s : Multiset α
IH : s.dedup.lcm = s.lcm
h : a ∈ s
⊢ fold GCDMonoid.lcm 1 s = GCDMonoid.lcm a (fold GCDMonoid.lcm 1 s)
state_after: case pos
α : Type u_1
inst✝² : CancelCommMonoidWithZero α
inst✝¹ : NormalizedGCDMonoid α
inst✝ : DecidableEq α
s✝ : Multiset α
a : α
s : Multiset α
IH : s.dedup.lcm = s.lcm
h : a ∈ s
⊢ GCDMonoid.lcm a (fold GCDMonoid.lcm 1 (s.erase a)) = GCDMonoid.lcm (normalize a) (fold GCDMonoid.lcm 1 (s.erase a))
tactic: rw [← cons_erase h, fold_cons_left, ← lcm_assoc, lcm_same]
state_before: case pos
α : Type u_1
inst✝² : CancelCommMonoidWithZero α
inst✝¹ : NormalizedGCDMonoid α
inst✝ : DecidableEq α
s✝ : Multiset α
a : α
s : Multiset α
IH : s.dedup.lcm = s.lcm
h : a ∈ s
⊢ GCDMonoid.lcm a (fold GCDMonoid.lcm 1 (s.erase a)) = GCDMonoid.lcm (normalize a) (fold GCDMonoid.lcm 1 (s.erase a))
state_after: no goals
tactic: apply lcm_eq_of_associated_left (associated_normalize _)
Theorem: Algebra.adjoin_root_eq_top_of_isSplittingField
File: Mathlib/FieldTheory/KummerExtension.lean

Proof steps:
state_before: K : Type u
inst✝³ : Field K
n : ℕ
hζ : (primitiveRoots n K).Nonempty
hn : 0 < n
a : K
H : Irreducible (X ^ n - C a)
L : Type u_1
inst✝² : Field L
inst✝¹ : Algebra K L
inst✝ : IsSplittingField K L (X ^ n - C a)
α : L
hα : α ^ n = (algebraMap K L) a
⊢ adjoin K {α} = ⊤
state_after: case a
K : Type u
inst✝³ : Field K
n : ℕ
hζ : (primitiveRoots n K).Nonempty
hn : 0 < n
a : K
H : Irreducible (X ^ n - C a)
L : Type u_1
inst✝² : Field L
inst✝¹ : Algebra K L
inst✝ : IsSplittingField K L (X ^ n - C a)
α : L
hα : α ^ n = (algebraMap K L) a
⊢ Subalgebra.map (↑(adjoinRootXPowSubCEquiv hζ H hα).symm) (adjoin K {α}) =
    Subalgebra.map ↑(adjoinRootXPowSubCEquiv hζ H hα).symm ⊤
tactic: apply Subalgebra.map_injective (f := (adjoinRootXPowSubCEquiv hζ H hα).symm)
    (adjoinRootXPowSubCEquiv hζ H hα).symm.injective
state_before: case a
K : Type u
inst✝³ : Field K
n : ℕ
hζ : (primitiveRoots n K).Nonempty
hn : 0 < n
a : K
H : Irreducible (X ^ n - C a)
L : Type u_1
inst✝² : Field L
inst✝¹ : Algebra K L
inst✝ : IsSplittingField K L (X ^ n - C a)
α : L
hα : α ^ n = (algebraMap K L) a
⊢ Subalgebra.map (↑(adjoinRootXPowSubCEquiv hζ H hα).symm) (adjoin K {α}) =
    Subalgebra.map ↑(adjoinRootXPowSubCEquiv hζ H hα).symm ⊤
state_after: no goals
tactic: rw [Algebra.map_top, (Algebra.range_top_iff_surjective _).mpr
    (adjoinRootXPowSubCEquiv hζ H hα).symm.surjective, AlgHom.map_adjoin,
    Set.image_singleton, AlgHom.coe_coe, adjoinRootXPowSubCEquiv_symm_eq_root, adjoinRoot_eq_top]
Theorem: Finpartition.parts_eq_empty_iff
File: Mathlib/Order/Partition/Finpartition.lean

Proof steps:
state_before: α : Type u_1
inst✝¹ : Lattice α
inst✝ : OrderBot α
a : α
P : Finpartition a
⊢ P.parts = ∅ ↔ a = ⊥
state_after: α : Type u_1
inst✝¹ : Lattice α
inst✝ : OrderBot α
a : α
P : Finpartition a
⊢ P.parts = ∅ ↔ P.parts.sup id = ⊥
tactic: simp_rw [← P.sup_parts]
state_before: α : Type u_1
inst✝¹ : Lattice α
inst✝ : OrderBot α
a : α
P : Finpartition a
⊢ P.parts = ∅ ↔ P.parts.sup id = ⊥
state_after: case refine_1
α : Type u_1
inst✝¹ : Lattice α
inst✝ : OrderBot α
a : α
P : Finpartition a
h : P.parts = ∅
⊢ P.parts.sup id = ⊥

case refine_2
α : Type u_1
inst✝¹ : Lattice α
inst✝ : OrderBot α
a : α
P : Finpartition a
h : P.parts.sup id = ⊥
b : α
hb : b ∈ P.parts
⊢ ⊥ ∈ P.parts
tactic: refine ⟨fun h ↦ ?_, fun h ↦ eq_empty_iff_forall_not_mem.2 fun b hb ↦ P.not_bot_mem ?_⟩
Theorem: ZMod.χ₄_nat_three_mod_four
File: Mathlib/NumberTheory/LegendreSymbol/ZModChar.lean

Proof steps:
state_before: n : ℕ
hn : n % 4 = 3
⊢ χ₄ ↑n = -1
state_after: n : ℕ
hn : n % 4 = 3
⊢ χ₄ ↑3 = -1
tactic: rw [χ₄_nat_mod_four, hn]
state_before: n : ℕ
hn : n % 4 = 3
⊢ χ₄ ↑3 = -1
state_after: no goals
tactic: rfl
Theorem: CategoryTheory.Comonad.adj_counit
File: Mathlib/CategoryTheory/Monad/Algebra.lean

Proof steps:
state_before: C : Type u₁
inst✝ : Category.{v₁, u₁} C
G : Comonad C
X : G.Coalgebra
Y : C
f : G.forget.obj X ⟶ Y
⊢ X.a ≫ G.map (X.a ≫ G.map f) = (X.a ≫ G.map f) ≫ (G.cofree.obj Y).a
state_after: C : Type u₁
inst✝ : Category.{v₁, u₁} C
G : Comonad C
X : G.Coalgebra
Y : C
f : G.forget.obj X ⟶ Y
⊢ X.a ≫ G.map (X.a ≫ G.map f) = (X.a ≫ G.map f) ≫ G.δ.app Y
tactic: dsimp
state_before: C : Type u₁
inst✝ : Category.{v₁, u₁} C
G : Comonad C
X : G.Coalgebra
Y : C
f : G.forget.obj X ⟶ Y
⊢ X.a ≫ G.map (X.a ≫ G.map f) = (X.a ≫ G.map f) ≫ G.δ.app Y
state_after: no goals
tactic: simp [← Coalgebra.coassoc_assoc]
state_before: C : Type u₁
inst✝ : Category.{v₁, u₁} C
G : Comonad C
X : G.Coalgebra
Y : C
f : G.forget.obj X ⟶ Y
⊢ (fun g => g.f ≫ G.ε.app Y) ((fun f => { f := X.a ≫ G.map f, h := ⋯ }) f) = f
state_after: C : Type u₁
inst✝ : Category.{v₁, u₁} C
G : Comonad C
X : G.Coalgebra
Y : C
f : G.forget.obj X ⟶ Y
⊢ (X.a ≫ G.map f) ≫ G.ε.app Y = f
tactic: dsimp
state_before: C : Type u₁
inst✝ : Category.{v₁, u₁} C
G : Comonad C
X : G.Coalgebra
Y : C
f : G.forget.obj X ⟶ Y
⊢ (X.a ≫ G.map f) ≫ G.ε.app Y = f
state_after: no goals
tactic: rw [Category.assoc, G.ε.naturality, Functor.id_map, X.counit_assoc]
state_before: C : Type u₁
inst✝ : Category.{v₁, u₁} C
G : Comonad C
X : G.Coalgebra
Y : C
g : X ⟶ G.cofree.obj Y
⊢ (fun f => { f := X.a ≫ G.map f, h := ⋯ }) ((fun g => g.f ≫ G.ε.app Y) g) = g
state_after: case h
C : Type u₁
inst✝ : Category.{v₁, u₁} C
G : Comonad C
X : G.Coalgebra
Y : C
g : X ⟶ G.cofree.obj Y
⊢ ((fun f => { f := X.a ≫ G.map f, h := ⋯ }) ((fun g => g.f ≫ G.ε.app Y) g)).f = g.f
tactic: ext1
state_before: case h
C : Type u₁
inst✝ : Category.{v₁, u₁} C
G : Comonad C
X : G.Coalgebra
Y : C
g : X ⟶ G.cofree.obj Y
⊢ ((fun f => { f := X.a ≫ G.map f, h := ⋯ }) ((fun g => g.f ≫ G.ε.app Y) g)).f = g.f
state_after: case h
C : Type u₁
inst✝ : Category.{v₁, u₁} C
G : Comonad C
X : G.Coalgebra
Y : C
g : X ⟶ G.cofree.obj Y
⊢ X.a ≫ G.map (g.f ≫ G.ε.app Y) = g.f
tactic: dsimp
state_before: case h
C : Type u₁
inst✝ : Category.{v₁, u₁} C
G : Comonad C
X : G.Coalgebra
Y : C
g : X ⟶ G.cofree.obj Y
⊢ X.a ≫ G.map (g.f ≫ G.ε.app Y) = g.f
state_after: case h
C : Type u₁
inst✝ : Category.{v₁, u₁} C
G : Comonad C
X : G.Coalgebra
Y : C
g : X ⟶ G.cofree.obj Y
⊢ g.f ≫ 𝟙 (G.obj Y) = g.f
tactic: rw [Functor.map_comp, g.h_assoc, cofree_obj_a, Comonad.right_counit]
state_before: case h
C : Type u₁
inst✝ : Category.{v₁, u₁} C
G : Comonad C
X : G.Coalgebra
Y : C
g : X ⟶ G.cofree.obj Y
⊢ g.f ≫ 𝟙 (G.obj Y) = g.f
state_after: no goals
tactic: apply comp_id
Theorem: CstarRing.spectralOrderedRing
File: Mathlib/Analysis/CstarAlgebra/ContinuousFunctionalCalculus/Instances.lean

Proof steps:
state_before: A : Type u_1
inst✝⁵ : NormedRing A
inst✝⁴ : CompleteSpace A
inst✝³ : StarRing A
inst✝² : CstarRing A
inst✝¹ : NormedAlgebra ℂ A
inst✝ : StarModule ℂ A
x✝ : PartialOrder A := spectralOrder A
⊢ ∀ (x y : A), x ≤ y ↔ ∃ p ∈ AddSubmonoid.closure (Set.range fun s => star s * s), y = x + p
state_after: A : Type u_1
inst✝⁵ : NormedRing A
inst✝⁴ : CompleteSpace A
inst✝³ : StarRing A
inst✝² : CstarRing A
inst✝¹ : NormedAlgebra ℂ A
inst✝ : StarModule ℂ A
x✝ : PartialOrder A := spectralOrder A
x y : A
⊢ x ≤ y ↔ ∃ p ∈ AddSubmonoid.closure (Set.range fun s => star s * s), y = x + p
tactic: intro x y
state_before: A : Type u_1
inst✝⁵ : NormedRing A
inst✝⁴ : CompleteSpace A
inst✝³ : StarRing A
inst✝² : CstarRing A
inst✝¹ : NormedAlgebra ℂ A
inst✝ : StarModule ℂ A
x✝ : PartialOrder A := spectralOrder A
x y : A
⊢ x ≤ y ↔ ∃ p ∈ AddSubmonoid.closure (Set.range fun s => star s * s), y = x + p
state_after: case mp
A : Type u_1
inst✝⁵ : NormedRing A
inst✝⁴ : CompleteSpace A
inst✝³ : StarRing A
inst✝² : CstarRing A
inst✝¹ : NormedAlgebra ℂ A
inst✝ : StarModule ℂ A
x✝ : PartialOrder A := spectralOrder A
x y : A
⊢ x ≤ y → ∃ p ∈ AddSubmonoid.closure (Set.range fun s => star s * s), y = x + p

case mpr
A : Type u_1
inst✝⁵ : NormedRing A
inst✝⁴ : CompleteSpace A
inst✝³ : StarRing A
inst✝² : CstarRing A
inst✝¹ : NormedAlgebra ℂ A
inst✝ : StarModule ℂ A
x✝ : PartialOrder A := spectralOrder A
x y : A
⊢ (∃ p ∈ AddSubmonoid.closure (Set.range fun s => star s * s), y = x + p) → x ≤ y
tactic: constructor
Theorem: selfZPow_sub_natCast
File: Mathlib/RingTheory/Localization/Away/Basic.lean

Proof steps:
state_before: R : Type u_1
inst✝³ : CommRing R
x : R
B : Type u_2
inst✝² : CommRing B
inst✝¹ : Algebra R B
inst✝ : IsLocalization.Away x B
n m : ℕ
⊢ selfZPow x B (↑n - ↑m) = mk' B (x ^ n) (Submonoid.pow x m)
state_after: case pos
R : Type u_1
inst✝³ : CommRing R
x : R
B : Type u_2
inst✝² : CommRing B
inst✝¹ : Algebra R B
inst✝ : IsLocalization.Away x B
n m : ℕ
h : m ≤ n
⊢ selfZPow x B (↑n - ↑m) = mk' B (x ^ n) (Submonoid.pow x m)

case neg
R : Type u_1
inst✝³ : CommRing R
x : R
B : Type u_2
inst✝² : CommRing B
inst✝¹ : Algebra R B
inst✝ : IsLocalization.Away x B
n m : ℕ
h : ¬m ≤ n
⊢ selfZPow x B (↑n - ↑m) = mk' B (x ^ n) (Submonoid.pow x m)
tactic: by_cases h : m ≤ n
Theorem: Finset.truncatedSup_union_left
File: Mathlib/Combinatorics/SetFamily/AhlswedeZhang.lean

Proof steps:
state_before: α : Type u_1
β : Type u_2
inst✝⁶ : SemilatticeSup α
inst✝⁵ : OrderTop α
inst✝⁴ : DecidableRel fun x x_1 => x ≤ x_1
inst✝³ : SemilatticeSup β
inst✝² : BoundedOrder β
inst✝¹ : DecidableRel fun x x_1 => x ≤ x_1
s t : Finset α
a b : α
inst✝ : DecidableEq α
hs : a ∈ lowerClosure ↑s
ht : a ∉ lowerClosure ↑t
⊢ (s ∪ t).truncatedSup a = s.truncatedSup a
state_after: α : Type u_1
β : Type u_2
inst✝⁶ : SemilatticeSup α
inst✝⁵ : OrderTop α
inst✝⁴ : DecidableRel fun x x_1 => x ≤ x_1
inst✝³ : SemilatticeSup β
inst✝² : BoundedOrder β
inst✝¹ : DecidableRel fun x x_1 => x ≤ x_1
s t : Finset α
a b : α
inst✝ : DecidableEq α
hs : a ∈ lowerClosure ↑s
ht : ∀ x ∈ t, ¬a ≤ x
⊢ (s ∪ t).truncatedSup a = s.truncatedSup a
tactic: simp only [mem_lowerClosure, mem_coe, exists_prop, not_exists, not_and] at ht
state_before: α : Type u_1
β : Type u_2
inst✝⁶ : SemilatticeSup α
inst✝⁵ : OrderTop α
inst✝⁴ : DecidableRel fun x x_1 => x ≤ x_1
inst✝³ : SemilatticeSup β
inst✝² : BoundedOrder β
inst✝¹ : DecidableRel fun x x_1 => x ≤ x_1
s t : Finset α
a b : α
inst✝ : DecidableEq α
hs : a ∈ lowerClosure ↑s
ht : ∀ x ∈ t, ¬a ≤ x
⊢ (s ∪ t).truncatedSup a = s.truncatedSup a
state_after: no goals
tactic: simp only [truncatedSup_of_mem, hs, filter_union, filter_false_of_mem ht, union_empty,
    lower_aux.2 (Or.inl hs), ht]
Theorem: ProbabilityTheory.exponentialPDF_eq
File: Mathlib/Probability/Distributions/Exponential.lean

Proof steps:
state_before: r x : ℝ
⊢ exponentialPDF r x = ENNReal.ofReal (if 0 ≤ x then r * rexp (-(r * x)) else 0)
state_after: r x : ℝ
⊢ ENNReal.ofReal (if 0 ≤ x then r ^ 1 / Gamma 1 * x ^ (1 - 1) * rexp (-(r * x)) else 0) =
    ENNReal.ofReal (if 0 ≤ x then r * rexp (-(r * x)) else 0)
tactic: rw [exponentialPDF, exponentialPDFReal, gammaPDFReal]
state_before: r x : ℝ
⊢ ENNReal.ofReal (if 0 ≤ x then r ^ 1 / Gamma 1 * x ^ (1 - 1) * rexp (-(r * x)) else 0) =
    ENNReal.ofReal (if 0 ≤ x then r * rexp (-(r * x)) else 0)
state_after: no goals
tactic: simp only [rpow_one, Gamma_one, div_one, sub_self, rpow_zero, mul_one]
Theorem: Flow.omegaLimit_image_eq
File: Mathlib/Dynamics/OmegaLimit.lean

Proof steps:
state_before: τ : Type u_1
inst✝³ : TopologicalSpace τ
inst✝² : AddCommGroup τ
inst✝¹ : TopologicalAddGroup τ
α : Type u_2
inst✝ : TopologicalSpace α
f : Filter τ
ϕ : Flow τ α
s : Set α
hf : ∀ (t : τ), Tendsto (fun x => x + t) f f
t : τ
⊢ ω f ϕ.toFun s = ω f ϕ.toFun (ϕ.toFun (-t) '' (ϕ.toFun t '' s))
state_after: no goals
tactic: simp [image_image, ← map_add]
Theorem: WeierstrassCurve.Affine.Y_eq_of_X_eq
File: Mathlib/AlgebraicGeometry/EllipticCurve/Affine.lean

Proof steps:
state_before: R : Type u
inst✝¹ : CommRing R
W✝ : Affine R
F : Type u
inst✝ : Field F
W : Affine F
x₁ x₂ y₁ y₂ : F
h₁ : W.Equation x₁ y₁
h₂ : W.Equation x₂ y₂
hx : x₁ = x₂
⊢ y₁ = y₂ ∨ y₁ = W.negY x₂ y₂
state_after: R : Type u
inst✝¹ : CommRing R
W✝ : Affine R
F : Type u
inst✝ : Field F
W : Affine F
x₁ x₂ y₁ y₂ : F
h₁ : y₁ ^ 2 + W.a₁ * x₁ * y₁ + W.a₃ * y₁ = x₁ ^ 3 + W.a₂ * x₁ ^ 2 + W.a₄ * x₁ + W.a₆
h₂ : y₂ ^ 2 + W.a₁ * x₂ * y₂ + W.a₃ * y₂ = x₂ ^ 3 + W.a₂ * x₂ ^ 2 + W.a₄ * x₂ + W.a₆
hx : x₁ = x₂
⊢ y₁ = y₂ ∨ y₁ = W.negY x₂ y₂
tactic: rw [equation_iff] at h₁ h₂
state_before: R : Type u
inst✝¹ : CommRing R
W✝ : Affine R
F : Type u
inst✝ : Field F
W : Affine F
x₁ x₂ y₁ y₂ : F
h₁ : y₁ ^ 2 + W.a₁ * x₁ * y₁ + W.a₃ * y₁ = x₁ ^ 3 + W.a₂ * x₁ ^ 2 + W.a₄ * x₁ + W.a₆
h₂ : y₂ ^ 2 + W.a₁ * x₂ * y₂ + W.a₃ * y₂ = x₂ ^ 3 + W.a₂ * x₂ ^ 2 + W.a₄ * x₂ + W.a₆
hx : x₁ = x₂
⊢ y₁ = y₂ ∨ y₁ = W.negY x₂ y₂
state_after: R : Type u
inst✝¹ : CommRing R
W✝ : Affine R
F : Type u
inst✝ : Field F
W : Affine F
x₁ x₂ y₁ y₂ : F
h₁ : y₁ ^ 2 + W.a₁ * x₁ * y₁ + W.a₃ * y₁ = x₁ ^ 3 + W.a₂ * x₁ ^ 2 + W.a₄ * x₁ + W.a₆
h₂ : y₂ ^ 2 + W.a₁ * x₂ * y₂ + W.a₃ * y₂ = x₂ ^ 3 + W.a₂ * x₂ ^ 2 + W.a₄ * x₂ + W.a₆
hx : x₁ = x₂
⊢ (y₁ - y₂) * (y₁ - (-y₂ - W.a₁ * x₂ - W.a₃)) = 0
tactic: rw [← sub_eq_zero, ← sub_eq_zero (a := y₁), ← mul_eq_zero, negY]
state_before: R : Type u
inst✝¹ : CommRing R
W✝ : Affine R
F : Type u
inst✝ : Field F
W : Affine F
x₁ x₂ y₁ y₂ : F
h₁ : y₁ ^ 2 + W.a₁ * x₁ * y₁ + W.a₃ * y₁ = x₁ ^ 3 + W.a₂ * x₁ ^ 2 + W.a₄ * x₁ + W.a₆
h₂ : y₂ ^ 2 + W.a₁ * x₂ * y₂ + W.a₃ * y₂ = x₂ ^ 3 + W.a₂ * x₂ ^ 2 + W.a₄ * x₂ + W.a₆
hx : x₁ = x₂
⊢ (y₁ - y₂) * (y₁ - (-y₂ - W.a₁ * x₂ - W.a₃)) = 0
state_after: no goals
tactic: linear_combination (norm := (rw [hx]; ring1)) h₁ - h₂
Theorem: SimpleGraph.card_commonNeighbors_le_degree_right
File: Mathlib/Combinatorics/SimpleGraph/Finite.lean

Proof steps:
state_before: V : Type u_1
G : SimpleGraph V
e : Sym2 V
inst✝¹ : Fintype V
inst✝ : DecidableRel G.Adj
v w : V
⊢ Fintype.card ↑(G.commonNeighbors v w) ≤ G.degree w
state_after: no goals
tactic: simp_rw [commonNeighbors_symm _ v w, card_commonNeighbors_le_degree_left]