1337xyz1337xyz/leandojo-benchmark4-v10 huggingface dataset:
Theorem: CategoryTheory.NonPreadditiveAbelian.add_comm
File: Mathlib/CategoryTheory/Abelian/NonPreadditive.lean

tactic: rw [add_def]
state_before: C : Type u
inst✝¹ : Category.{v, u} C
inst✝ : NonPreadditiveAbelian C
X Y : C
a b : X ⟶ Y
⊢ a + b = b + a
state_after: C : Type u
inst✝¹ : Category.{v, u} C
inst✝ : NonPreadditiveAbelian C
X Y : C
a b : X ⟶ Y
⊢ a - -b = b + a

tactic: conv_lhs => rw [← neg_neg a]
state_before: C : Type u
inst✝¹ : Category.{v, u} C
inst✝ : NonPreadditiveAbelian C
X Y : C
a b : X ⟶ Y
⊢ a - -b = b + a
state_after: C : Type u
inst✝¹ : Category.{v, u} C
inst✝ : NonPreadditiveAbelian C
X Y : C
a b : X ⟶ Y
⊢ - -a - -b = b + a

tactic: rw [neg_def, neg_def, neg_def, sub_sub_sub]
state_before: C : Type u
inst✝¹ : Category.{v, u} C
inst✝ : NonPreadditiveAbelian C
X Y : C
a b : X ⟶ Y
⊢ - -a - -b = b + a
state_after: C : Type u
inst✝¹ : Category.{v, u} C
inst✝ : NonPreadditiveAbelian C
X Y : C
a b : X ⟶ Y
⊢ 0 - 0 - (0 - a - b) = b + a

tactic: conv_lhs =>
  congr
  next => skip
  rw [← neg_def, neg_sub]
state_before: C : Type u
inst✝¹ : Category.{v, u} C
inst✝ : NonPreadditiveAbelian C
X Y : C
a b : X ⟶ Y
⊢ 0 - 0 - (0 - a - b) = b + a
state_after: C : Type u
inst✝¹ : Category.{v, u} C
inst✝ : NonPreadditiveAbelian C
X Y : C
a b : X ⟶ Y
⊢ 0 - 0 - (-b - a) = b + a

tactic: rw [sub_sub_sub, add_def, ← neg_def, neg_neg b, neg_def]
state_before: C : Type u
inst✝¹ : Category.{v, u} C
inst✝ : NonPreadditiveAbelian C
X Y : C
a b : X ⟶ Y
⊢ 0 - 0 - (-b - a) = b + a
state_after: no goals
Theorem: CategoryTheory.Limits.Types.pi_lift_π_apply'
File: Mathlib/CategoryTheory/Limits/Shapes/Types.lean

tactic: simp
state_before: β : Type v
f : β → Type v
P : Type v
s : (b : β) → P ⟶ f b
b : β
x : P
⊢ Pi.π f b (Pi.lift s x) = s b x
state_after: no goals
Theorem: Set.range_pair_subset
File: Mathlib/Data/Set/Prod.lean

tactic: have : (fun x => (f x, g x)) = Prod.map f g ∘ fun x => (x, x) := funext fun x => rfl
state_before: α : Type u_1
β : Type u_2
γ : Type u_3
δ : Type u_4
s s₁ s₂ : Set α
t t₁ t₂ : Set β
a : α
b : β
f : α → β
g : α → γ
⊢ (range fun x => (f x, g x)) ⊆ range f ×ˢ range g
state_after: α : Type u_1
β : Type u_2
γ : Type u_3
δ : Type u_4
s s₁ s₂ : Set α
t t₁ t₂ : Set β
a : α
b : β
f : α → β
g : α → γ
this : (fun x => (f x, g x)) = Prod.map f g ∘ fun x => (x, x)
⊢ (range fun x => (f x, g x)) ⊆ range f ×ˢ range g

tactic: rw [this, ← range_prod_map]
state_before: α : Type u_1
β : Type u_2
γ : Type u_3
δ : Type u_4
s s₁ s₂ : Set α
t t₁ t₂ : Set β
a : α
b : β
f : α → β
g : α → γ
this : (fun x => (f x, g x)) = Prod.map f g ∘ fun x => (x, x)
⊢ (range fun x => (f x, g x)) ⊆ range f ×ˢ range g
state_after: α : Type u_1
β : Type u_2
γ : Type u_3
δ : Type u_4
s s₁ s₂ : Set α
t t₁ t₂ : Set β
a : α
b : β
f : α → β
g : α → γ
this : (fun x => (f x, g x)) = Prod.map f g ∘ fun x => (x, x)
⊢ range (Prod.map f g ∘ fun x => (x, x)) ⊆ range (Prod.map f g)

tactic: apply range_comp_subset_range
state_before: α : Type u_1
β : Type u_2
γ : Type u_3
δ : Type u_4
s s₁ s₂ : Set α
t t₁ t₂ : Set β
a : α
b : β
f : α → β
g : α → γ
this : (fun x => (f x, g x)) = Prod.map f g ∘ fun x => (x, x)
⊢ range (Prod.map f g ∘ fun x => (x, x)) ⊆ range (Prod.map f g)
state_after: no goals
Theorem: RingHom.map_det
File: Mathlib/LinearAlgebra/Matrix/Determinant/Basic.lean

tactic: simp [Matrix.det_apply', map_sum f, map_prod f]
state_before: m : Type u_1
n : Type u_2
inst✝⁵ : DecidableEq n
inst✝⁴ : Fintype n
inst✝³ : DecidableEq m
inst✝² : Fintype m
R : Type v
inst✝¹ : CommRing R
S : Type w
inst✝ : CommRing S
f : R →+* S
M : Matrix n n R
⊢ f M.det = (f.mapMatrix M).det
state_after: no goals
Theorem: Multiset.sub_eq_fold_erase
File: Mathlib/Data/Multiset/Basic.lean

tactic: show ofList (l₁.diff l₂) = foldl erase erase_comm l₁ l₂
state_before: α : Type u_1
β : Type v
γ : Type u_2
inst✝ : DecidableEq α
s✝ t✝ u : Multiset α
a b : α
s t : Multiset α
l₁ l₂ : List α
⊢ ⟦l₁⟧ - ⟦l₂⟧ = foldl erase ⋯ ⟦l₁⟧ ⟦l₂⟧
state_after: α : Type u_1
β : Type v
γ : Type u_2
inst✝ : DecidableEq α
s✝ t✝ u : Multiset α
a b : α
s t : Multiset α
l₁ l₂ : List α
⊢ ↑(l₁.diff l₂) = foldl erase ⋯ ↑l₁ ↑l₂

tactic: rw [diff_eq_foldl l₁ l₂]
state_before: α : Type u_1
β : Type v
γ : Type u_2
inst✝ : DecidableEq α
s✝ t✝ u : Multiset α
a b : α
s t : Multiset α
l₁ l₂ : List α
⊢ ↑(l₁.diff l₂) = foldl erase ⋯ ↑l₁ ↑l₂
state_after: α : Type u_1
β : Type v
γ : Type u_2
inst✝ : DecidableEq α
s✝ t✝ u : Multiset α
a b : α
s t : Multiset α
l₁ l₂ : List α
⊢ ↑(List.foldl List.erase l₁ l₂) = foldl erase ⋯ ↑l₁ ↑l₂

tactic: symm
state_before: α : Type u_1
β : Type v
γ : Type u_2
inst✝ : DecidableEq α
s✝ t✝ u : Multiset α
a b : α
s t : Multiset α
l₁ l₂ : List α
⊢ ↑(List.foldl List.erase l₁ l₂) = foldl erase ⋯ ↑l₁ ↑l₂
state_after: α : Type u_1
β : Type v
γ : Type u_2
inst✝ : DecidableEq α
s✝ t✝ u : Multiset α
a b : α
s t : Multiset α
l₁ l₂ : List α
⊢ foldl erase ⋯ ↑l₁ ↑l₂ = ↑(List.foldl List.erase l₁ l₂)

tactic: exact foldl_hom _ _ _ _ _ fun x y => rfl
state_before: α : Type u_1
β : Type v
γ : Type u_2
inst✝ : DecidableEq α
s✝ t✝ u : Multiset α
a b : α
s t : Multiset α
l₁ l₂ : List α
⊢ foldl erase ⋯ ↑l₁ ↑l₂ = ↑(List.foldl List.erase l₁ l₂)
state_after: no goals
Theorem: IsBoundedLinearMap.zero
File: Mathlib/Analysis/NormedSpace/BoundedLinearMaps.lean

tactic: simp [le_refl]
state_before: 𝕜 : Type u_1
inst✝⁶ : NontriviallyNormedField 𝕜
E : Type u_2
inst✝⁵ : NormedAddCommGroup E
inst✝⁴ : NormedSpace 𝕜 E
F : Type u_3
inst✝³ : NormedAddCommGroup F
inst✝² : NormedSpace 𝕜 F
G : Type u_4
inst✝¹ : NormedAddCommGroup G
inst✝ : NormedSpace 𝕜 G
⊢ ∀ (x : E), ‖0 x‖ ≤ 0 * ‖x‖
state_after: no goals
Theorem: SetTheory.PGame.grundyValue_iff_equiv_zero
File: Mathlib/SetTheory/Game/Nim.lean

tactic: rw [← grundyValue_eq_iff_equiv, grundyValue_zero]
state_before: G : PGame
inst✝ : G.Impartial
⊢ G.grundyValue = 0 ↔ G ≈ 0
state_after: no goals
Theorem: ProbabilityTheory.kernel.density_le_one
File: Mathlib/Probability/Kernel/Disintegration/Density.lean

tactic: refine limsup_le_of_le ?_ ?_
state_before: α : Type u_1
β : Type u_2
γ : Type u_3
mα : MeasurableSpace α
mβ : MeasurableSpace β
mγ : MeasurableSpace γ
inst✝ : CountablyGenerated γ
κ : ↥(kernel α (γ × β))
ν : ↥(kernel α γ)
hκν : fst κ ≤ ν
a : α
x : γ
s : Set β
⊢ density κ ν a x s ≤ 1
state_after: case refine_1
α : Type u_1
β : Type u_2
γ : Type u_3
mα : MeasurableSpace α
mβ : MeasurableSpace β
mγ : MeasurableSpace γ
inst✝ : CountablyGenerated γ
κ : ↥(kernel α (γ × β))
ν : ↥(kernel α γ)
hκν : fst κ ≤ ν
a : α
x : γ
s : Set β
⊢ IsCoboundedUnder (fun x x_1 => x ≤ x_1) atTop fun n => densityProcess κ ν n a x s

case refine_2
α : Type u_1
β : Type u_2
γ : Type u_3
mα : MeasurableSpace α
mβ : MeasurableSpace β
mγ : MeasurableSpace γ
inst✝ : CountablyGenerated γ
κ : ↥(kernel α (γ × β))
ν : ↥(kernel α γ)
hκν : fst κ ≤ ν
a : α
x : γ
s : Set β
⊢ ∀ᶠ (n : ℕ) in atTop, densityProcess κ ν n a x s ≤ 1

tactic: exact isCoboundedUnder_le_of_le atTop (fun i ↦ densityProcess_nonneg _ _ _ _ _ _)
state_before: case refine_1
α : Type u_1
β : Type u_2
γ : Type u_3
mα : MeasurableSpace α
mβ : MeasurableSpace β
mγ : MeasurableSpace γ
inst✝ : CountablyGenerated γ
κ : ↥(kernel α (γ × β))
ν : ↥(kernel α γ)
hκν : fst κ ≤ ν
a : α
x : γ
s : Set β
⊢ IsCoboundedUnder (fun x x_1 => x ≤ x_1) atTop fun n => densityProcess κ ν n a x s
state_after: no goals

tactic: exact eventually_of_forall (fun n ↦ densityProcess_le_one hκν _ _ _ _)
state_before: case refine_2
α : Type u_1
β : Type u_2
γ : Type u_3
mα : MeasurableSpace α
mβ : MeasurableSpace β
mγ : MeasurableSpace γ
inst✝ : CountablyGenerated γ
κ : ↥(kernel α (γ × β))
ν : ↥(kernel α γ)
hκν : fst κ ≤ ν
a : α
x : γ
s : Set β
⊢ ∀ᶠ (n : ℕ) in atTop, densityProcess κ ν n a x s ≤ 1
state_after: no goals
Theorem: Set.Finite.absorbs_sInter
File: Mathlib/Topology/Bornology/Absorbs.lean

tactic: simp only [absorbs_iff_eventually_cobounded_mapsTo, mapsTo_sInter, hS.eventually_all]
state_before: G₀ : Type u_1
α : Type u_2
inst✝² : GroupWithZero G₀
inst✝¹ : Bornology G₀
inst✝ : MulAction G₀ α
s t u : Set α
S : Set (Set α)
hS : S.Finite
⊢ Absorbs G₀ (⋂₀ S) t ↔ ∀ s ∈ S, Absorbs G₀ s t
state_after: no goals
Theorem: upperClosure_sups
File: Mathlib/Data/Set/Sups.lean

tactic: ext a
state_before: F : Type u_1
α : Type u_2
β : Type u_3
inst✝ : SemilatticeSup α
s t : Set α
⊢ upperClosure (s ⊻ t) = upperClosure s ⊔ upperClosure t
state_after: case a.h
F : Type u_1
α : Type u_2
β : Type u_3
inst✝ : SemilatticeSup α
s t : Set α
a : α
⊢ a ∈ ↑(upperClosure (s ⊻ t)) ↔ a ∈ ↑(upperClosure s ⊔ upperClosure t)

tactic: simp only [SetLike.mem_coe, mem_upperClosure, Set.mem_sups, exists_and_left, exists_prop,
  UpperSet.coe_sup, Set.mem_inter_iff]
state_before: case a.h
F : Type u_1
α : Type u_2
β : Type u_3
inst✝ : SemilatticeSup α
s t : Set α
a : α
⊢ a ∈ ↑(upperClosure (s ⊻ t)) ↔ a ∈ ↑(upperClosure s ⊔ upperClosure t)
state_after: case a.h
F : Type u_1
α : Type u_2
β : Type u_3
inst✝ : SemilatticeSup α
s t : Set α
a : α
⊢ (∃ a_1, (∃ a ∈ s, ∃ b ∈ t, a ⊔ b = a_1) ∧ a_1 ≤ a) ↔ (∃ a_1 ∈ s, a_1 ≤ a) ∧ ∃ a_1 ∈ t, a_1 ≤ a

tactic: constructor
state_before: case a.h
F : Type u_1
α : Type u_2
β : Type u_3
inst✝ : SemilatticeSup α
s t : Set α
a : α
⊢ (∃ a_1, (∃ a ∈ s, ∃ b ∈ t, a ⊔ b = a_1) ∧ a_1 ≤ a) ↔ (∃ a_1 ∈ s, a_1 ≤ a) ∧ ∃ a_1 ∈ t, a_1 ≤ a
state_after: case a.h.mp
F : Type u_1
α : Type u_2
β : Type u_3
inst✝ : SemilatticeSup α
s t : Set α
a : α
⊢ (∃ a_1, (∃ a ∈ s, ∃ b ∈ t, a ⊔ b = a_1) ∧ a_1 ≤ a) → (∃ a_2 ∈ s, a_2 ≤ a) ∧ ∃ a_2 ∈ t, a_2 ≤ a

case a.h.mpr
F : Type u_1
α : Type u_2
β : Type u_3
inst✝ : SemilatticeSup α
s t : Set α
a : α
⊢ ((∃ a_1 ∈ s, a_1 ≤ a) ∧ ∃ a_1 ∈ t, a_1 ≤ a) → ∃ a_2, (∃ a ∈ s, ∃ b ∈ t, a ⊔ b = a_2) ∧ a_2 ≤ a

tactic: rintro ⟨_, ⟨b, hb, c, hc, rfl⟩, ha⟩
state_before: case a.h.mp
F : Type u_1
α : Type u_2
β : Type u_3
inst✝ : SemilatticeSup α
s t : Set α
a : α
⊢ (∃ a_1, (∃ a ∈ s, ∃ b ∈ t, a ⊔ b = a_1) ∧ a_1 ≤ a) → (∃ a_2 ∈ s, a_2 ≤ a) ∧ ∃ a_2 ∈ t, a_2 ≤ a
state_after: case a.h.mp.intro.intro.intro.intro.intro.intro
F : Type u_1
α : Type u_2
β : Type u_3
inst✝ : SemilatticeSup α
s t : Set α
a b : α
hb : b ∈ s
c : α
hc : c ∈ t
ha : b ⊔ c ≤ a
⊢ (∃ a_1 ∈ s, a_1 ≤ a) ∧ ∃ a_1 ∈ t, a_1 ≤ a

tactic: exact ⟨⟨b, hb, le_sup_left.trans ha⟩, c, hc, le_sup_right.trans ha⟩
state_before: case a.h.mp.intro.intro.intro.intro.intro.intro
F : Type u_1
α : Type u_2
β : Type u_3
inst✝ : SemilatticeSup α
s t : Set α
a b : α
hb : b ∈ s
c : α
hc : c ∈ t
ha : b ⊔ c ≤ a
⊢ (∃ a_1 ∈ s, a_1 ≤ a) ∧ ∃ a_1 ∈ t, a_1 ≤ a
state_after: no goals

tactic: rintro ⟨⟨b, hb, hab⟩, c, hc, hac⟩
state_before: case a.h.mpr
F : Type u_1
α : Type u_2
β : Type u_3
inst✝ : SemilatticeSup α
s t : Set α
a : α
⊢ ((∃ a_1 ∈ s, a_1 ≤ a) ∧ ∃ a_1 ∈ t, a_1 ≤ a) → ∃ a_2, (∃ a ∈ s, ∃ b ∈ t, a ⊔ b = a_2) ∧ a_2 ≤ a
state_after: case a.h.mpr.intro.intro.intro.intro.intro
F : Type u_1
α : Type u_2
β : Type u_3
inst✝ : SemilatticeSup α
s t : Set α
a b : α
hb : b ∈ s
hab : b ≤ a
c : α
hc : c ∈ t
hac : c ≤ a
⊢ ∃ a_1, (∃ a ∈ s, ∃ b ∈ t, a ⊔ b = a_1) ∧ a_1 ≤ a

tactic: exact ⟨_, ⟨b, hb, c, hc, rfl⟩, sup_le hab hac⟩
state_before: case a.h.mpr.intro.intro.intro.intro.intro
F : Type u_1
α : Type u_2
β : Type u_3
inst✝ : SemilatticeSup α
s t : Set α
a b : α
hb : b ∈ s
hab : b ≤ a
c : α
hc : c ∈ t
hac : c ≤ a
⊢ ∃ a_1, (∃ a ∈ s, ∃ b ∈ t, a ⊔ b = a_1) ∧ a_1 ≤ a
state_after: no goals
Theorem: CharZero.charZero_iff_forall_prime_ne_zero
File: Mathlib/Algebra/CharP/Defs.lean

tactic: refine ⟨fun h p hp => by simp [hp.ne_zero], fun h => ?_⟩
state_before: R : Type u_1
inst✝² : NonAssocRing R
inst✝¹ : NoZeroDivisors R
inst✝ : Nontrivial R
⊢ CharZero R ↔ ∀ (p : ℕ), Nat.Prime p → ↑p ≠ 0
state_after: R : Type u_1
inst✝² : NonAssocRing R
inst✝¹ : NoZeroDivisors R
inst✝ : Nontrivial R
h : ∀ (p : ℕ), Nat.Prime p → ↑p ≠ 0
⊢ CharZero R

tactic: let p := ringChar R
state_before: R : Type u_1
inst✝² : NonAssocRing R
inst✝¹ : NoZeroDivisors R
inst✝ : Nontrivial R
h : ∀ (p : ℕ), Nat.Prime p → ↑p ≠ 0
⊢ CharZero R
state_after: R : Type u_1
inst✝² : NonAssocRing R
inst✝¹ : NoZeroDivisors R
inst✝ : Nontrivial R
h : ∀ (p : ℕ), Nat.Prime p → ↑p ≠ 0
p : ℕ := ringChar R
⊢ CharZero R

tactic: cases CharP.char_is_prime_or_zero R p with
| inl hp => simpa using h p hp
| inr h => have : CharP R 0 := h ▸ inferInstance; exact CharP.charP_to_charZero R
state_before: R : Type u_1
inst✝² : NonAssocRing R
inst✝¹ : NoZeroDivisors R
inst✝ : Nontrivial R
h : ∀ (p : ℕ), Nat.Prime p → ↑p ≠ 0
p : ℕ := ringChar R
⊢ CharZero R
state_after: no goals

tactic: simp [hp.ne_zero]
state_before: R : Type u_1
inst✝² : NonAssocRing R
inst✝¹ : NoZeroDivisors R
inst✝ : Nontrivial R
h : CharZero R
p : ℕ
hp : Nat.Prime p
⊢ ↑p ≠ 0
state_after: no goals

tactic: simpa using h p hp
state_before: case inl
R : Type u_1
inst✝² : NonAssocRing R
inst✝¹ : NoZeroDivisors R
inst✝ : Nontrivial R
h : ∀ (p : ℕ), Nat.Prime p → ↑p ≠ 0
p : ℕ := ringChar R
hp : Nat.Prime p
⊢ CharZero R
state_after: no goals

tactic: have : CharP R 0 := h ▸ inferInstance
state_before: case inr
R : Type u_1
inst✝² : NonAssocRing R
inst✝¹ : NoZeroDivisors R
inst✝ : Nontrivial R
h✝ : ∀ (p : ℕ), Nat.Prime p → ↑p ≠ 0
p : ℕ := ringChar R
h : p = 0
⊢ CharZero R
state_after: case inr
R : Type u_1
inst✝² : NonAssocRing R
inst✝¹ : NoZeroDivisors R
inst✝ : Nontrivial R
h✝ : ∀ (p : ℕ), Nat.Prime p → ↑p ≠ 0
p : ℕ := ringChar R
h : p = 0
this : CharP R 0
⊢ CharZero R

tactic: exact CharP.charP_to_charZero R
state_before: case inr
R : Type u_1
inst✝² : NonAssocRing R
inst✝¹ : NoZeroDivisors R
inst✝ : Nontrivial R
h✝ : ∀ (p : ℕ), Nat.Prime p → ↑p ≠ 0
p : ℕ := ringChar R
h : p = 0
this : CharP R 0
⊢ CharZero R
state_after: no goals
Theorem: Commute.pow_dvd_sub_pow_of_pow_eq_zero_right
File: Mathlib/Algebra/Ring/Divisibility/Lemmas.lean

tactic: simpa
state_before: R : Type u_1
x y : R
n m p : ℕ
hp : n + m ≤ p + 1
inst✝ : Ring R
h_comm : Commute x y
hy : y ^ n = 0
⊢ (x - (x - y)) ^ n = 0
state_after: no goals
Theorem: isPrimePow_nat_iff
File: Mathlib/Algebra/IsPrimePow.lean

tactic: simp only [isPrimePow_def, Nat.prime_iff]
state_before: R : Type u_1
inst✝ : CommMonoidWithZero R
n✝ p : R
k n : ℕ
⊢ IsPrimePow n ↔ ∃ p k, Nat.Prime p ∧ 0 < k ∧ p ^ k = n
state_after: no goals
Theorem: CategoryTheory.StructuredArrow.homMk'_mk_comp
File: Mathlib/CategoryTheory/Comma/StructuredArrow.lean

tactic: simp
state_before: C : Type u₁
inst✝¹ : Category.{v₁, u₁} C
D : Type u₂
inst✝ : Category.{v₂, u₂} D
S S' S'' : D
Y Y' Y'' : C
T T' : C ⥤ D
f : S ⟶ T.obj Y
g : Y ⟶ Y'
g' : Y' ⟶ Y''
⊢ mk ((mk (f ≫ T.map g)).hom ≫ T.map g') = mk ((mk f).hom ≫ T.map (g ≫ g'))
state_after: no goals
Theorem: CategoryTheory.Adjunction.eq_homEquiv_apply
File: Mathlib/CategoryTheory/Adjunction/Basic.lean

tactic: cases h
state_before: C : Type u₁
inst✝¹ : Category.{v₁, u₁} C
D : Type u₂
inst✝ : Category.{v₂, u₂} D
F : C ⥤ D
G : D ⥤ C
adj : F ⊣ G
X' X : C
Y Y' : D
A : C
B : D
f : F.obj A ⟶ B
g : A ⟶ G.obj B
h : g = (adj.homEquiv A B) f
⊢ (adj.homEquiv A B).symm g = f
state_after: case refl
C : Type u₁
inst✝¹ : Category.{v₁, u₁} C
D : Type u₂
inst✝ : Category.{v₂, u₂} D
F : C ⥤ D
G : D ⥤ C
adj : F ⊣ G
X' X : C
Y Y' : D
A : C
B : D
f : F.obj A ⟶ B
⊢ (adj.homEquiv A B).symm ((adj.homEquiv A B) f) = f

tactic: simp
state_before: case refl
C : Type u₁
inst✝¹ : Category.{v₁, u₁} C
D : Type u₂
inst✝ : Category.{v₂, u₂} D
F : C ⥤ D
G : D ⥤ C
adj : F ⊣ G
X' X : C
Y Y' : D
A : C
B : D
f : F.obj A ⟶ B
⊢ (adj.homEquiv A B).symm ((adj.homEquiv A B) f) = f
state_after: no goals

tactic: cases h
state_before: C : Type u₁
inst✝¹ : Category.{v₁, u₁} C
D : Type u₂
inst✝ : Category.{v₂, u₂} D
F : C ⥤ D
G : D ⥤ C
adj : F ⊣ G
X' X : C
Y Y' : D
A : C
B : D
f : F.obj A ⟶ B
g : A ⟶ G.obj B
h : (adj.homEquiv A B).symm g = f
⊢ g = (adj.homEquiv A B) f
state_after: case refl
C : Type u₁
inst✝¹ : Category.{v₁, u₁} C
D : Type u₂
inst✝ : Category.{v₂, u₂} D
F : C ⥤ D
G : D ⥤ C
adj : F ⊣ G
X' X : C
Y Y' : D
A : C
B : D
g : A ⟶ G.obj B
⊢ g = (adj.homEquiv A B) ((adj.homEquiv A B).symm g)

tactic: simp
state_before: case refl
C : Type u₁
inst✝¹ : Category.{v₁, u₁} C
D : Type u₂
inst✝ : Category.{v₂, u₂} D
F : C ⥤ D
G : D ⥤ C
adj : F ⊣ G
X' X : C
Y Y' : D
A : C
B : D
g : A ⟶ G.obj B
⊢ g = (adj.homEquiv A B) ((adj.homEquiv A B).symm g)
state_after: no goals
Theorem: Complex.hasDerivAt_Gamma_nat
File: Mathlib/NumberTheory/Harmonic/GammaDeriv.lean

tactic: exact_mod_cast HasDerivAt.complex_of_real
  (by exact_mod_cast differentiable_at_Gamma_nat_add_one n)
  (Real.hasDerivAt_Gamma_nat n) Gamma_ofReal
state_before: n : ℕ
⊢ HasDerivAt Gamma (↑n ! * (-↑γ + ↑(harmonic n))) (↑n + 1)
state_after: no goals

tactic: exact_mod_cast differentiable_at_Gamma_nat_add_one n
state_before: n : ℕ
⊢ DifferentiableAt ℂ Gamma ↑(↑n + 1)
state_after: no goals
Theorem: LSeriesHasSum.add
File: Mathlib/NumberTheory/LSeries/Linearity.lean

tactic: simpa only [LSeriesHasSum, term_add] using HasSum.add hf hg
state_before: f g : ℕ → ℂ
s a b : ℂ
hf : LSeriesHasSum f s a
hg : LSeriesHasSum g s b
⊢ LSeriesHasSum (f + g) s (a + b)
state_after: no goals
Theorem: Matroid.uniqueBaseOn_restrict
File: Mathlib/Data/Matroid/Constructions.lean

tactic: rw [uniqueBaseOn_restrict', inter_right_comm, inter_eq_self_of_subset_left h]
state_before: α : Type u_1
M : Matroid α
E B I X R✝ J : Set α
h : I ⊆ E
R : Set α
⊢ uniqueBaseOn I E ↾ R = uniqueBaseOn (I ∩ R) R
state_after: no goals
Theorem: LinearMap.det_toMatrix'
File: Mathlib/LinearAlgebra/Determinant.lean

tactic: simp [← toMatrix_eq_toMatrix']
state_before: R : Type u_1
inst✝¹¹ : CommRing R
M : Type u_2
inst✝¹⁰ : AddCommGroup M
inst✝⁹ : Module R M
M' : Type u_3
inst✝⁸ : AddCommGroup M'
inst✝⁷ : Module R M'
ι✝ : Type u_4
inst✝⁶ : DecidableEq ι✝
inst✝⁵ : Fintype ι✝
e : Basis ι✝ R M
A : Type u_5
inst✝⁴ : CommRing A
inst✝³ : Module A M
κ : Type u_6
inst✝² : Fintype κ
ι : Type u_7
inst✝¹ : Fintype ι
inst✝ : DecidableEq ι
f : (ι → A) →ₗ[A] ι → A
⊢ (toMatrix' f).det = LinearMap.det f
state_after: no goals
Theorem: Monoid.CoprodI.induction_on
File: Mathlib/GroupTheory/CoprodI.lean

tactic: induction m using CoprodI.induction_left with
| one => exact h_one
| mul m x hx => exact h_mul _ _ (h_of _ _) hx
state_before: ι : Type u_1
M : ι → Type u_2
inst✝¹ : (i : ι) → Monoid (M i)
N : Type u_3
inst✝ : Monoid N
C : CoprodI M → Prop
m : CoprodI M
h_one : C 1
h_of : ∀ (i : ι) (m : M i), C (of m)
h_mul : ∀ (x y : CoprodI M), C x → C y → C (x * y)
⊢ C m
state_after: no goals

tactic: exact h_one
state_before: case one
ι : Type u_1
M : ι → Type u_2
inst✝¹ : (i : ι) → Monoid (M i)
N : Type u_3
inst✝ : Monoid N
C : CoprodI M → Prop
h_one : C 1
h_of : ∀ (i : ι) (m : M i), C (of m)
h_mul : ∀ (x y : CoprodI M), C x → C y → C (x * y)
⊢ C 1
state_after: no goals

tactic: exact h_mul _ _ (h_of _ _) hx
state_before: case mul
ι : Type u_1
M : ι → Type u_2
inst✝¹ : (i : ι) → Monoid (M i)
N : Type u_3
inst✝ : Monoid N
C : CoprodI M → Prop
h_one : C 1
h_of : ∀ (i : ι) (m : M i), C (of m)
h_mul : ∀ (x y : CoprodI M), C x → C y → C (x * y)
i✝ : ι
m : M i✝
x : CoprodI M
hx : C x
⊢ C (of m * x)
state_after: no goals
Theorem: Nat.Partrec.rfind'
File: Mathlib/Computability/PartrecCode.lean

tactic: refine
  Partrec.map
    ((@Partrec₂.unpaired' fun a b : ℕ =>
          Nat.rfind fun n => (fun m => m = 0) <$> f (Nat.pair a (n + b))).1
      ?_)
    (Primrec.nat_add.comp Primrec.snd <| Primrec.snd.comp Primrec.fst).to_comp.to₂
state_before: f : ℕ →. ℕ
hf : Partrec f
⊢ Partrec₂ fun a m =>
    Part.map (fun x => x + m) (Nat.rfind fun n => (fun m => decide (m = 0)) <$> f (Nat.pair a (n + m)))
state_after: f : ℕ →. ℕ
hf : Partrec f
⊢ Partrec (unpaired fun a b => Nat.rfind fun n => (fun m => decide (m = 0)) <$> f (Nat.pair a (n + b)))

tactic: have : Nat.Partrec (fun a => Nat.rfind (fun n => (fun m => decide (m = 0)) <$>
  Nat.unpaired (fun a b => f (Nat.pair (Nat.unpair a).1 (b + (Nat.unpair a).2)))
    (Nat.pair a n))) :=
  rfind
    (Partrec₂.unpaired'.2
      ((Partrec.nat_iff.2 hf).comp
          (Primrec₂.pair.comp (Primrec.fst.comp <| Primrec.unpair.comp Primrec.fst)
              (Primrec.nat_add.comp Primrec.snd
                (Primrec.snd.comp <| Primrec.unpair.comp Primrec.fst))).to_comp))
state_before: f : ℕ →. ℕ
hf : Partrec f
⊢ Partrec (unpaired fun a b => Nat.rfind fun n => (fun m => decide (m = 0)) <$> f (Nat.pair a (n + b)))
state_after: f : ℕ →. ℕ
hf : Partrec f
this :
  Partrec fun a =>
    Nat.rfind fun n =>
      (fun m => decide (m = 0)) <$> unpaired (fun a b => f (Nat.pair (unpair a).1 (b + (unpair a).2))) (Nat.pair a n)
⊢ Partrec (unpaired fun a b => Nat.rfind fun n => (fun m => decide (m = 0)) <$> f (Nat.pair a (n + b)))

tactic: simp at this
state_before: f : ℕ →. ℕ
hf : Partrec f
this :
  Partrec fun a =>
    Nat.rfind fun n =>
      (fun m => decide (m = 0)) <$> unpaired (fun a b => f (Nat.pair (unpair a).1 (b + (unpair a).2))) (Nat.pair a n)
⊢ Partrec (unpaired fun a b => Nat.rfind fun n => (fun m => decide (m = 0)) <$> f (Nat.pair a (n + b)))
state_after: f : ℕ →. ℕ
hf : Partrec f
this :
  Partrec fun a => Nat.rfind fun n => Part.map (fun m => decide (m = 0)) (f (Nat.pair (unpair a).1 (n + (unpair a).2)))
⊢ Partrec (unpaired fun a b => Nat.rfind fun n => (fun m => decide (m = 0)) <$> f (Nat.pair a (n + b)))

tactic: exact this
state_before: f : ℕ →. ℕ
hf : Partrec f
this :
  Partrec fun a => Nat.rfind fun n => Part.map (fun m => decide (m = 0)) (f (Nat.pair (unpair a).1 (n + (unpair a).2)))
⊢ Partrec (unpaired fun a b => Nat.rfind fun n => (fun m => decide (m = 0)) <$> f (Nat.pair a (n + b)))
state_after: no goals
Theorem: Matroid.Basis.restrict_base
File: Mathlib/Data/Matroid/Restrict.lean

tactic: rw [basis_iff'] at h
state_before: α : Type u_1
M : Matroid α
R I J X Y : Set α
h : M.Basis I X
⊢ (M ↾ X).Base I
state_after: α : Type u_1
M : Matroid α
R I J X Y : Set α
h : (M.Indep I ∧ I ⊆ X ∧ ∀ (J : Set α), M.Indep J → I ⊆ J → J ⊆ X → I = J) ∧ X ⊆ M.E
⊢ (M ↾ X).Base I

tactic: simp_rw [base_iff_maximal_indep, restrict_indep_iff, and_imp, and_assoc, and_iff_right h.1.1,
  and_iff_right h.1.2.1]
state_before: α : Type u_1
M : Matroid α
R I J X Y : Set α
h : (M.Indep I ∧ I ⊆ X ∧ ∀ (J : Set α), M.Indep J → I ⊆ J → J ⊆ X → I = J) ∧ X ⊆ M.E
⊢ (M ↾ X).Base I
state_after: α : Type u_1
M : Matroid α
R I J X Y : Set α
h : (M.Indep I ∧ I ⊆ X ∧ ∀ (J : Set α), M.Indep J → I ⊆ J → J ⊆ X → I = J) ∧ X ⊆ M.E
⊢ ∀ (I_1 : Set α), M.Indep I_1 → I_1 ⊆ X → I ⊆ I_1 → I = I_1

tactic: exact fun J hJ hJX hIJ ↦ h.1.2.2 _ hJ hIJ hJX
state_before: α : Type u_1
M : Matroid α
R I J X Y : Set α
h : (M.Indep I ∧ I ⊆ X ∧ ∀ (J : Set α), M.Indep J → I ⊆ J → J ⊆ X → I = J) ∧ X ⊆ M.E
⊢ ∀ (I_1 : Set α), M.Indep I_1 → I_1 ⊆ X → I ⊆ I_1 → I = I_1
state_after: no goals