ruc-ai4math/mathlib_handler_benchmark_410 huggingface dataset:
Theorem: CategoryTheory.Dial.rightUnitor_naturality
File: Mathlib/CategoryTheory/Dialectica/Monoidal.lean

Proof steps:
state_before: C : Type u
inst✝² : Category.{v, u} C
inst✝¹ : HasFiniteProducts C
inst✝ : HasPullbacks C
X Y : Dial C
f : X ⟶ Y
⊢ (f ⊗ 𝟙 (𝟙_ (Dial C))) ≫ (ρ_ Y).hom = (ρ_ X).hom ≫ f
state_after: case hF
C : Type u
inst✝² : Category.{v, u} C
inst✝¹ : HasFiniteProducts C
inst✝ : HasPullbacks C
X Y : Dial C
f : X ⟶ Y
⊢ π(π(π₁ ≫ π₁, π₂) ≫ f.F, terminal.from ((X.src ⨯ ⊤_ C) ⨯ Y.tgt)) =
    π(prod.map π₁ (𝟙 Y.tgt) ≫ f.F, terminal.from ((X.src ⨯ ⊤_ C) ⨯ Y.tgt))
tactic: ext <;> simp
state_before: case hF
C : Type u
inst✝² : Category.{v, u} C
inst✝¹ : HasFiniteProducts C
inst✝ : HasPullbacks C
X Y : Dial C
f : X ⟶ Y
⊢ π(π(π₁ ≫ π₁, π₂) ≫ f.F, terminal.from ((X.src ⨯ ⊤_ C) ⨯ Y.tgt)) =
    π(prod.map π₁ (𝟙 Y.tgt) ≫ f.F, terminal.from ((X.src ⨯ ⊤_ C) ⨯ Y.tgt))
state_after: case hF.h₁
C : Type u
inst✝² : Category.{v, u} C
inst✝¹ : HasFiniteProducts C
inst✝ : HasPullbacks C
X Y : Dial C
f : X ⟶ Y
⊢ π(π(π₁ ≫ π₁, π₂) ≫ f.F, terminal.from ((X.src ⨯ ⊤_ C) ⨯ Y.tgt)) ≫ π₁ =
    π(prod.map π₁ (𝟙 Y.tgt) ≫ f.F, terminal.from ((X.src ⨯ ⊤_ C) ⨯ Y.tgt)) ≫ π₁
tactic: ext
state_before: case hF.h₁
C : Type u
inst✝² : Category.{v, u} C
inst✝¹ : HasFiniteProducts C
inst✝ : HasPullbacks C
X Y : Dial C
f : X ⟶ Y
⊢ π(π(π₁ ≫ π₁, π₂) ≫ f.F, terminal.from ((X.src ⨯ ⊤_ C) ⨯ Y.tgt)) ≫ π₁ =
    π(prod.map π₁ (𝟙 Y.tgt) ≫ f.F, terminal.from ((X.src ⨯ ⊤_ C) ⨯ Y.tgt)) ≫ π₁
state_after: case hF.h₁
C : Type u
inst✝² : Category.{v, u} C
inst✝¹ : HasFiniteProducts C
inst✝ : HasPullbacks C
X Y : Dial C
f : X ⟶ Y
⊢ π(π₁ ≫ π₁, π₂) ≫ f.F = prod.map π₁ (𝟙 Y.tgt) ≫ f.F
tactic: simp
state_before: case hF.h₁
C : Type u
inst✝² : Category.{v, u} C
inst✝¹ : HasFiniteProducts C
inst✝ : HasPullbacks C
X Y : Dial C
f : X ⟶ Y
⊢ π(π₁ ≫ π₁, π₂) ≫ f.F = prod.map π₁ (𝟙 Y.tgt) ≫ f.F
state_after: case hF.h₁.e_a
C : Type u
inst✝² : Category.{v, u} C
inst✝¹ : HasFiniteProducts C
inst✝ : HasPullbacks C
X Y : Dial C
f : X ⟶ Y
⊢ π(π₁ ≫ π₁, π₂) = prod.map π₁ (𝟙 Y.tgt)
tactic: congr 1
state_before: case hF.h₁.e_a
C : Type u
inst✝² : Category.{v, u} C
inst✝¹ : HasFiniteProducts C
inst✝ : HasPullbacks C
X Y : Dial C
f : X ⟶ Y
⊢ π(π₁ ≫ π₁, π₂) = prod.map π₁ (𝟙 Y.tgt)
state_after: no goals
tactic: ext <;> simp
Theorem: Finset.sum_erase_lt_of_pos
File: Mathlib/Algebra/BigOperators/Group/Finset.lean

Proof steps:
state_before: ι : Type u_1
κ : Type u_2
α : Type u_3
β : Type u_4
γ✝ : Type u_5
s✝ s₁ s₂ : Finset α
a : α
f✝ g : α → β
inst✝³ : CommMonoid β
γ : Type u_6
inst✝² : DecidableEq α
inst✝¹ : OrderedCommMonoid γ
inst✝ : CovariantClass γ γ (fun x x_1 => x * x_1) fun x x_1 => x < x_1
s : Finset α
d : α
hd : d ∈ s
f : α → γ
hdf : 1 < f d
⊢ ∏ m ∈ s.erase d, f m < ∏ m ∈ s, f m
state_after: ι : Type u_1
κ : Type u_2
α : Type u_3
β : Type u_4
γ✝ : Type u_5
s✝ s₁ s₂ : Finset α
a : α
f✝ g : α → β
inst✝³ : CommMonoid β
γ : Type u_6
inst✝² : DecidableEq α
inst✝¹ : OrderedCommMonoid γ
inst✝ : CovariantClass γ γ (fun x x_1 => x * x_1) fun x x_1 => x < x_1
s : Finset α
d : α
hd : d ∈ s
f : α → γ
hdf : 1 < f d
⊢ ∏ m ∈ s.erase d, f m < ∏ m ∈ insert d (s.erase d), f m
tactic: conv in ∏ m ∈ s, f m => rw [← Finset.insert_erase hd]
state_before: ι : Type u_1
κ : Type u_2
α : Type u_3
β : Type u_4
γ✝ : Type u_5
s✝ s₁ s₂ : Finset α
a : α
f✝ g : α → β
inst✝³ : CommMonoid β
γ : Type u_6
inst✝² : DecidableEq α
inst✝¹ : OrderedCommMonoid γ
inst✝ : CovariantClass γ γ (fun x x_1 => x * x_1) fun x x_1 => x < x_1
s : Finset α
d : α
hd : d ∈ s
f : α → γ
hdf : 1 < f d
⊢ ∏ m ∈ s.erase d, f m < ∏ m ∈ insert d (s.erase d), f m
state_after: ι : Type u_1
κ : Type u_2
α : Type u_3
β : Type u_4
γ✝ : Type u_5
s✝ s₁ s₂ : Finset α
a : α
f✝ g : α → β
inst✝³ : CommMonoid β
γ : Type u_6
inst✝² : DecidableEq α
inst✝¹ : OrderedCommMonoid γ
inst✝ : CovariantClass γ γ (fun x x_1 => x * x_1) fun x x_1 => x < x_1
s : Finset α
d : α
hd : d ∈ s
f : α → γ
hdf : 1 < f d
⊢ ∏ m ∈ s.erase d, f m < f d * ∏ x ∈ s.erase d, f x
tactic: rw [Finset.prod_insert (Finset.not_mem_erase d s)]
state_before: ι : Type u_1
κ : Type u_2
α : Type u_3
β : Type u_4
γ✝ : Type u_5
s✝ s₁ s₂ : Finset α
a : α
f✝ g : α → β
inst✝³ : CommMonoid β
γ : Type u_6
inst✝² : DecidableEq α
inst✝¹ : OrderedCommMonoid γ
inst✝ : CovariantClass γ γ (fun x x_1 => x * x_1) fun x x_1 => x < x_1
s : Finset α
d : α
hd : d ∈ s
f : α → γ
hdf : 1 < f d
⊢ ∏ m ∈ s.erase d, f m < f d * ∏ x ∈ s.erase d, f x
state_after: no goals
tactic: exact lt_mul_of_one_lt_left' _ hdf
Theorem: isOpen_exterior
File: Mathlib/Topology/AlexandrovDiscrete.lean

Proof steps:
state_before: ι : Sort u_1
κ : ι → Sort u_2
α : Type u_3
β : Type u_4
inst✝³ : TopologicalSpace α
inst✝² : TopologicalSpace β
s t : Set α
a x y : α
inst✝¹ : AlexandrovDiscrete α
inst✝ : AlexandrovDiscrete β
⊢ IsOpen (exterior s)
state_after: ι : Sort u_1
κ : ι → Sort u_2
α : Type u_3
β : Type u_4
inst✝³ : TopologicalSpace α
inst✝² : TopologicalSpace β
s t : Set α
a x y : α
inst✝¹ : AlexandrovDiscrete α
inst✝ : AlexandrovDiscrete β
⊢ IsOpen (⋂₀ {t | IsOpen t ∧ s ⊆ t})
tactic: rw [exterior_def]
state_before: ι : Sort u_1
κ : ι → Sort u_2
α : Type u_3
β : Type u_4
inst✝³ : TopologicalSpace α
inst✝² : TopologicalSpace β
s t : Set α
a x y : α
inst✝¹ : AlexandrovDiscrete α
inst✝ : AlexandrovDiscrete β
⊢ IsOpen (⋂₀ {t | IsOpen t ∧ s ⊆ t})
state_after: no goals
tactic: exact isOpen_sInter fun _ ↦ And.left
Theorem: IsAlgClosed.roots_eq_zero_iff
File: Mathlib/FieldTheory/IsAlgClosed/Basic.lean

Proof steps:
state_before: k : Type u
inst✝¹ : Field k
inst✝ : IsAlgClosed k
p : k[X]
⊢ p.roots = 0 ↔ p = C (p.coeff 0)
state_after: k : Type u
inst✝¹ : Field k
inst✝ : IsAlgClosed k
p : k[X]
h : p.roots = 0
⊢ p = C (p.coeff 0)
tactic: refine ⟨fun h => ?_, fun hp => by rw [hp, roots_C]⟩
state_before: k : Type u
inst✝¹ : Field k
inst✝ : IsAlgClosed k
p : k[X]
h : p.roots = 0
⊢ p = C (p.coeff 0)
state_after: case inl
k : Type u
inst✝¹ : Field k
inst✝ : IsAlgClosed k
p : k[X]
h : p.roots = 0
hd : p.degree ≤ 0
⊢ p = C (p.coeff 0)

case inr
k : Type u
inst✝¹ : Field k
inst✝ : IsAlgClosed k
p : k[X]
h : p.roots = 0
hd : 0 < p.degree
⊢ p = C (p.coeff 0)
tactic: rcases le_or_lt (degree p) 0 with hd | hd
Theorem: CategoryTheory.Limits.coprodComparisonNatIso_inv
File: Mathlib/CategoryTheory/Limits/Shapes/BinaryProducts.lean

Proof steps:
state_before: C : Type u
inst✝⁸ : Category.{v, u} C
X Y : C
D : Type u₂
inst✝⁷ : Category.{w, u₂} D
F : C ⥤ D
A✝ A' B B' : C
inst✝⁶ : HasBinaryCoproduct A✝ B
inst✝⁵ : HasBinaryCoproduct A' B'
inst✝⁴ : HasBinaryCoproduct (F.obj A✝) (F.obj B)
inst✝³ : HasBinaryCoproduct (F.obj A') (F.obj B')
inst✝² : HasBinaryCoproducts C
inst✝¹ : HasBinaryCoproducts D
A : C
inst✝ : ∀ (B : C), IsIso (coprodComparison F A B)
⊢ F ⋙ coprod.functor.obj (F.obj A) ≅ coprod.functor.obj A ⋙ F
state_after: C : Type u
inst✝⁸ : Category.{v, u} C
X Y : C
D : Type u₂
inst✝⁷ : Category.{w, u₂} D
F : C ⥤ D
A✝ A' B B' : C
inst✝⁶ : HasBinaryCoproduct A✝ B
inst✝⁵ : HasBinaryCoproduct A' B'
inst✝⁴ : HasBinaryCoproduct (F.obj A✝) (F.obj B)
inst✝³ : HasBinaryCoproduct (F.obj A') (F.obj B')
inst✝² : HasBinaryCoproducts C
inst✝¹ : HasBinaryCoproducts D
A : C
inst✝ : ∀ (B : C), IsIso (coprodComparison F A B)
⊢ IsIso { app := fun B => coprodComparison F A B, naturality := ⋯ }
tactic: refine { @asIso _ _ _ _ _ (?_) with hom := coprodComparisonNatTrans F A }
state_before: C : Type u
inst✝⁸ : Category.{v, u} C
X Y : C
D : Type u₂
inst✝⁷ : Category.{w, u₂} D
F : C ⥤ D
A✝ A' B B' : C
inst✝⁶ : HasBinaryCoproduct A✝ B
inst✝⁵ : HasBinaryCoproduct A' B'
inst✝⁴ : HasBinaryCoproduct (F.obj A✝) (F.obj B)
inst✝³ : HasBinaryCoproduct (F.obj A') (F.obj B')
inst✝² : HasBinaryCoproducts C
inst✝¹ : HasBinaryCoproducts D
A : C
inst✝ : ∀ (B : C), IsIso (coprodComparison F A B)
⊢ IsIso { app := fun B => coprodComparison F A B, naturality := ⋯ }
state_after: no goals
tactic: apply NatIso.isIso_of_isIso_app
Theorem: Bornology.isBounded_singleton
File: Mathlib/Topology/Bornology/Basic.lean

Proof steps:
state_before: ι : Type u_1
α : Type u_2
β : Type u_3
x✝ : Bornology α
s t : Set α
x : α
⊢ IsBounded {x}
state_after: ι : Type u_1
α : Type u_2
β : Type u_3
x✝ : Bornology α
s t : Set α
x : α
⊢ {x}ᶜ ∈ cobounded α
tactic: rw [isBounded_def]
state_before: ι : Type u_1
α : Type u_2
β : Type u_3
x✝ : Bornology α
s t : Set α
x : α
⊢ {x}ᶜ ∈ cobounded α
state_after: no goals
tactic: exact le_cofinite _ (finite_singleton x).compl_mem_cofinite
Theorem: Fin.natCast_le_natCast
File: Mathlib/Data/Fin/Basic.lean

Proof steps:
state_before: n m a b : ℕ
han : a ≤ n
hbn : b ≤ n
⊢ ↑a ≤ ↑b ↔ a ≤ b
state_after: n m a b : ℕ
han : a < n.succ
hbn : b < n.succ
⊢ ↑a ≤ ↑b ↔ a ≤ b
tactic: rw [← Nat.lt_succ_iff] at han hbn
state_before: n m a b : ℕ
han : a < n.succ
hbn : b < n.succ
⊢ ↑a ≤ ↑b ↔ a ≤ b
state_after: no goals
tactic: simp [le_iff_val_le_val, -val_fin_le, Nat.mod_eq_of_lt, han, hbn]
Theorem: Finset.sorted_zero_eq_min'
File: Mathlib/Data/Finset/Sort.lean

Proof steps:
state_before: α : Type u_1
β : Type u_2
inst✝ : LinearOrder α
s : Finset α
h : 0 < (sort (fun x x_1 => x ≤ x_1) s).length
⊢ 0 < s.card
state_after: no goals
tactic: rwa [length_sort] at h
Theorem: MeasureTheory.measure_diff
File: Mathlib/MeasureTheory/Measure/MeasureSpace.lean

Proof steps:
state_before: α : Type u_1
β : Type u_2
γ : Type u_3
δ : Type u_4
ι : Type u_5
R : Type u_6
R' : Type u_7
m : MeasurableSpace α
μ μ₁ μ₂ : Measure α
s s₁ s₂ t : Set α
h : s₂ ⊆ s₁
h₂ : MeasurableSet s₂
h_fin : μ s₂ ≠ ⊤
⊢ μ (s₁ \ s₂) = μ s₁ - μ s₂
state_after: no goals
tactic: rw [measure_diff' _ h₂ h_fin, union_eq_self_of_subset_right h]
Theorem: ENNReal.coe_essSup
File: Mathlib/MeasureTheory/Function/EssSup.lean

Proof steps:
state_before: α : Type u_1
β : Type u_2
m : MeasurableSpace α
μ ν : Measure α
f✝ : α → ℝ≥0∞
f : α → ℝ≥0
hf : IsBoundedUnder (fun x x_1 => x ≤ x_1) (ae μ) f
r : ℝ≥0∞
⊢ r ≤ ⨅ a ∈ fun x => (map f (ae μ)).sets {x_1 | (fun x_2 => (fun x x_3 => x ≤ x_3) x_2 x) x_1}, ↑a ↔
    r ≤ essSup (fun x => ↑(f x)) μ
state_after: α : Type u_1
β : Type u_2
m : MeasurableSpace α
μ ν : Measure α
f✝ : α → ℝ≥0∞
f : α → ℝ≥0
hf : IsBoundedUnder (fun x x_1 => x ≤ x_1) (ae μ) f
r : ℝ≥0∞
⊢ (∀ i ∈ fun x => (map f (ae μ)).sets {x_1 | x_1 ≤ x}, r ≤ ↑i) ↔ ∀ (r_1 : ℝ≥0), (∀ᵐ (a : α) ∂μ, f a ≤ r_1) → r ≤ ↑r_1
tactic: simp [essSup, limsup, limsSup, eventually_map, ENNReal.forall_ennreal]
state_before: α : Type u_1
β : Type u_2
m : MeasurableSpace α
μ ν : Measure α
f✝ : α → ℝ≥0∞
f : α → ℝ≥0
hf : IsBoundedUnder (fun x x_1 => x ≤ x_1) (ae μ) f
r : ℝ≥0∞
⊢ (∀ i ∈ fun x => (map f (ae μ)).sets {x_1 | x_1 ≤ x}, r ≤ ↑i) ↔ ∀ (r_1 : ℝ≥0), (∀ᵐ (a : α) ∂μ, f a ≤ r_1) → r ≤ ↑r_1
state_after: no goals
tactic: rfl
Theorem: CategoryTheory.HomOrthogonal.matrixDecompositionAddEquiv_apply
File: Mathlib/CategoryTheory/Preadditive/HomOrthogonal.lean

Proof steps:
state_before: C : Type u
inst✝⁴ : Category.{v, u} C
ι : Type u_1
s : ι → C
inst✝³ : Preadditive C
inst✝² : HasFiniteBiproducts C
o : HomOrthogonal s
α β : Type
inst✝¹ : Finite α
inst✝ : Finite β
f : α → ι
g : β → ι
w z : (⨁ fun a => s (f a)) ⟶ ⨁ fun b => s (g b)
⊢ __src✝.toFun (w + z) = __src✝.toFun w + __src✝.toFun z
state_after: case h.a
C : Type u
inst✝⁴ : Category.{v, u} C
ι : Type u_1
s : ι → C
inst✝³ : Preadditive C
inst✝² : HasFiniteBiproducts C
o : HomOrthogonal s
α β : Type
inst✝¹ : Finite α
inst✝ : Finite β
f : α → ι
g : β → ι
w z : (⨁ fun a => s (f a)) ⟶ ⨁ fun b => s (g b)
x✝ : ι
i✝ : ↑(g ⁻¹' {x✝})
j✝ : ↑(f ⁻¹' {x✝})
⊢ __src✝.toFun (w + z) x✝ i✝ j✝ = (__src✝.toFun w + __src✝.toFun z) x✝ i✝ j✝
tactic: ext
state_before: case h.a
C : Type u
inst✝⁴ : Category.{v, u} C
ι : Type u_1
s : ι → C
inst✝³ : Preadditive C
inst✝² : HasFiniteBiproducts C
o : HomOrthogonal s
α β : Type
inst✝¹ : Finite α
inst✝ : Finite β
f : α → ι
g : β → ι
w z : (⨁ fun a => s (f a)) ⟶ ⨁ fun b => s (g b)
x✝ : ι
i✝ : ↑(g ⁻¹' {x✝})
j✝ : ↑(f ⁻¹' {x✝})
⊢ __src✝.toFun (w + z) x✝ i✝ j✝ = (__src✝.toFun w + __src✝.toFun z) x✝ i✝ j✝
state_after: case h.a
C : Type u
inst✝⁴ : Category.{v, u} C
ι : Type u_1
s : ι → C
inst✝³ : Preadditive C
inst✝² : HasFiniteBiproducts C
o : HomOrthogonal s
α β : Type
inst✝¹ : Finite α
inst✝ : Finite β
f : α → ι
g : β → ι
w z : (⨁ fun a => s (f a)) ⟶ ⨁ fun b => s (g b)
x✝ : ι
i✝ : ↑(g ⁻¹' {x✝})
j✝ : ↑(f ⁻¹' {x✝})
⊢ eqToHom ⋯ ≫ (biproduct.ι (fun a => s (f a)) ↑j✝ ≫ (w + z) ≫ biproduct.π (fun b => s (g b)) ↑i✝) ≫ eqToHom ⋯ =
    eqToHom ⋯ ≫ (biproduct.ι (fun a => s (f a)) ↑j✝ ≫ w ≫ biproduct.π (fun b => s (g b)) ↑i✝) ≫ eqToHom ⋯ +
      eqToHom ⋯ ≫ (biproduct.ι (fun a => s (f a)) ↑j✝ ≫ z ≫ biproduct.π (fun b => s (g b)) ↑i✝) ≫ eqToHom ⋯
tactic: dsimp [biproduct.components]
state_before: case h.a
C : Type u
inst✝⁴ : Category.{v, u} C
ι : Type u_1
s : ι → C
inst✝³ : Preadditive C
inst✝² : HasFiniteBiproducts C
o : HomOrthogonal s
α β : Type
inst✝¹ : Finite α
inst✝ : Finite β
f : α → ι
g : β → ι
w z : (⨁ fun a => s (f a)) ⟶ ⨁ fun b => s (g b)
x✝ : ι
i✝ : ↑(g ⁻¹' {x✝})
j✝ : ↑(f ⁻¹' {x✝})
⊢ eqToHom ⋯ ≫ (biproduct.ι (fun a => s (f a)) ↑j✝ ≫ (w + z) ≫ biproduct.π (fun b => s (g b)) ↑i✝) ≫ eqToHom ⋯ =
    eqToHom ⋯ ≫ (biproduct.ι (fun a => s (f a)) ↑j✝ ≫ w ≫ biproduct.π (fun b => s (g b)) ↑i✝) ≫ eqToHom ⋯ +
      eqToHom ⋯ ≫ (biproduct.ι (fun a => s (f a)) ↑j✝ ≫ z ≫ biproduct.π (fun b => s (g b)) ↑i✝) ≫ eqToHom ⋯
state_after: no goals
tactic: simp
Theorem: Nat.count_modEq_card
File: Mathlib/Data/Int/CardIntervalMod.lean

Proof steps:
state_before: a b r : ℕ
hr : 0 < r
v : ℕ
⊢ count (fun x => x ≡ v [MOD r]) b = b / r + if v % r < b % r then 1 else 0
state_after: a b r : ℕ
hr : 0 < r
v : ℕ
hr' : 0 < ↑r
⊢ count (fun x => x ≡ v [MOD r]) b = b / r + if v % r < b % r then 1 else 0
tactic: have hr' : 0 < (r : ℚ) := by positivity
state_before: a b r : ℕ
hr : 0 < r
v : ℕ
hr' : 0 < ↑r
⊢ count (fun x => x ≡ v [MOD r]) b = b / r + if v % r < b % r then 1 else 0
state_after: a b r : ℕ
hr : 0 < r
v : ℕ
hr' : 0 < ↑r
⊢ ⌈(↑b - ↑(v % r)) / ↑r⌉ = ↑(b / r) + ↑(if v % r < b % r then 1 else 0)
tactic: rw [← ofNat_inj, count_modEq_card_eq_ceil _ hr, cast_add]
state_before: a b r : ℕ
hr : 0 < r
v : ℕ
hr' : 0 < ↑r
⊢ ⌈(↑b - ↑(v % r)) / ↑r⌉ = ↑(b / r) + ↑(if v % r < b % r then 1 else 0)
state_after: a b r : ℕ
hr : 0 < r
v : ℕ
hr' : 0 < ↑r
⊢ ↑(b / r) + ⌈(↑(b % r) - ↑(v % r)) / ↑r⌉ = ↑(b / r) + ↑(if v % r < b % r then 1 else 0)
tactic: conv_lhs => rw [← div_add_mod b r, cast_add, cast_mul, ← add_sub, _root_.add_div,
    mul_div_cancel_left₀ _ hr'.ne', add_comm, Int.ceil_add_nat, add_comm]
state_before: a b r : ℕ
hr : 0 < r
v : ℕ
hr' : 0 < ↑r
⊢ ↑(b / r) + ⌈(↑(b % r) - ↑(v % r)) / ↑r⌉ = ↑(b / r) + ↑(if v % r < b % r then 1 else 0)
state_after: a b r : ℕ
hr : 0 < r
v : ℕ
hr' : 0 < ↑r
⊢ ⌈(↑(b % r) - ↑(v % r)) / ↑r⌉ = ↑(if v % r < b % r then 1 else 0)
tactic: rw [add_right_inj]
state_before: a b r : ℕ
hr : 0 < r
v : ℕ
hr' : 0 < ↑r
⊢ ⌈(↑(b % r) - ↑(v % r)) / ↑r⌉ = ↑(if v % r < b % r then 1 else 0)
state_after: case pos
a b r : ℕ
hr : 0 < r
v : ℕ
hr' : 0 < ↑r
h : v % r < b % r
⊢ ⌈(↑(b % r) - ↑(v % r)) / ↑r⌉ = ↑1

case neg
a b r : ℕ
hr : 0 < r
v : ℕ
hr' : 0 < ↑r
h : ¬v % r < b % r
⊢ ⌈(↑(b % r) - ↑(v % r)) / ↑r⌉ = ↑0
tactic: split_ifs with h
Theorem: FirstOrder.Language.BoundedFormula.mapTermRel_id_id_id
File: Mathlib/ModelTheory/Syntax.lean

Proof steps:
state_before: L : Language
L' : Language
M : Type w
N : Type u_1
P : Type u_2
inst✝² : L.Structure M
inst✝¹ : L.Structure N
inst✝ : L.Structure P
α : Type u'
β : Type v'
γ : Type u_3
n✝ n : ℕ
φ : L.BoundedFormula α n
⊢ mapTermRel (fun x => id) (fun x => id) (fun x => id) φ = φ
state_after: case falsum
L : Language
L' : Language
M : Type w
N : Type u_1
P : Type u_2
inst✝² : L.Structure M
inst✝¹ : L.Structure N
inst✝ : L.Structure P
α : Type u'
β : Type v'
γ : Type u_3
n✝¹ n n✝ : ℕ
⊢ mapTermRel (fun x => id) (fun x => id) (fun x => id) falsum = falsum

case equal
L : Language
L' : Language
M : Type w
N : Type u_1
P : Type u_2
inst✝² : L.Structure M
inst✝¹ : L.Structure N
inst✝ : L.Structure P
α : Type u'
β : Type v'
γ : Type u_3
n✝¹ n n✝ : ℕ
t₁✝ t₂✝ : L.Term (α ⊕ Fin n✝)
⊢ mapTermRel (fun x => id) (fun x => id) (fun x => id) (equal t₁✝ t₂✝) = equal t₁✝ t₂✝

case rel
L : Language
L' : Language
M : Type w
N : Type u_1
P : Type u_2
inst✝² : L.Structure M
inst✝¹ : L.Structure N
inst✝ : L.Structure P
α : Type u'
β : Type v'
γ : Type u_3
n✝¹ n n✝ l✝ : ℕ
R✝ : L.Relations l✝
ts✝ : Fin l✝ → L.Term (α ⊕ Fin n✝)
⊢ mapTermRel (fun x => id) (fun x => id) (fun x => id) (rel R✝ ts✝) = rel R✝ ts✝

case imp
L : Language
L' : Language
M : Type w
N : Type u_1
P : Type u_2
inst✝² : L.Structure M
inst✝¹ : L.Structure N
inst✝ : L.Structure P
α : Type u'
β : Type v'
γ : Type u_3
n✝¹ n n✝ : ℕ
f₁✝ f₂✝ : L.BoundedFormula α n✝
ih1 : mapTermRel (fun x => id) (fun x => id) (fun x => id) f₁✝ = f₁✝
ih2 : mapTermRel (fun x => id) (fun x => id) (fun x => id) f₂✝ = f₂✝
⊢ mapTermRel (fun x => id) (fun x => id) (fun x => id) (f₁✝.imp f₂✝) = f₁✝.imp f₂✝

case all
L : Language
L' : Language
M : Type w
N : Type u_1
P : Type u_2
inst✝² : L.Structure M
inst✝¹ : L.Structure N
inst✝ : L.Structure P
α : Type u'
β : Type v'
γ : Type u_3
n✝¹ n n✝ : ℕ
f✝ : L.BoundedFormula α (n✝ + 1)
ih3 : mapTermRel (fun x => id) (fun x => id) (fun x => id) f✝ = f✝
⊢ mapTermRel (fun x => id) (fun x => id) (fun x => id) f✝.all = f✝.all
tactic: induction' φ with _ _ _ _ _ _ _ _ _ _ _ ih1 ih2 _ _ ih3
Theorem: IsOpen.measure_eq_zero_iff
File: Mathlib/MeasureTheory/Measure/OpenPos.lean

Proof steps:
state_before: X : Type u_1
Y : Type u_2
inst✝³ : TopologicalSpace X
m : MeasurableSpace X
inst✝² : TopologicalSpace Y
inst✝¹ : T2Space Y
μ ν : Measure X
inst✝ : μ.IsOpenPosMeasure
s U F : Set X
x : X
hU : IsOpen U
⊢ μ U = 0 ↔ U = ∅
state_after: no goals
tactic: simpa only [not_lt, nonpos_iff_eq_zero, not_nonempty_iff_eq_empty] using
    not_congr (hU.measure_pos_iff μ)
Theorem: CategoryTheory.Limits.colimit_obj_ext
File: Mathlib/CategoryTheory/Limits/FunctorCategory.lean

Proof steps:
state_before: C : Type u
inst✝⁴ : Category.{v, u} C
D : Type u'
inst✝³ : Category.{v', u'} D
J : Type u₁
inst✝² : Category.{v₁, u₁} J
K : Type u₂
inst✝¹ : Category.{v₂, u₂} K
H : J ⥤ K ⥤ C
inst✝ : HasColimitsOfShape J C
k : K
W : C
f g : (colimit H).obj k ⟶ W
w : ∀ (j : J), (colimit.ι H j).app k ≫ f = (colimit.ι H j).app k ≫ g
⊢ f = g
state_after: C : Type u
inst✝⁴ : Category.{v, u} C
D : Type u'
inst✝³ : Category.{v', u'} D
J : Type u₁
inst✝² : Category.{v₁, u₁} J
K : Type u₂
inst✝¹ : Category.{v₂, u₂} K
H : J ⥤ K ⥤ C
inst✝ : HasColimitsOfShape J C
k : K
W : C
f g : (colimit H).obj k ⟶ W
w : ∀ (j : J), (colimit.ι H j).app k ≫ f = (colimit.ι H j).app k ≫ g
⊢ (colimitObjIsoColimitCompEvaluation H k).inv ≫ f = (colimitObjIsoColimitCompEvaluation H k).inv ≫ g
tactic: apply (cancel_epi (colimitObjIsoColimitCompEvaluation H k).inv).1
state_before: C : Type u
inst✝⁴ : Category.{v, u} C
D : Type u'
inst✝³ : Category.{v', u'} D
J : Type u₁
inst✝² : Category.{v₁, u₁} J
K : Type u₂
inst✝¹ : Category.{v₂, u₂} K
H : J ⥤ K ⥤ C
inst✝ : HasColimitsOfShape J C
k : K
W : C
f g : (colimit H).obj k ⟶ W
w : ∀ (j : J), (colimit.ι H j).app k ≫ f = (colimit.ι H j).app k ≫ g
⊢ (colimitObjIsoColimitCompEvaluation H k).inv ≫ f = (colimitObjIsoColimitCompEvaluation H k).inv ≫ g
state_after: case w
C : Type u
inst✝⁴ : Category.{v, u} C
D : Type u'
inst✝³ : Category.{v', u'} D
J : Type u₁
inst✝² : Category.{v₁, u₁} J
K : Type u₂
inst✝¹ : Category.{v₂, u₂} K
H : J ⥤ K ⥤ C
inst✝ : HasColimitsOfShape J C
k : K
W : C
f g : (colimit H).obj k ⟶ W
w : ∀ (j : J), (colimit.ι H j).app k ≫ f = (colimit.ι H j).app k ≫ g
j : J
⊢ colimit.ι (H ⋙ (evaluation K C).obj k) j ≫ (colimitObjIsoColimitCompEvaluation H k).inv ≫ f =
    colimit.ι (H ⋙ (evaluation K C).obj k) j ≫ (colimitObjIsoColimitCompEvaluation H k).inv ≫ g
tactic: ext j
state_before: case w
C : Type u
inst✝⁴ : Category.{v, u} C
D : Type u'
inst✝³ : Category.{v', u'} D
J : Type u₁
inst✝² : Category.{v₁, u₁} J
K : Type u₂
inst✝¹ : Category.{v₂, u₂} K
H : J ⥤ K ⥤ C
inst✝ : HasColimitsOfShape J C
k : K
W : C
f g : (colimit H).obj k ⟶ W
w : ∀ (j : J), (colimit.ι H j).app k ≫ f = (colimit.ι H j).app k ≫ g
j : J
⊢ colimit.ι (H ⋙ (evaluation K C).obj k) j ≫ (colimitObjIsoColimitCompEvaluation H k).inv ≫ f =
    colimit.ι (H ⋙ (evaluation K C).obj k) j ≫ (colimitObjIsoColimitCompEvaluation H k).inv ≫ g
state_after: no goals
tactic: simpa using w j
Theorem: MeasureTheory.measure_diff_null
File: Mathlib/MeasureTheory/OuterMeasure/Basic.lean

Proof steps:
state_before: α : Type u_1
ι : Type u_2
F : Type u_3
inst✝¹ : FunLike F (Set α) ℝ≥0∞
inst✝ : OuterMeasureClass F α
μ : F
s t : Set α
ht : μ t = 0
⊢ μ (s ∩ t) + μ (s \ t) ≤ μ t + μ (s \ t)
state_after: case bc.h
α : Type u_1
ι : Type u_2
F : Type u_3
inst✝¹ : FunLike F (Set α) ℝ≥0∞
inst✝ : OuterMeasureClass F α
μ : F
s t : Set α
ht : μ t = 0
⊢ s ∩ t ⊆ t
tactic: gcongr
state_before: case bc.h
α : Type u_1
ι : Type u_2
F : Type u_3
inst✝¹ : FunLike F (Set α) ℝ≥0∞
inst✝ : OuterMeasureClass F α
μ : F
s t : Set α
ht : μ t = 0
⊢ s ∩ t ⊆ t
state_after: no goals
tactic: apply inter_subset_right
state_before: α : Type u_1
ι : Type u_2
F : Type u_3
inst✝¹ : FunLike F (Set α) ℝ≥0∞
inst✝ : OuterMeasureClass F α
μ : F
s t : Set α
ht : μ t = 0
⊢ μ t + μ (s \ t) = μ (s \ t)
state_after: no goals
tactic: simp [ht]
Theorem: GenContFract.terminatedAt_iff_s_none
File: Mathlib/Algebra/ContinuedFractions/Translations.lean

Proof steps:
state_before: α : Type u_1
g : GenContFract α
n : ℕ
⊢ g.TerminatedAt n ↔ g.s.get? n = none
state_after: no goals
tactic: rfl
Theorem: Finsupp.mapDomain_support
File: Mathlib/Data/Finsupp/Basic.lean

Proof steps:
state_before: α : Type u_1
β : Type u_2
γ : Type u_3
ι : Type u_4
M : Type u_5
M' : Type u_6
N : Type u_7
P : Type u_8
G : Type u_9
H : Type u_10
R : Type u_11
S : Type u_12
inst✝¹ : AddCommMonoid M
v v₁ v₂ : α →₀ M
inst✝ : DecidableEq β
f : α → β
s : α →₀ M
⊢ (s.support.biUnion fun a => {f a}) ⊆ image f s.support
state_after: no goals
tactic: rw [Finset.biUnion_singleton]
Theorem: Nat.succ_add_sub_one
File: Mathlib/Data/Nat/Defs.lean

Proof steps:
state_before: a b c d m✝ n✝ k : ℕ
p q : ℕ → Prop
n m : ℕ
⊢ m.succ + n - 1 = m + n
state_after: no goals
tactic: rw [succ_add, Nat.add_one_sub_one]
Theorem: Turing.ListBlank.tail_map
File: Mathlib/Computability/TuringMachine.lean

Proof steps:
state_before: Γ : Type u_1
Γ' : Type u_2
inst✝¹ : Inhabited Γ
inst✝ : Inhabited Γ'
f : PointedMap Γ Γ'
l : ListBlank Γ
⊢ (map f l).tail = map f l.tail
state_after: Γ : Type u_1
Γ' : Type u_2
inst✝¹ : Inhabited Γ
inst✝ : Inhabited Γ'
f : PointedMap Γ Γ'
l : ListBlank Γ
⊢ (map f (cons l.head l.tail)).tail = map f l.tail
tactic: conv => lhs; rw [← ListBlank.cons_head_tail l]
state_before: Γ : Type u_1
Γ' : Type u_2
inst✝¹ : Inhabited Γ
inst✝ : Inhabited Γ'
f : PointedMap Γ Γ'
l : ListBlank Γ
⊢ (map f (cons l.head l.tail)).tail = map f l.tail
state_after: no goals
tactic: exact Quotient.inductionOn' l fun a ↦ rfl
Theorem: CategoryTheory.Limits.PushoutCocone.mk_ι_app
File: Mathlib/CategoryTheory/Limits/Shapes/Pullback/PullbackCone.lean

Proof steps:
state_before: C : Type u
inst✝ : Category.{v, u} C
W✝ X Y Z : C
f : X ⟶ Y
g : X ⟶ Z
W : C
inl : Y ⟶ W
inr : Z ⟶ W
eq : f ≫ inl = g ≫ inr
⊢ ∀ ⦃X_1 Y_1 : WalkingSpan⦄ (f_1 : X_1 ⟶ Y_1),
    (span f g).map f_1 ≫ (fun j => Option.casesOn j (f ≫ inl) fun j' => WalkingPair.casesOn j' inl inr) Y_1 =
      (fun j => Option.casesOn j (f ≫ inl) fun j' => WalkingPair.casesOn j' inl inr) X_1 ≫
        ((Functor.const WalkingSpan).obj W).map f_1
state_after: no goals
tactic: rintro (⟨⟩|⟨⟨⟩⟩) (⟨⟩|⟨⟨⟩⟩) <;> intro f <;> cases f <;> dsimp <;> aesop
Theorem: CategoryTheory.Limits.prod.lift_fst_snd
File: Mathlib/CategoryTheory/Limits/Shapes/BinaryProducts.lean

Proof steps:
state_before: C : Type u
inst✝¹ : Category.{v, u} C
X✝ Y✝ X Y : C
inst✝ : HasBinaryProduct X Y
⊢ lift fst snd = 𝟙 (X ⨯ Y)
state_after: no goals
tactic: ext <;> simp