1337xyz1337xyz/leandojo-benchmark4-v10 huggingface dataset:
Theorem: Batteries.RBSet.findP?_some
File: .lake/packages/batteries/Batteries/Data/RBMap/Lemmas.lean

tactic: simp [mem_toList]
state_before: α : Type u_1
cmp : α → α → Ordering
cut : α → Ordering
y : α
inst✝¹ : TransCmp cmp
inst✝ : IsStrictCut cmp cut
t : RBSet α cmp
⊢ y ∈ t.val ∧ cut y = Ordering.eq ↔ y ∈ t.toList ∧ cut y = Ordering.eq
state_after: no goals
Theorem: ModularGroup.re_T_smul
File: Mathlib/NumberTheory/Modular.lean

tactic: simpa using re_T_zpow_smul z 1
state_before: g : SL(2, ℤ)
z : ℍ
⊢ (T • z).re = z.re + 1
state_after: no goals
Theorem: NonUnitalStarAlgHom.fst_prod
File: Mathlib/Algebra/Star/StarAlgHom.lean

tactic: ext
state_before: R : Type u_1
A : Type u_2
B : Type u_3
C : Type u_4
inst✝⁹ : Monoid R
inst✝⁸ : NonUnitalNonAssocSemiring A
inst✝⁷ : DistribMulAction R A
inst✝⁶ : Star A
inst✝⁵ : NonUnitalNonAssocSemiring B
inst✝⁴ : DistribMulAction R B
inst✝³ : Star B
inst✝² : NonUnitalNonAssocSemiring C
inst✝¹ : DistribMulAction R C
inst✝ : Star C
f : A →⋆ₙₐ[R] B
g : A →⋆ₙₐ[R] C
⊢ (fst R B C).comp (f.prod g) = f
state_after: case h
R : Type u_1
A : Type u_2
B : Type u_3
C : Type u_4
inst✝⁹ : Monoid R
inst✝⁸ : NonUnitalNonAssocSemiring A
inst✝⁷ : DistribMulAction R A
inst✝⁶ : Star A
inst✝⁵ : NonUnitalNonAssocSemiring B
inst✝⁴ : DistribMulAction R B
inst✝³ : Star B
inst✝² : NonUnitalNonAssocSemiring C
inst✝¹ : DistribMulAction R C
inst✝ : Star C
f : A →⋆ₙₐ[R] B
g : A →⋆ₙₐ[R] C
x✝ : A
⊢ ((fst R B C).comp (f.prod g)) x✝ = f x✝

tactic: rfl
state_before: case h
R : Type u_1
A : Type u_2
B : Type u_3
C : Type u_4
inst✝⁹ : Monoid R
inst✝⁸ : NonUnitalNonAssocSemiring A
inst✝⁷ : DistribMulAction R A
inst✝⁶ : Star A
inst✝⁵ : NonUnitalNonAssocSemiring B
inst✝⁴ : DistribMulAction R B
inst✝³ : Star B
inst✝² : NonUnitalNonAssocSemiring C
inst✝¹ : DistribMulAction R C
inst✝ : Star C
f : A →⋆ₙₐ[R] B
g : A →⋆ₙₐ[R] C
x✝ : A
⊢ ((fst R B C).comp (f.prod g)) x✝ = f x✝
state_after: no goals
Theorem: Num.sub_to_nat
File: Mathlib/Data/Num/Lemmas.lean

tactic: rw [ofZNum_toNat, cast_sub', ← to_nat_to_int, ← to_nat_to_int, Int.toNat_sub]
state_before: α : Type u_1
m n : Num
⊢ ↑(ofZNum (m.sub' n)) = ↑m - ↑n
state_after: no goals
Theorem: MvPFunctor.const.get_map
File: Mathlib/Data/PFunctor/Multivariate/Basic.lean

tactic: cases x
state_before: n m : ℕ
P : MvPFunctor.{u} n
A : Type u
α β : TypeVec.{u} n
f : α ⟹ β
x : ↑(const n A) α
⊢ get (f <$$> x) = get x
state_after: case mk
n m : ℕ
P : MvPFunctor.{u} n
A : Type u
α β : TypeVec.{u} n
f : α ⟹ β
fst✝ : (const n A).A
snd✝ : (const n A).B fst✝ ⟹ α
⊢ get (f <$$> ⟨fst✝, snd✝⟩) = get ⟨fst✝, snd✝⟩

tactic: rfl
state_before: case mk
n m : ℕ
P : MvPFunctor.{u} n
A : Type u
α β : TypeVec.{u} n
f : α ⟹ β
fst✝ : (const n A).A
snd✝ : (const n A).B fst✝ ⟹ α
⊢ get (f <$$> ⟨fst✝, snd✝⟩) = get ⟨fst✝, snd✝⟩
state_after: no goals
Theorem: Rat.floor_def'
File: Mathlib/Data/Rat/Floor.lean

tactic: rw [Rat.floor]
state_before: α : Type u_1
inst✝¹ : LinearOrderedField α
inst✝ : FloorRing α
a : ℚ
⊢ a.floor = a.num / ↑a.den
state_after: α : Type u_1
inst✝¹ : LinearOrderedField α
inst✝ : FloorRing α
a : ℚ
⊢ (if a.den = 1 then a.num else a.num / ↑a.den) = a.num / ↑a.den

tactic: split
state_before: α : Type u_1
inst✝¹ : LinearOrderedField α
inst✝ : FloorRing α
a : ℚ
⊢ (if a.den = 1 then a.num else a.num / ↑a.den) = a.num / ↑a.den
state_after: case isTrue
α : Type u_1
inst✝¹ : LinearOrderedField α
inst✝ : FloorRing α
a : ℚ
h✝ : a.den = 1
⊢ a.num = a.num / ↑a.den

case isFalse
α : Type u_1
inst✝¹ : LinearOrderedField α
inst✝ : FloorRing α
a : ℚ
h✝ : ¬a.den = 1
⊢ a.num / ↑a.den = a.num / ↑a.den

tactic: next h => simp [h]
state_before: case isTrue
α : Type u_1
inst✝¹ : LinearOrderedField α
inst✝ : FloorRing α
a : ℚ
h✝ : a.den = 1
⊢ a.num = a.num / ↑a.den
state_after: no goals

tactic: simp [h]
state_before: α : Type u_1
inst✝¹ : LinearOrderedField α
inst✝ : FloorRing α
a : ℚ
h : a.den = 1
⊢ a.num = a.num / ↑a.den
state_after: no goals

tactic: next => rfl
state_before: case isFalse
α : Type u_1
inst✝¹ : LinearOrderedField α
inst✝ : FloorRing α
a : ℚ
h✝ : ¬a.den = 1
⊢ a.num / ↑a.den = a.num / ↑a.den
state_after: no goals

tactic: rfl
state_before: α : Type u_1
inst✝¹ : LinearOrderedField α
inst✝ : FloorRing α
a : ℚ
h✝ : ¬a.den = 1
⊢ a.num / ↑a.den = a.num / ↑a.den
state_after: no goals
Theorem: CategoryTheory.MonoidalCategory.associator_inv_naturality_left
File: Mathlib/CategoryTheory/Monoidal/Category.lean

tactic: simp
state_before: C✝ : Type u
𝒞 : Category.{v, u} C✝
inst✝² : MonoidalCategory C✝
C : Type u
inst✝¹ : Category.{v, u} C
inst✝ : MonoidalCategory C
U V W X✝ Y✝ Z✝ X X' : C
f : X ⟶ X'
Y Z : C
⊢ f ▷ (Y ⊗ Z) ≫ (α_ X' Y Z).inv = (α_ X Y Z).inv ≫ f ▷ Y ▷ Z
state_after: no goals
Theorem: RCLike.reCLM_norm
File: Mathlib/Analysis/RCLike/Lemmas.lean

tactic: apply le_antisymm (LinearMap.mkContinuous_norm_le _ zero_le_one _)
state_before: K : Type u_1
E : Type u_2
inst✝ : RCLike K
⊢ ‖reCLM‖ = 1
state_after: K : Type u_1
E : Type u_2
inst✝ : RCLike K
⊢ 1 ≤ ‖reLm.mkContinuous 1 ⋯‖

tactic: convert ContinuousLinearMap.ratio_le_opNorm (reCLM : K →L[ℝ] ℝ) (1 : K)
state_before: K : Type u_1
E : Type u_2
inst✝ : RCLike K
⊢ 1 ≤ ‖reLm.mkContinuous 1 ⋯‖
state_after: case h.e'_3
K : Type u_1
E : Type u_2
inst✝ : RCLike K
⊢ 1 = ‖reCLM 1‖ / ‖1‖

tactic: simp
state_before: case h.e'_3
K : Type u_1
E : Type u_2
inst✝ : RCLike K
⊢ 1 = ‖reCLM 1‖ / ‖1‖
state_after: no goals
Theorem: Function.Periodic.sub_nsmul_eq
File: Mathlib/Algebra/Periodic.lean

tactic: simpa only [sub_eq_add_neg] using h.neg_nsmul n x
state_before: α : Type u_1
β : Type u_2
γ : Type u_3
f g : α → β
c c₁ c₂ x : α
inst✝ : AddGroup α
h : Periodic f c
n : ℕ
⊢ f (x - n • c) = f x
state_after: no goals
Theorem: Finset.sum_card
File: Mathlib/Algebra/Order/BigOperators/Group/Finset.lean

tactic: simp_rw [Fintype.card, ← sum_card_inter fun a _ ↦ h a, univ_inter]
state_before: ι : Type u_1
α : Type u_2
β : Type u_3
M : Type u_4
N : Type u_5
G : Type u_6
k : Type u_7
R : Type u_8
inst✝¹ : DecidableEq α
s : Finset α
B : Finset (Finset α)
n : ℕ
inst✝ : Fintype α
h : ∀ (a : α), (filter (fun x => a ∈ x) B).card = n
⊢ ∑ s ∈ B, s.card = Fintype.card α * n
state_after: no goals
Theorem: InnerProductSpace.Core.inner_zero_left
File: Mathlib/Analysis/InnerProductSpace/Basic.lean

tactic: rw [← zero_smul 𝕜 (0 : F), inner_smul_left]
state_before: 𝕜 : Type u_1
E : Type u_2
F : Type u_3
inst✝² : _root_.RCLike 𝕜
inst✝¹ : AddCommGroup F
inst✝ : Module 𝕜 F
c : Core 𝕜 F
x : F
⊢ ⟪0, x⟫_𝕜 = 0
state_after: 𝕜 : Type u_1
E : Type u_2
F : Type u_3
inst✝² : _root_.RCLike 𝕜
inst✝¹ : AddCommGroup F
inst✝ : Module 𝕜 F
c : Core 𝕜 F
x : F
⊢ (starRingEnd 𝕜) 0 * ⟪0, x⟫_𝕜 = 0

tactic: simp only [zero_mul, RingHom.map_zero]
state_before: 𝕜 : Type u_1
E : Type u_2
F : Type u_3
inst✝² : _root_.RCLike 𝕜
inst✝¹ : AddCommGroup F
inst✝ : Module 𝕜 F
c : Core 𝕜 F
x : F
⊢ (starRingEnd 𝕜) 0 * ⟪0, x⟫_𝕜 = 0
state_after: no goals
Theorem: Set.star_singleton
File: Mathlib/Algebra/Star/Pointwise.lean

tactic: ext1 y
state_before: α : Type u_1
s t : Set α
a : α
β : Type u_2
inst✝ : InvolutiveStar β
x : β
⊢ {x}⋆ = {x⋆}
state_after: case h
α : Type u_1
s t : Set α
a : α
β : Type u_2
inst✝ : InvolutiveStar β
x y : β
⊢ y ∈ {x}⋆ ↔ y ∈ {x⋆}

tactic: rw [mem_star, mem_singleton_iff, mem_singleton_iff, star_eq_iff_star_eq, eq_comm]
state_before: case h
α : Type u_1
s t : Set α
a : α
β : Type u_2
inst✝ : InvolutiveStar β
x y : β
⊢ y ∈ {x}⋆ ↔ y ∈ {x⋆}
state_after: no goals
Theorem: constant_of_monotone_antitone
File: Mathlib/Order/Directed.lean

tactic: obtain ⟨c, hac, hbc⟩ := exists_ge_ge a b
state_before: α : Type u
β : Type v
ι : Sort w
r r' s✝ : α → α → Prop
inst✝² : Preorder α
a✝ : α
inst✝¹ : PartialOrder β
f : α → β
s : Set α
inst✝ : IsDirected α fun x x_1 => x ≤ x_1
hf : Monotone f
hf' : Antitone f
a b : α
⊢ f a = f b
state_after: case intro.intro
α : Type u
β : Type v
ι : Sort w
r r' s✝ : α → α → Prop
inst✝² : Preorder α
a✝ : α
inst✝¹ : PartialOrder β
f : α → β
s : Set α
inst✝ : IsDirected α fun x x_1 => x ≤ x_1
hf : Monotone f
hf' : Antitone f
a b c : α
hac : a ≤ c
hbc : b ≤ c
⊢ f a = f b

tactic: exact le_antisymm ((hf hac).trans $ hf' hbc) ((hf hbc).trans $ hf' hac)
state_before: case intro.intro
α : Type u
β : Type v
ι : Sort w
r r' s✝ : α → α → Prop
inst✝² : Preorder α
a✝ : α
inst✝¹ : PartialOrder β
f : α → β
s : Set α
inst✝ : IsDirected α fun x x_1 => x ≤ x_1
hf : Monotone f
hf' : Antitone f
a b c : α
hac : a ≤ c
hbc : b ≤ c
⊢ f a = f b
state_after: no goals
Theorem: imageToKernel_arrow_apply
File: Mathlib/Algebra/Homology/ImageToKernel.lean

tactic: rw [← comp_apply, imageToKernel_arrow]
state_before: ι : Type u_1
V : Type u
inst✝⁴ : Category.{v, u} V
inst✝³ : HasZeroMorphisms V
A B C : V
f : A ⟶ B
inst✝² : HasImage f
g : B ⟶ C
inst✝¹ : HasKernel g
inst✝ : ConcreteCategory V
w : f ≫ g = 0
x : (forget V).obj (Subobject.underlying.obj (imageSubobject f))
⊢ (kernelSubobject g).arrow ((imageToKernel f g w) x) = (imageSubobject f).arrow x
state_after: no goals
Theorem: CoxeterSystem.simple_mul_simple_cancel_right
File: Mathlib/GroupTheory/Coxeter/Basic.lean

tactic: simp [mul_assoc]
state_before: B : Type u_1
B' : Type u_2
e : B ≃ B'
W : Type u_3
H : Type u_4
inst✝¹ : Group W
inst✝ : Group H
M : CoxeterMatrix B
cs : CoxeterSystem M W
w : W
i : B
⊢ w * cs.simple i * cs.simple i = w
state_after: no goals
Theorem: TopCat.snd_openEmbedding_of_left_openEmbedding
File: Mathlib/Topology/Category/TopCat/Limits/Pullbacks.lean

tactic: convert (homeoOfIso (asIso (pullback.snd : pullback (𝟙 S) g ⟶ _))).openEmbedding.comp
    (pullback_map_openEmbedding_of_open_embeddings (i₂ := 𝟙 Y) f g (𝟙 _) g H
      (homeoOfIso (Iso.refl _)).openEmbedding (𝟙 _) rfl (by simp))
state_before: J : Type v
inst✝ : SmallCategory J
X✝ Y✝ Z : TopCat
X Y S : TopCat
f : X ⟶ S
H : OpenEmbedding ⇑f
g : Y ⟶ S
⊢ OpenEmbedding ⇑pullback.snd
state_after: case h.e'_5
J : Type v
inst✝ : SmallCategory J
X✝ Y✝ Z : TopCat
X Y S : TopCat
f : X ⟶ S
H : OpenEmbedding ⇑f
g : Y ⟶ S
⊢ ⇑pullback.snd = ⇑(homeoOfIso (asIso pullback.snd)) ∘ ⇑(pullback.map f g (𝟙 S) g f (𝟙 Y) (𝟙 S) ⋯ ⋯)

tactic: erw [← coe_comp]
state_before: case h.e'_5
J : Type v
inst✝ : SmallCategory J
X✝ Y✝ Z : TopCat
X Y S : TopCat
f : X ⟶ S
H : OpenEmbedding ⇑f
g : Y ⟶ S
⊢ ⇑pullback.snd = ⇑(homeoOfIso (asIso pullback.snd)) ∘ ⇑(pullback.map f g (𝟙 S) g f (𝟙 Y) (𝟙 S) ⋯ ⋯)
state_after: case h.e'_5
J : Type v
inst✝ : SmallCategory J
X✝ Y✝ Z : TopCat
X Y S : TopCat
f : X ⟶ S
H : OpenEmbedding ⇑f
g : Y ⟶ S
⊢ ⇑pullback.snd = ⇑(pullback.map f g (𝟙 S) g f (𝟙 Y) (𝟙 S) ⋯ ⋯ ≫ (asIso pullback.snd).hom)

tactic: simp
state_before: case h.e'_5
J : Type v
inst✝ : SmallCategory J
X✝ Y✝ Z : TopCat
X Y S : TopCat
f : X ⟶ S
H : OpenEmbedding ⇑f
g : Y ⟶ S
⊢ ⇑pullback.snd = ⇑(pullback.map f g (𝟙 S) g f (𝟙 Y) (𝟙 S) ⋯ ⋯ ≫ (asIso pullback.snd).hom)
state_after: no goals

tactic: simp
state_before: J : Type v
inst✝ : SmallCategory J
X✝ Y✝ Z : TopCat
X Y S : TopCat
f : X ⟶ S
H : OpenEmbedding ⇑f
g : Y ⟶ S
⊢ g ≫ 𝟙 S = 𝟙 Y ≫ g
state_after: no goals
Theorem: Finset.filter_lt_eq_Ioi
File: Mathlib/Order/Interval/Finset/Basic.lean

tactic: ext
state_before: ι : Type u_1
α : Type u_2
inst✝³ : Preorder α
inst✝² : LocallyFiniteOrderTop α
a : α
inst✝¹ : Fintype α
inst✝ : DecidablePred fun x => a < x
⊢ filter (fun x => a < x) univ = Ioi a
state_after: case a
ι : Type u_1
α : Type u_2
inst✝³ : Preorder α
inst✝² : LocallyFiniteOrderTop α
a : α
inst✝¹ : Fintype α
inst✝ : DecidablePred fun x => a < x
a✝ : α
⊢ a✝ ∈ filter (fun x => a < x) univ ↔ a✝ ∈ Ioi a

tactic: simp
state_before: case a
ι : Type u_1
α : Type u_2
inst✝³ : Preorder α
inst✝² : LocallyFiniteOrderTop α
a : α
inst✝¹ : Fintype α
inst✝ : DecidablePred fun x => a < x
a✝ : α
⊢ a✝ ∈ filter (fun x => a < x) univ ↔ a✝ ∈ Ioi a
state_after: no goals
Theorem: mabs_eq_mabs
File: Mathlib/Algebra/Order/Group/Abs.lean

tactic: refine ⟨fun h ↦ ?_, by rintro (h | h) <;> simp [h, abs_neg]⟩
state_before: α : Type u_1
inst✝¹ : Group α
inst✝ : LinearOrder α
a b : α
⊢ mabs a = mabs b ↔ a = b ∨ a = b⁻¹
state_after: α : Type u_1
inst✝¹ : Group α
inst✝ : LinearOrder α
a b : α
h : mabs a = mabs b
⊢ a = b ∨ a = b⁻¹

tactic: obtain rfl | rfl := eq_or_eq_inv_of_mabs_eq h <;>
  simpa only [inv_eq_iff_eq_inv (a := |b|ₘ), inv_inv, inv_inj, or_comm] using mabs_choice b
state_before: α : Type u_1
inst✝¹ : Group α
inst✝ : LinearOrder α
a b : α
h : mabs a = mabs b
⊢ a = b ∨ a = b⁻¹
state_after: no goals

tactic: rintro (h | h) <;> simp [h, abs_neg]
state_before: α : Type u_1
inst✝¹ : Group α
inst✝ : LinearOrder α
a b : α
⊢ a = b ∨ a = b⁻¹ → mabs a = mabs b
state_after: no goals
Theorem: MeasureTheory.SignedMeasure.restrictNonposSeq_lt
File: Mathlib/MeasureTheory/Decomposition/SignedHahn.lean

tactic: rw [restrictNonposSeq_succ]
state_before: α : Type u_1
β : Type u_2
inst✝³ : MeasurableSpace α
M : Type u_3
inst✝² : AddCommMonoid M
inst✝¹ : TopologicalSpace M
inst✝ : OrderedAddCommMonoid M
s : SignedMeasure α
i j : Set α
n : ℕ
hn :
  ¬restrict s (i \ ⋃ k, ⋃ (_ : k ≤ n), MeasureTheory.SignedMeasure.restrictNonposSeq s i k) ≤
      restrict 0 (i \ ⋃ k, ⋃ (_ : k ≤ n), MeasureTheory.SignedMeasure.restrictNonposSeq s i k)
⊢ 1 /
      (↑(MeasureTheory.SignedMeasure.findExistsOneDivLT s
            (i \ ⋃ k, ⋃ (_ : k ≤ n), MeasureTheory.SignedMeasure.restrictNonposSeq s i k)) +
        1) <
    ↑s (MeasureTheory.SignedMeasure.restrictNonposSeq s i n.succ)
state_after: α : Type u_1
β : Type u_2
inst✝³ : MeasurableSpace α
M : Type u_3
inst✝² : AddCommMonoid M
inst✝¹ : TopologicalSpace M
inst✝ : OrderedAddCommMonoid M
s : SignedMeasure α
i j : Set α
n : ℕ
hn :
  ¬restrict s (i \ ⋃ k, ⋃ (_ : k ≤ n), MeasureTheory.SignedMeasure.restrictNonposSeq s i k) ≤
      restrict 0 (i \ ⋃ k, ⋃ (_ : k ≤ n), MeasureTheory.SignedMeasure.restrictNonposSeq s i k)
⊢ 1 /
      (↑(MeasureTheory.SignedMeasure.findExistsOneDivLT s
            (i \ ⋃ k, ⋃ (_ : k ≤ n), MeasureTheory.SignedMeasure.restrictNonposSeq s i k)) +
        1) <
    ↑s
      (MeasureTheory.SignedMeasure.someExistsOneDivLT s
        (i \ ⋃ k, ⋃ (_ : k ≤ n), MeasureTheory.SignedMeasure.restrictNonposSeq s i k))

tactic: apply someExistsOneDivLT_lt hn
state_before: α : Type u_1
β : Type u_2
inst✝³ : MeasurableSpace α
M : Type u_3
inst✝² : AddCommMonoid M
inst✝¹ : TopologicalSpace M
inst✝ : OrderedAddCommMonoid M
s : SignedMeasure α
i j : Set α
n : ℕ
hn :
  ¬restrict s (i \ ⋃ k, ⋃ (_ : k ≤ n), MeasureTheory.SignedMeasure.restrictNonposSeq s i k) ≤
      restrict 0 (i \ ⋃ k, ⋃ (_ : k ≤ n), MeasureTheory.SignedMeasure.restrictNonposSeq s i k)
⊢ 1 /
      (↑(MeasureTheory.SignedMeasure.findExistsOneDivLT s
            (i \ ⋃ k, ⋃ (_ : k ≤ n), MeasureTheory.SignedMeasure.restrictNonposSeq s i k)) +
        1) <
    ↑s
      (MeasureTheory.SignedMeasure.someExistsOneDivLT s
        (i \ ⋃ k, ⋃ (_ : k ≤ n), MeasureTheory.SignedMeasure.restrictNonposSeq s i k))
state_after: no goals
Theorem: CategoryTheory.Functor.additive_of_preserves_binary_products
File: Mathlib/CategoryTheory/Preadditive/AdditiveFunctor.lean

tactic: have : HasBinaryBiproducts C := HasBinaryBiproducts.of_hasBinaryProducts
state_before: C : Type u₁
D : Type u₂
inst✝⁶ : Category.{v₁, u₁} C
inst✝⁵ : Category.{v₂, u₂} D
inst✝⁴ : Preadditive C
inst✝³ : Preadditive D
F : C ⥤ D
inst✝² : HasBinaryProducts C
inst✝¹ : PreservesLimitsOfShape (Discrete WalkingPair) F
inst✝ : F.PreservesZeroMorphisms
⊢ F.Additive
state_after: C : Type u₁
D : Type u₂
inst✝⁶ : Category.{v₁, u₁} C
inst✝⁵ : Category.{v₂, u₂} D
inst✝⁴ : Preadditive C
inst✝³ : Preadditive D
F : C ⥤ D
inst✝² : HasBinaryProducts C
inst✝¹ : PreservesLimitsOfShape (Discrete WalkingPair) F
inst✝ : F.PreservesZeroMorphisms
this : HasBinaryBiproducts C
⊢ F.Additive

tactic: have := preservesBinaryBiproductsOfPreservesBinaryProducts F
state_before: C : Type u₁
D : Type u₂
inst✝⁶ : Category.{v₁, u₁} C
inst✝⁵ : Category.{v₂, u₂} D
inst✝⁴ : Preadditive C
inst✝³ : Preadditive D
F : C ⥤ D
inst✝² : HasBinaryProducts C
inst✝¹ : PreservesLimitsOfShape (Discrete WalkingPair) F
inst✝ : F.PreservesZeroMorphisms
this : HasBinaryBiproducts C
⊢ F.Additive
state_after: C : Type u₁
D : Type u₂
inst✝⁶ : Category.{v₁, u₁} C
inst✝⁵ : Category.{v₂, u₂} D
inst✝⁴ : Preadditive C
inst✝³ : Preadditive D
F : C ⥤ D
inst✝² : HasBinaryProducts C
inst✝¹ : PreservesLimitsOfShape (Discrete WalkingPair) F
inst✝ : F.PreservesZeroMorphisms
this✝ : HasBinaryBiproducts C
this : PreservesBinaryBiproducts F
⊢ F.Additive

tactic: exact Functor.additive_of_preservesBinaryBiproducts F
state_before: C : Type u₁
D : Type u₂
inst✝⁶ : Category.{v₁, u₁} C
inst✝⁵ : Category.{v₂, u₂} D
inst✝⁴ : Preadditive C
inst✝³ : Preadditive D
F : C ⥤ D
inst✝² : HasBinaryProducts C
inst✝¹ : PreservesLimitsOfShape (Discrete WalkingPair) F
inst✝ : F.PreservesZeroMorphisms
this✝ : HasBinaryBiproducts C
this : PreservesBinaryBiproducts F
⊢ F.Additive
state_after: no goals
Theorem: List.getD_append_right
File: Mathlib/Data/List/GetD.lean

tactic: rw [getD_eq_get (l ++ l') d h', get_eq_getElem, getElem_append_right, getD_eq_get,
  get_eq_getElem]
state_before: case inl
α : Type u
β : Type v
l✝ : List α
x : α
xs : List α
n✝ : ℕ
d✝ : α
l l' : List α
d : α
n : ℕ
h : l.length ≤ n
h' : n < (l ++ l').length
⊢ (l ++ l').getD n d = l'.getD (n - l.length) d
state_after: case inl.hn
α : Type u
β : Type v
l✝ : List α
x : α
xs : List α
n✝ : ℕ
d✝ : α
l l' : List α
d : α
n : ℕ
h : l.length ≤ n
h' : n < (l ++ l').length
⊢ n - l.length < l'.length

case inl.h
α : Type u
β : Type v
l✝ : List α
x : α
xs : List α
n✝ : ℕ
d✝ : α
l l' : List α
d : α
n : ℕ
h : l.length ≤ n
h' : n < (l ++ l').length
⊢ ¬↑⟨n, h'⟩ < l.length

tactic: rw [length_append] at h'
state_before: case inl.hn
α : Type u
β : Type v
l✝ : List α
x : α
xs : List α
n✝ : ℕ
d✝ : α
l l' : List α
d : α
n : ℕ
h : l.length ≤ n
h' : n < (l ++ l').length
⊢ n - l.length < l'.length
state_after: case inl.hn
α : Type u
β : Type v
l✝ : List α
x : α
xs : List α
n✝ : ℕ
d✝ : α
l l' : List α
d : α
n : ℕ
h : l.length ≤ n
h' : n < l.length + l'.length
⊢ n - l.length < l'.length

tactic: exact Nat.sub_lt_left_of_lt_add h h'
state_before: case inl.hn
α : Type u
β : Type v
l✝ : List α
x : α
xs : List α
n✝ : ℕ
d✝ : α
l l' : List α
d : α
n : ℕ
h : l.length ≤ n
h' : n < l.length + l'.length
⊢ n - l.length < l'.length
state_after: no goals

tactic: exact Nat.not_lt_of_le h
state_before: case inl.h
α : Type u
β : Type v
l✝ : List α
x : α
xs : List α
n✝ : ℕ
d✝ : α
l l' : List α
d : α
n : ℕ
h : l.length ≤ n
h' : n < (l ++ l').length
⊢ ¬↑⟨n, h'⟩ < l.length
state_after: no goals

tactic: rw [getD_eq_default _ _ h', getD_eq_default]
state_before: case inr
α : Type u
β : Type v
l✝ : List α
x : α
xs : List α
n✝ : ℕ
d✝ : α
l l' : List α
d : α
n : ℕ
h : l.length ≤ n
h' : n ≥ (l ++ l').length
⊢ (l ++ l').getD n d = l'.getD (n - l.length) d
state_after: case inr.hn
α : Type u
β : Type v
l✝ : List α
x : α
xs : List α
n✝ : ℕ
d✝ : α
l l' : List α
d : α
n : ℕ
h : l.length ≤ n
h' : n ≥ (l ++ l').length
⊢ l'.length ≤ n - l.length

tactic: rwa [Nat.le_sub_iff_add_le' h, ← length_append]
state_before: case inr.hn
α : Type u
β : Type v
l✝ : List α
x : α
xs : List α
n✝ : ℕ
d✝ : α
l l' : List α
d : α
n : ℕ
h : l.length ≤ n
h' : n ≥ (l ++ l').length
⊢ l'.length ≤ n - l.length
state_after: no goals
Theorem: ciInf_div
File: Mathlib/Algebra/Bounds.lean

tactic: simp only [div_eq_mul_inv, ciInf_mul hf]
state_before: ι : Type u_1
G : Type u_2
inst✝³ : Group G
inst✝² : ConditionallyCompleteLattice G
inst✝¹ : CovariantClass G G (swap fun x x_1 => x * x_1) fun x x_1 => x ≤ x_1
inst✝ : Nonempty ι
f : ι → G
hf : BddBelow (range f)
a : G
⊢ (⨅ i, f i) / a = ⨅ i, f i / a
state_after: no goals
Theorem: SimpleGraph.Walk.IsTrail.rotate
File: Mathlib/Combinatorics/SimpleGraph/Connectivity.lean

tactic: rw [isTrail_def, (c.rotate_edges h).perm.nodup_iff]
state_before: V : Type u
V' : Type v
V'' : Type w
G : SimpleGraph V
G' : SimpleGraph V'
G'' : SimpleGraph V''
u✝ v✝ w x y : V
inst✝ : DecidableEq V
u v : V
c : G.Walk v v
hc : c.IsTrail
h : u ∈ c.support
⊢ (c.rotate h).IsTrail
state_after: V : Type u
V' : Type v
V'' : Type w
G : SimpleGraph V
G' : SimpleGraph V'
G'' : SimpleGraph V''
u✝ v✝ w x y : V
inst✝ : DecidableEq V
u v : V
c : G.Walk v v
hc : c.IsTrail
h : u ∈ c.support
⊢ c.edges.Nodup

tactic: exact hc.edges_nodup
state_before: V : Type u
V' : Type v
V'' : Type w
G : SimpleGraph V
G' : SimpleGraph V'
G'' : SimpleGraph V''
u✝ v✝ w x y : V
inst✝ : DecidableEq V
u v : V
c : G.Walk v v
hc : c.IsTrail
h : u ∈ c.support
⊢ c.edges.Nodup
state_after: no goals
Theorem: Nat.modEq_iff_dvd'
File: Mathlib/Data/Nat/ModEq.lean

tactic: rw [modEq_iff_dvd, ← Int.natCast_dvd_natCast, Int.ofNat_sub h]
state_before: m n a b c d : ℕ
h : a ≤ b
⊢ a ≡ b [MOD n] ↔ n ∣ b - a
state_after: no goals
Theorem: le_levenshtein_append
File: Mathlib/Data/List/EditDistance/Bounds.lean

tactic: simpa [suffixLevenshtein_eq_tails_map, List.minimum_le_coe_iff] using
  suffixLevenshtein_minimum_le_levenshtein_append (δ := δ) xs ys₁ ys₂
state_before: α : Type u_1
β : Type u_2
δ : Type u_3
C : Levenshtein.Cost α β δ
inst✝ : CanonicallyLinearOrderedAddCommMonoid δ
xs : List α
ys₁ ys₂ : List β
⊢ ∃ xs', xs' <:+ xs ∧ levenshtein C xs' ys₂ ≤ levenshtein C xs (ys₁ ++ ys₂)
state_after: no goals
Theorem: Set.Finite.isLindelof_sUnion
File: Mathlib/Topology/Compactness/Lindelof.lean

tactic: rw [sUnion_eq_biUnion]
state_before: X : Type u
Y : Type v
ι : Type u_1
inst✝¹ : TopologicalSpace X
inst✝ : TopologicalSpace Y
s t : Set X
S : Set (Set X)
hf : S.Finite
hc : ∀ s ∈ S, IsLindelof s
⊢ IsLindelof (⋃₀ S)
state_after: X : Type u
Y : Type v
ι : Type u_1
inst✝¹ : TopologicalSpace X
inst✝ : TopologicalSpace Y
s t : Set X
S : Set (Set X)
hf : S.Finite
hc : ∀ s ∈ S, IsLindelof s
⊢ IsLindelof (⋃ i ∈ S, i)

tactic: exact hf.isLindelof_biUnion hc
state_before: X : Type u
Y : Type v
ι : Type u_1
inst✝¹ : TopologicalSpace X
inst✝ : TopologicalSpace Y
s t : Set X
S : Set (Set X)
hf : S.Finite
hc : ∀ s ∈ S, IsLindelof s
⊢ IsLindelof (⋃ i ∈ S, i)
state_after: no goals
Theorem: exists_floor
File: Mathlib/Algebra/Order/Archimedean.lean

tactic: haveI := Classical.propDecidable
state_before: α : Type u_1
M : Type u_2
inst✝¹ : StrictOrderedRing α
inst✝ : Archimedean α
x : α
⊢ ∃ fl, ∀ (z : ℤ), z ≤ fl ↔ ↑z ≤ x
state_after: α : Type u_1
M : Type u_2
inst✝¹ : StrictOrderedRing α
inst✝ : Archimedean α
x : α
this : (a : Prop) → Decidable a
⊢ ∃ fl, ∀ (z : ℤ), z ≤ fl ↔ ↑z ≤ x

tactic: have : ∃ ub : ℤ, (ub : α) ≤ x ∧ ∀ z : ℤ, (z : α) ≤ x → z ≤ ub :=
  Int.exists_greatest_of_bdd
    (let ⟨n, hn⟩ := exists_int_gt x
    ⟨n, fun z h' => Int.cast_le.1 <| le_trans h' <| le_of_lt hn⟩)
    (let ⟨n, hn⟩ := exists_int_lt x
    ⟨n, le_of_lt hn⟩)
state_before: α : Type u_1
M : Type u_2
inst✝¹ : StrictOrderedRing α
inst✝ : Archimedean α
x : α
this : (a : Prop) → Decidable a
⊢ ∃ fl, ∀ (z : ℤ), z ≤ fl ↔ ↑z ≤ x
state_after: α : Type u_1
M : Type u_2
inst✝¹ : StrictOrderedRing α
inst✝ : Archimedean α
x : α
this✝ : (a : Prop) → Decidable a
this : ∃ ub, ↑ub ≤ x ∧ ∀ (z : ℤ), ↑z ≤ x → z ≤ ub
⊢ ∃ fl, ∀ (z : ℤ), z ≤ fl ↔ ↑z ≤ x

tactic: refine this.imp fun fl h z => ?_
state_before: α : Type u_1
M : Type u_2
inst✝¹ : StrictOrderedRing α
inst✝ : Archimedean α
x : α
this✝ : (a : Prop) → Decidable a
this : ∃ ub, ↑ub ≤ x ∧ ∀ (z : ℤ), ↑z ≤ x → z ≤ ub
⊢ ∃ fl, ∀ (z : ℤ), z ≤ fl ↔ ↑z ≤ x
state_after: α : Type u_1
M : Type u_2
inst✝¹ : StrictOrderedRing α
inst✝ : Archimedean α
x : α
this✝ : (a : Prop) → Decidable a
this : ∃ ub, ↑ub ≤ x ∧ ∀ (z : ℤ), ↑z ≤ x → z ≤ ub
fl : ℤ
h : ↑fl ≤ x ∧ ∀ (z : ℤ), ↑z ≤ x → z ≤ fl
z : ℤ
⊢ z ≤ fl ↔ ↑z ≤ x

tactic: cases' h with h₁ h₂
state_before: α : Type u_1
M : Type u_2
inst✝¹ : StrictOrderedRing α
inst✝ : Archimedean α
x : α
this✝ : (a : Prop) → Decidable a
this : ∃ ub, ↑ub ≤ x ∧ ∀ (z : ℤ), ↑z ≤ x → z ≤ ub
fl : ℤ
h : ↑fl ≤ x ∧ ∀ (z : ℤ), ↑z ≤ x → z ≤ fl
z : ℤ
⊢ z ≤ fl ↔ ↑z ≤ x
state_after: case intro
α : Type u_1
M : Type u_2
inst✝¹ : StrictOrderedRing α
inst✝ : Archimedean α
x : α
this✝ : (a : Prop) → Decidable a
this : ∃ ub, ↑ub ≤ x ∧ ∀ (z : ℤ), ↑z ≤ x → z ≤ ub
fl z : ℤ
h₁ : ↑fl ≤ x
h₂ : ∀ (z : ℤ), ↑z ≤ x → z ≤ fl
⊢ z ≤ fl ↔ ↑z ≤ x

tactic: exact ⟨fun h => le_trans (Int.cast_le.2 h) h₁, h₂ z⟩
state_before: case intro
α : Type u_1
M : Type u_2
inst✝¹ : StrictOrderedRing α
inst✝ : Archimedean α
x : α
this✝ : (a : Prop) → Decidable a
this : ∃ ub, ↑ub ≤ x ∧ ∀ (z : ℤ), ↑z ≤ x → z ≤ ub
fl z : ℤ
h₁ : ↑fl ≤ x
h₂ : ∀ (z : ℤ), ↑z ≤ x → z ≤ fl
⊢ z ≤ fl ↔ ↑z ≤ x
state_after: no goals