1337xyz1337xyz/leandojo-benchmark4-v10 huggingface dataset:
Theorem: Complex.arg_div_coe_angle
File: Mathlib/Analysis/SpecialFunctions/Complex/Arg.lean

tactic: rw [div_eq_mul_inv, arg_mul_coe_angle hx (inv_ne_zero hy), arg_inv_coe_angle, sub_eq_add_neg]
state_before: a x✝ z x y : ℂ
hx : x ≠ 0
hy : y ≠ 0
⊢ ↑(x / y).arg = ↑x.arg - ↑y.arg
state_after: no goals
Theorem: Nat.Prime.pow_dvd_iff_le_factorization
File: Mathlib/Data/Nat/Factorization/Basic.lean

tactic: rw [← factorization_le_iff_dvd (pow_pos pp.pos k).ne' hn, pp.factorization_pow, single_le_iff]
state_before: a b m n✝ p✝ p k n : ℕ
pp : Prime p
hn : n ≠ 0
⊢ p ^ k ∣ n ↔ k ≤ n.factorization p
state_after: no goals
Theorem: Sum.traverse_map
File: Mathlib/Control/Traversable/Instances.lean

tactic: cases x <;> simp [Sum.traverse, id_map, functor_norm] <;> rfl
state_before: σ : Type u
F G : Type u → Type u
inst✝¹ : Applicative F
inst✝ : Applicative G
α β γ : Type u
g : α → β
f : β → G γ
x : σ ⊕ α
⊢ Sum.traverse f (g <$> x) = Sum.traverse (f ∘ g) x
state_after: no goals
Theorem: inv_mul_cancel
File: Mathlib/Algebra/GroupWithZero/NeZero.lean

tactic: simp [inv_ne_zero h]
state_before: M₀ : Type u_1
M₀' : Type u_2
inst✝² : MulZeroOneClass M₀
inst✝¹ : Nontrivial M₀
G₀ : Type u_3
inst✝ : GroupWithZero G₀
a : G₀
h : a ≠ 0
⊢ a⁻¹ * a = a⁻¹ * a * a⁻¹ * a⁻¹⁻¹
state_after: no goals

tactic: simp [h]
state_before: M₀ : Type u_1
M₀' : Type u_2
inst✝² : MulZeroOneClass M₀
inst✝¹ : Nontrivial M₀
G₀ : Type u_3
inst✝ : GroupWithZero G₀
a : G₀
h : a ≠ 0
⊢ a⁻¹ * a * a⁻¹ * a⁻¹⁻¹ = a⁻¹ * a⁻¹⁻¹
state_after: no goals

tactic: simp [inv_ne_zero h]
state_before: M₀ : Type u_1
M₀' : Type u_2
inst✝² : MulZeroOneClass M₀
inst✝¹ : Nontrivial M₀
G₀ : Type u_3
inst✝ : GroupWithZero G₀
a : G₀
h : a ≠ 0
⊢ a⁻¹ * a⁻¹⁻¹ = 1
state_after: no goals
Theorem: PNat.Coprime.symm
File: Mathlib/Data/PNat/Prime.lean

tactic: unfold Coprime
state_before: m n : ℕ+
⊢ m.Coprime n → n.Coprime m
state_after: m n : ℕ+
⊢ m.gcd n = 1 → n.gcd m = 1

tactic: rw [gcd_comm]
state_before: m n : ℕ+
⊢ m.gcd n = 1 → n.gcd m = 1
state_after: m n : ℕ+
⊢ n.gcd m = 1 → n.gcd m = 1

tactic: simp
state_before: m n : ℕ+
⊢ n.gcd m = 1 → n.gcd m = 1
state_after: no goals
Theorem: FreeGroup.Red.step_invRev_iff
File: Mathlib/GroupTheory/FreeGroup/Basic.lean

tactic: simpa only [invRev_invRev] using h.invRev
state_before: α : Type u
L L₁ L₂ L₃ L₄ : List (α × Bool)
h : Step (FreeGroup.invRev L₁) (FreeGroup.invRev L₂)
⊢ Step L₁ L₂
state_after: no goals
Theorem: Rat.intCast_div_self
File: Mathlib/Data/Rat/Lemmas.lean

tactic: by_cases hn : n = 0
state_before: n : ℤ
⊢ ↑(n / n) = ↑n / ↑n
state_after: case pos
n : ℤ
hn : n = 0
⊢ ↑(n / n) = ↑n / ↑n

case neg
n : ℤ
hn : ¬n = 0
⊢ ↑(n / n) = ↑n / ↑n

tactic: subst hn
state_before: case pos
n : ℤ
hn : n = 0
⊢ ↑(n / n) = ↑n / ↑n
state_after: case pos

⊢ ↑(0 / 0) = ↑0 / ↑0

tactic: simp only [Int.cast_zero, Int.zero_div, zero_div, Int.ediv_zero]
state_before: case pos

⊢ ↑(0 / 0) = ↑0 / ↑0
state_after: no goals

tactic: have : (n : ℚ) ≠ 0 := by rwa [← coe_int_inj] at hn
state_before: case neg
n : ℤ
hn : ¬n = 0
⊢ ↑(n / n) = ↑n / ↑n
state_after: case neg
n : ℤ
hn : ¬n = 0
this : ↑n ≠ 0
⊢ ↑(n / n) = ↑n / ↑n

tactic: simp only [Int.ediv_self hn, Int.cast_one, Ne, not_false_iff, div_self this]
state_before: case neg
n : ℤ
hn : ¬n = 0
this : ↑n ≠ 0
⊢ ↑(n / n) = ↑n / ↑n
state_after: no goals

tactic: rwa [← coe_int_inj] at hn
state_before: n : ℤ
hn : ¬n = 0
⊢ ↑n ≠ 0
state_after: no goals
Theorem: Real.ratCast_lt
File: Mathlib/Data/Real/Basic.lean

tactic: erw [mk_lt]
state_before: x✝ y✝ : ℝ
x y : ℚ
⊢ ↑x < ↑y ↔ x < y
state_after: x✝ y✝ : ℝ
x y : ℚ
⊢ const abs ↑x < const abs ↑y ↔ x < y

tactic: exact const_lt
state_before: x✝ y✝ : ℝ
x y : ℚ
⊢ const abs ↑x < const abs ↑y ↔ x < y
state_after: no goals
Theorem: Int.cast_nonneg
File: Mathlib/Algebra/Order/Ring/Cast.lean

tactic: simp
state_before: R : Type u_1
inst✝¹ : OrderedRing R
inst✝ : Nontrivial R
m n✝ : ℤ
n : ℕ
⊢ 0 ≤ ↑↑n ↔ 0 ≤ ↑n
state_after: no goals

tactic: have : -(n : R) < 1 := lt_of_le_of_lt (by simp) zero_lt_one
state_before: R : Type u_1
inst✝¹ : OrderedRing R
inst✝ : Nontrivial R
m n✝ : ℤ
n : ℕ
⊢ 0 ≤ ↑-[n+1] ↔ 0 ≤ -[n+1]
state_after: R : Type u_1
inst✝¹ : OrderedRing R
inst✝ : Nontrivial R
m n✝ : ℤ
n : ℕ
this : -↑n < 1
⊢ 0 ≤ ↑-[n+1] ↔ 0 ≤ -[n+1]

tactic: simpa [(negSucc_lt_zero n).not_le, ← sub_eq_add_neg, le_neg] using this.not_le
state_before: R : Type u_1
inst✝¹ : OrderedRing R
inst✝ : Nontrivial R
m n✝ : ℤ
n : ℕ
this : -↑n < 1
⊢ 0 ≤ ↑-[n+1] ↔ 0 ≤ -[n+1]
state_after: no goals

tactic: simp
state_before: R : Type u_1
inst✝¹ : OrderedRing R
inst✝ : Nontrivial R
m n✝ : ℤ
n : ℕ
⊢ -↑n ≤ 0
state_after: no goals
Theorem: Set.sUnion_mem_empty_univ
File: Mathlib/Data/Set/Lattice.lean

tactic: simp only [mem_insert_iff, mem_singleton_iff, or_iff_not_imp_left, sUnion_eq_empty, not_forall]
state_before: α : Type u_1
β : Type u_2
γ : Type u_3
ι : Sort u_4
ι' : Sort u_5
ι₂ : Sort u_6
κ : ι → Sort u_7
κ₁ : ι → Sort u_8
κ₂ : ι → Sort u_9
κ' : ι' → Sort u_10
S : Set (Set α)
h : S ⊆ {∅, univ}
⊢ ⋃₀ S ∈ {∅, univ}
state_after: α : Type u_1
β : Type u_2
γ : Type u_3
ι : Sort u_4
ι' : Sort u_5
ι₂ : Sort u_6
κ : ι → Sort u_7
κ₁ : ι → Sort u_8
κ₂ : ι → Sort u_9
κ' : ι' → Sort u_10
S : Set (Set α)
h : S ⊆ {∅, univ}
⊢ (∃ x, ∃ (_ : x ∈ S), ¬x = ∅) → ⋃₀ S = univ

tactic: rintro ⟨s, hs, hne⟩
state_before: α : Type u_1
β : Type u_2
γ : Type u_3
ι : Sort u_4
ι' : Sort u_5
ι₂ : Sort u_6
κ : ι → Sort u_7
κ₁ : ι → Sort u_8
κ₂ : ι → Sort u_9
κ' : ι' → Sort u_10
S : Set (Set α)
h : S ⊆ {∅, univ}
⊢ (∃ x, ∃ (_ : x ∈ S), ¬x = ∅) → ⋃₀ S = univ
state_after: case intro.intro
α : Type u_1
β : Type u_2
γ : Type u_3
ι : Sort u_4
ι' : Sort u_5
ι₂ : Sort u_6
κ : ι → Sort u_7
κ₁ : ι → Sort u_8
κ₂ : ι → Sort u_9
κ' : ι' → Sort u_10
S : Set (Set α)
h : S ⊆ {∅, univ}
s : Set α
hs : s ∈ S
hne : ¬s = ∅
⊢ ⋃₀ S = univ

tactic: obtain rfl : s = univ := (h hs).resolve_left hne
state_before: case intro.intro
α : Type u_1
β : Type u_2
γ : Type u_3
ι : Sort u_4
ι' : Sort u_5
ι₂ : Sort u_6
κ : ι → Sort u_7
κ₁ : ι → Sort u_8
κ₂ : ι → Sort u_9
κ' : ι' → Sort u_10
S : Set (Set α)
h : S ⊆ {∅, univ}
s : Set α
hs : s ∈ S
hne : ¬s = ∅
⊢ ⋃₀ S = univ
state_after: case intro.intro
α : Type u_1
β : Type u_2
γ : Type u_3
ι : Sort u_4
ι' : Sort u_5
ι₂ : Sort u_6
κ : ι → Sort u_7
κ₁ : ι → Sort u_8
κ₂ : ι → Sort u_9
κ' : ι' → Sort u_10
S : Set (Set α)
h : S ⊆ {∅, univ}
hs : univ ∈ S
hne : ¬univ = ∅
⊢ ⋃₀ S = univ

tactic: exact univ_subset_iff.1 <| subset_sUnion_of_mem hs
state_before: case intro.intro
α : Type u_1
β : Type u_2
γ : Type u_3
ι : Sort u_4
ι' : Sort u_5
ι₂ : Sort u_6
κ : ι → Sort u_7
κ₁ : ι → Sort u_8
κ₂ : ι → Sort u_9
κ' : ι' → Sort u_10
S : Set (Set α)
h : S ⊆ {∅, univ}
hs : univ ∈ S
hne : ¬univ = ∅
⊢ ⋃₀ S = univ
state_after: no goals
Theorem: Isometry.diam_range
File: Mathlib/Topology/MetricSpace/Isometry.lean

tactic: rw [← image_univ]
state_before: ι : Type u_1
α : Type u
β : Type v
γ : Type w
inst✝¹ : PseudoMetricSpace α
inst✝ : PseudoMetricSpace β
f : α → β
hf : Isometry f
⊢ Metric.diam (range f) = Metric.diam univ
state_after: ι : Type u_1
α : Type u
β : Type v
γ : Type w
inst✝¹ : PseudoMetricSpace α
inst✝ : PseudoMetricSpace β
f : α → β
hf : Isometry f
⊢ Metric.diam (f '' univ) = Metric.diam univ

tactic: exact hf.diam_image univ
state_before: ι : Type u_1
α : Type u
β : Type v
γ : Type w
inst✝¹ : PseudoMetricSpace α
inst✝ : PseudoMetricSpace β
f : α → β
hf : Isometry f
⊢ Metric.diam (f '' univ) = Metric.diam univ
state_after: no goals
Theorem: Finset.diag_singleton
File: Mathlib/Data/Finset/Prod.lean

tactic: rw [← product_sdiff_offDiag, offDiag_singleton, sdiff_empty, singleton_product_singleton]
state_before: α : Type u_1
β : Type u_2
γ : Type u_3
inst✝ : DecidableEq α
s t : Finset α
x : α × α
a : α
⊢ {a}.diag = {(a, a)}
state_after: no goals
Theorem: Finset.sum_mul_boole
File: Mathlib/Algebra/BigOperators/Ring.lean

tactic: simp
state_before: ι : Type u_1
α : Type u_2
β : Type u_3
γ : Type u_4
κ : ι → Type u_5
s✝ s₁ s₂ : Finset ι
i✝ : ι
a : α
f✝ g : ι → α
inst✝¹ : NonAssocSemiring α
inst✝ : DecidableEq ι
s : Finset ι
f : ι → α
i : ι
⊢ (∑ j ∈ s, f j * if i = j then 1 else 0) = if i ∈ s then f i else 0
state_after: no goals
Theorem: rightCoset_eq_iff
File: Mathlib/GroupTheory/Coset.lean

tactic: rw [Set.ext_iff]
state_before: α : Type u_1
inst✝ : Group α
s : Subgroup α
x y : α
⊢ op x • ↑s = op y • ↑s ↔ y * x⁻¹ ∈ s
state_after: α : Type u_1
inst✝ : Group α
s : Subgroup α
x y : α
⊢ (∀ (x_1 : α), x_1 ∈ op x • ↑s ↔ x_1 ∈ op y • ↑s) ↔ y * x⁻¹ ∈ s

tactic: simp_rw [mem_rightCoset_iff, SetLike.mem_coe]
state_before: α : Type u_1
inst✝ : Group α
s : Subgroup α
x y : α
⊢ (∀ (x_1 : α), x_1 ∈ op x • ↑s ↔ x_1 ∈ op y • ↑s) ↔ y * x⁻¹ ∈ s
state_after: α : Type u_1
inst✝ : Group α
s : Subgroup α
x y : α
⊢ (∀ (x_1 : α), x_1 * x⁻¹ ∈ s ↔ x_1 * y⁻¹ ∈ s) ↔ y * x⁻¹ ∈ s

tactic: constructor
state_before: α : Type u_1
inst✝ : Group α
s : Subgroup α
x y : α
⊢ (∀ (x_1 : α), x_1 * x⁻¹ ∈ s ↔ x_1 * y⁻¹ ∈ s) ↔ y * x⁻¹ ∈ s
state_after: case mp
α : Type u_1
inst✝ : Group α
s : Subgroup α
x y : α
⊢ (∀ (x_1 : α), x_1 * x⁻¹ ∈ s ↔ x_1 * y⁻¹ ∈ s) → y * x⁻¹ ∈ s

case mpr
α : Type u_1
inst✝ : Group α
s : Subgroup α
x y : α
⊢ y * x⁻¹ ∈ s → ∀ (x_1 : α), x_1 * x⁻¹ ∈ s ↔ x_1 * y⁻¹ ∈ s

tactic: intro h
state_before: case mp
α : Type u_1
inst✝ : Group α
s : Subgroup α
x y : α
⊢ (∀ (x_1 : α), x_1 * x⁻¹ ∈ s ↔ x_1 * y⁻¹ ∈ s) → y * x⁻¹ ∈ s
state_after: case mp
α : Type u_1
inst✝ : Group α
s : Subgroup α
x y : α
h : ∀ (x_1 : α), x_1 * x⁻¹ ∈ s ↔ x_1 * y⁻¹ ∈ s
⊢ y * x⁻¹ ∈ s

tactic: apply (h y).mpr
state_before: case mp
α : Type u_1
inst✝ : Group α
s : Subgroup α
x y : α
h : ∀ (x_1 : α), x_1 * x⁻¹ ∈ s ↔ x_1 * y⁻¹ ∈ s
⊢ y * x⁻¹ ∈ s
state_after: case mp
α : Type u_1
inst✝ : Group α
s : Subgroup α
x y : α
h : ∀ (x_1 : α), x_1 * x⁻¹ ∈ s ↔ x_1 * y⁻¹ ∈ s
⊢ y * y⁻¹ ∈ s

tactic: rw [mul_right_inv]
state_before: case mp
α : Type u_1
inst✝ : Group α
s : Subgroup α
x y : α
h : ∀ (x_1 : α), x_1 * x⁻¹ ∈ s ↔ x_1 * y⁻¹ ∈ s
⊢ y * y⁻¹ ∈ s
state_after: case mp
α : Type u_1
inst✝ : Group α
s : Subgroup α
x y : α
h : ∀ (x_1 : α), x_1 * x⁻¹ ∈ s ↔ x_1 * y⁻¹ ∈ s
⊢ 1 ∈ s

tactic: exact s.one_mem
state_before: case mp
α : Type u_1
inst✝ : Group α
s : Subgroup α
x y : α
h : ∀ (x_1 : α), x_1 * x⁻¹ ∈ s ↔ x_1 * y⁻¹ ∈ s
⊢ 1 ∈ s
state_after: no goals

tactic: intro h z
state_before: case mpr
α : Type u_1
inst✝ : Group α
s : Subgroup α
x y : α
⊢ y * x⁻¹ ∈ s → ∀ (x_1 : α), x_1 * x⁻¹ ∈ s ↔ x_1 * y⁻¹ ∈ s
state_after: case mpr
α : Type u_1
inst✝ : Group α
s : Subgroup α
x y : α
h : y * x⁻¹ ∈ s
z : α
⊢ z * x⁻¹ ∈ s ↔ z * y⁻¹ ∈ s

tactic: rw [← inv_mul_cancel_left y x⁻¹]
state_before: case mpr
α : Type u_1
inst✝ : Group α
s : Subgroup α
x y : α
h : y * x⁻¹ ∈ s
z : α
⊢ z * x⁻¹ ∈ s ↔ z * y⁻¹ ∈ s
state_after: case mpr
α : Type u_1
inst✝ : Group α
s : Subgroup α
x y : α
h : y * x⁻¹ ∈ s
z : α
⊢ z * (y⁻¹ * (y * x⁻¹)) ∈ s ↔ z * y⁻¹ ∈ s

tactic: rw [← mul_assoc]
state_before: case mpr
α : Type u_1
inst✝ : Group α
s : Subgroup α
x y : α
h : y * x⁻¹ ∈ s
z : α
⊢ z * (y⁻¹ * (y * x⁻¹)) ∈ s ↔ z * y⁻¹ ∈ s
state_after: case mpr
α : Type u_1
inst✝ : Group α
s : Subgroup α
x y : α
h : y * x⁻¹ ∈ s
z : α
⊢ z * y⁻¹ * (y * x⁻¹) ∈ s ↔ z * y⁻¹ ∈ s

tactic: exact s.mul_mem_cancel_right h
state_before: case mpr
α : Type u_1
inst✝ : Group α
s : Subgroup α
x y : α
h : y * x⁻¹ ∈ s
z : α
⊢ z * y⁻¹ * (y * x⁻¹) ∈ s ↔ z * y⁻¹ ∈ s
state_after: no goals
Theorem: Set.image_const_mul_Ioi_zero
File: Mathlib/Data/Set/Pointwise/Interval.lean

tactic: erw [(Units.mk0 x hx.ne').mulLeft.image_eq_preimage, preimage_const_mul_Ioi 0 (inv_pos.mpr hx),
  zero_div]
state_before: α : Type u_1
inst✝¹ : LinearOrderedField α
a : α
k : Type u_2
inst✝ : LinearOrderedField k
x : k
hx : 0 < x
⊢ (fun y => x * y) '' Ioi 0 = Ioi 0
state_after: no goals
Theorem: pathConnectedSpace_iff_eq
File: Mathlib/Topology/Connected/PathConnected.lean

tactic: simp [pathConnectedSpace_iff_univ, isPathConnected_iff_eq]
state_before: X : Type u_1
Y : Type u_2
inst✝¹ : TopologicalSpace X
inst✝ : TopologicalSpace Y
x y z : X
ι : Type u_3
F : Set X
⊢ PathConnectedSpace X ↔ ∃ x, pathComponent x = univ
state_after: no goals
Theorem: Multiset.aemeasurable_prod'
File: Mathlib/MeasureTheory/Group/Arithmetic.lean

tactic: rcases l with ⟨l⟩
state_before: α✝ : Type u_1
M : Type u_2
ι : Type u_3
α : Type u_4
inst✝² : CommMonoid M
inst✝¹ : MeasurableSpace M
inst✝ : MeasurableMul₂ M
m : MeasurableSpace α
μ : Measure α
f : ι → α → M
l : Multiset (α → M)
hl : ∀ f ∈ l, AEMeasurable f μ
⊢ AEMeasurable l.prod μ
state_after: case mk
α✝ : Type u_1
M : Type u_2
ι : Type u_3
α : Type u_4
inst✝² : CommMonoid M
inst✝¹ : MeasurableSpace M
inst✝ : MeasurableMul₂ M
m : MeasurableSpace α
μ : Measure α
f : ι → α → M
l✝ : Multiset (α → M)
l : List (α → M)
hl : ∀ f ∈ Quot.mk Setoid.r l, AEMeasurable f μ
⊢ AEMeasurable (prod (Quot.mk Setoid.r l)) μ

tactic: simpa using l.aemeasurable_prod' (by simpa using hl)
state_before: case mk
α✝ : Type u_1
M : Type u_2
ι : Type u_3
α : Type u_4
inst✝² : CommMonoid M
inst✝¹ : MeasurableSpace M
inst✝ : MeasurableMul₂ M
m : MeasurableSpace α
μ : Measure α
f : ι → α → M
l✝ : Multiset (α → M)
l : List (α → M)
hl : ∀ f ∈ Quot.mk Setoid.r l, AEMeasurable f μ
⊢ AEMeasurable (prod (Quot.mk Setoid.r l)) μ
state_after: no goals

tactic: simpa using hl
state_before: α✝ : Type u_1
M : Type u_2
ι : Type u_3
α : Type u_4
inst✝² : CommMonoid M
inst✝¹ : MeasurableSpace M
inst✝ : MeasurableMul₂ M
m : MeasurableSpace α
μ : Measure α
f : ι → α → M
l✝ : Multiset (α → M)
l : List (α → M)
hl : ∀ f ∈ Quot.mk Setoid.r l, AEMeasurable f μ
⊢ ∀ f ∈ l, AEMeasurable f μ
state_after: no goals
Theorem: InnerProductGeometry.angle_zero_left
File: Mathlib/Geometry/Euclidean/Angle/Unoriented/Basic.lean

tactic: unfold angle
state_before: V : Type u_1
inst✝¹ : NormedAddCommGroup V
inst✝ : InnerProductSpace ℝ V
x✝ y x : V
⊢ angle 0 x = π / 2
state_after: V : Type u_1
inst✝¹ : NormedAddCommGroup V
inst✝ : InnerProductSpace ℝ V
x✝ y x : V
⊢ arccos (⟪0, x⟫_ℝ / (‖0‖ * ‖x‖)) = π / 2

tactic: rw [inner_zero_left, zero_div, Real.arccos_zero]
state_before: V : Type u_1
inst✝¹ : NormedAddCommGroup V
inst✝ : InnerProductSpace ℝ V
x✝ y x : V
⊢ arccos (⟪0, x⟫_ℝ / (‖0‖ * ‖x‖)) = π / 2
state_after: no goals
Theorem: geom_gold_isSol_fibRec
File: Mathlib/Data/Real/GoldenRatio.lean

tactic: rw [fibRec.geom_sol_iff_root_charPoly, fibRec_charPoly_eq]
state_before: α : Type u_1
inst✝ : CommSemiring α
⊢ fibRec.IsSolution fun x => φ ^ x
state_after: α : Type u_1
inst✝ : CommSemiring α
⊢ (X ^ 2 - (X + 1)).IsRoot φ

tactic: simp [sub_eq_zero, - div_pow]
state_before: α : Type u_1
inst✝ : CommSemiring α
⊢ (X ^ 2 - (X + 1)).IsRoot φ
state_after: no goals
Theorem: Primrec.nat_iterate
File: Mathlib/Computability/Primrec.lean

tactic: induction f a <;> simp [*, -Function.iterate_succ, Function.iterate_succ']
state_before: α : Type u_1
β : Type u_2
γ : Type u_3
δ : Type u_4
σ : Type u_5
inst✝⁴ : Primcodable α
inst✝³ : Primcodable β
inst✝² : Primcodable γ
inst✝¹ : Primcodable δ
inst✝ : Primcodable σ
f : α → ℕ
g : α → β
h : α → β → β
hf : Primrec f
hg : Primrec g
hh : Primrec₂ h
a : α
⊢ Nat.rec (g a) (fun n IH => h a (n, IH).2) (f a) = (h a)^[f a] (g a)
state_after: no goals
Theorem: Matrix.toMatrix₂Aux_toLinearMap₂'Aux
File: Mathlib/LinearAlgebra/Matrix/SesquilinearForm.lean

tactic: ext i j
state_before: R : Type u_1
R₁ : Type u_2
R₂ : Type u_3
M : Type u_4
M₁ : Type u_5
M₂ : Type u_6
M₁' : Type u_7
M₂' : Type u_8
n : Type u_9
m : Type u_10
n' : Type u_11
m' : Type u_12
ι : Type u_13
inst✝¹⁰ : CommSemiring R
inst✝⁹ : Semiring R₁
inst✝⁸ : Semiring R₂
inst✝⁷ : AddCommMonoid M₁
inst✝⁶ : Module R₁ M₁
inst✝⁵ : AddCommMonoid M₂
inst✝⁴ : Module R₂ M₂
inst✝³ : Fintype n
inst✝² : Fintype m
inst✝¹ : DecidableEq n
inst✝ : DecidableEq m
σ₁ : R₁ →+* R
σ₂ : R₂ →+* R
f : Matrix n m R
⊢ (toMatrix₂Aux (fun i => (LinearMap.stdBasis R₁ (fun x => R₁) i) 1) fun j => (LinearMap.stdBasis R₂ (fun x => R₂) j) 1)
      (toLinearMap₂'Aux σ₁ σ₂ f) =
    f
state_after: case a
R : Type u_1
R₁ : Type u_2
R₂ : Type u_3
M : Type u_4
M₁ : Type u_5
M₂ : Type u_6
M₁' : Type u_7
M₂' : Type u_8
n : Type u_9
m : Type u_10
n' : Type u_11
m' : Type u_12
ι : Type u_13
inst✝¹⁰ : CommSemiring R
inst✝⁹ : Semiring R₁
inst✝⁸ : Semiring R₂
inst✝⁷ : AddCommMonoid M₁
inst✝⁶ : Module R₁ M₁
inst✝⁵ : AddCommMonoid M₂
inst✝⁴ : Module R₂ M₂
inst✝³ : Fintype n
inst✝² : Fintype m
inst✝¹ : DecidableEq n
inst✝ : DecidableEq m
σ₁ : R₁ →+* R
σ₂ : R₂ →+* R
f : Matrix n m R
i : n
j : m
⊢ (toMatrix₂Aux (fun i => (LinearMap.stdBasis R₁ (fun x => R₁) i) 1) fun j => (LinearMap.stdBasis R₂ (fun x => R₂) j) 1)
      (toLinearMap₂'Aux σ₁ σ₂ f) i j =
    f i j

tactic: simp_rw [LinearMap.toMatrix₂Aux_apply, Matrix.toLinearMap₂'Aux_stdBasis]
state_before: case a
R : Type u_1
R₁ : Type u_2
R₂ : Type u_3
M : Type u_4
M₁ : Type u_5
M₂ : Type u_6
M₁' : Type u_7
M₂' : Type u_8
n : Type u_9
m : Type u_10
n' : Type u_11
m' : Type u_12
ι : Type u_13
inst✝¹⁰ : CommSemiring R
inst✝⁹ : Semiring R₁
inst✝⁸ : Semiring R₂
inst✝⁷ : AddCommMonoid M₁
inst✝⁶ : Module R₁ M₁
inst✝⁵ : AddCommMonoid M₂
inst✝⁴ : Module R₂ M₂
inst✝³ : Fintype n
inst✝² : Fintype m
inst✝¹ : DecidableEq n
inst✝ : DecidableEq m
σ₁ : R₁ →+* R
σ₂ : R₂ →+* R
f : Matrix n m R
i : n
j : m
⊢ (toMatrix₂Aux (fun i => (LinearMap.stdBasis R₁ (fun x => R₁) i) 1) fun j => (LinearMap.stdBasis R₂ (fun x => R₂) j) 1)
      (toLinearMap₂'Aux σ₁ σ₂ f) i j =
    f i j
state_after: no goals
Theorem: CategoryTheory.MonoidalCategory.whiskerLeft_dite
File: Mathlib/CategoryTheory/Monoidal/Category.lean

tactic: split_ifs <;> rfl
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✝ : C
P : Prop
inst✝ : Decidable P
X Y Z : C
f : P → (Y ⟶ Z)
f' : ¬P → (Y ⟶ Z)
⊢ (X ◁ if h : P then f h else f' h) = if h : P then X ◁ f h else X ◁ f' h
state_after: no goals
Theorem: Multiset.filter_attach'
File: Mathlib/Data/Multiset/Basic.lean

tactic: classical
refine Multiset.map_injective Subtype.val_injective ?_
rw [map_filter' _ Subtype.val_injective]
simp only [Function.comp, Subtype.exists, coe_mk, Subtype.map,
  exists_and_right, exists_eq_right, attach_map_val, map_map, map_coe, id]
state_before: α : Type u_1
β : Type v
γ : Type u_2
s : Multiset α
p : { a // a ∈ s } → Prop
inst✝¹ : DecidableEq α
inst✝ : DecidablePred p
⊢ filter p s.attach = map (Subtype.map id ⋯) (filter (fun x => ∃ (h : x ∈ s), p ⟨x, h⟩) s).attach
state_after: no goals

tactic: refine Multiset.map_injective Subtype.val_injective ?_
state_before: α : Type u_1
β : Type v
γ : Type u_2
s : Multiset α
p : { a // a ∈ s } → Prop
inst✝¹ : DecidableEq α
inst✝ : DecidablePred p
⊢ filter p s.attach = map (Subtype.map id ⋯) (filter (fun x => ∃ (h : x ∈ s), p ⟨x, h⟩) s).attach
state_after: α : Type u_1
β : Type v
γ : Type u_2
s : Multiset α
p : { a // a ∈ s } → Prop
inst✝¹ : DecidableEq α
inst✝ : DecidablePred p
⊢ map val (filter p s.attach) = map val (map (Subtype.map id ⋯) (filter (fun x => ∃ (h : x ∈ s), p ⟨x, h⟩) s).attach)

tactic: rw [map_filter' _ Subtype.val_injective]
state_before: α : Type u_1
β : Type v
γ : Type u_2
s : Multiset α
p : { a // a ∈ s } → Prop
inst✝¹ : DecidableEq α
inst✝ : DecidablePred p
⊢ map val (filter p s.attach) = map val (map (Subtype.map id ⋯) (filter (fun x => ∃ (h : x ∈ s), p ⟨x, h⟩) s).attach)
state_after: α : Type u_1
β : Type v
γ : Type u_2
s : Multiset α
p : { a // a ∈ s } → Prop
inst✝¹ : DecidableEq α
inst✝ : DecidablePred p
⊢ filter (fun b => ∃ a, p a ∧ ↑a = b) (map val s.attach) =
    map val (map (Subtype.map id ⋯) (filter (fun x => ∃ (h : x ∈ s), p ⟨x, h⟩) s).attach)

tactic: simp only [Function.comp, Subtype.exists, coe_mk, Subtype.map,
  exists_and_right, exists_eq_right, attach_map_val, map_map, map_coe, id]
state_before: α : Type u_1
β : Type v
γ : Type u_2
s : Multiset α
p : { a // a ∈ s } → Prop
inst✝¹ : DecidableEq α
inst✝ : DecidablePred p
⊢ filter (fun b => ∃ a, p a ∧ ↑a = b) (map val s.attach) =
    map val (map (Subtype.map id ⋯) (filter (fun x => ∃ (h : x ∈ s), p ⟨x, h⟩) s).attach)
state_after: no goals
Theorem: Finsupp.lcongr_symm_single
File: Mathlib/LinearAlgebra/Finsupp.lean

tactic: apply_fun (lcongr e₁ e₂ : (ι →₀ M) → (κ →₀ N)) using (lcongr e₁ e₂).injective
state_before: α : Type u_1
M : Type u_2
N : Type u_3
P : Type u_4
R : Type u_5
S : Type u_6
inst✝⁷ : Semiring R
inst✝⁶ : Semiring S
inst✝⁵ : AddCommMonoid M
inst✝⁴ : Module R M
inst✝³ : AddCommMonoid N
inst✝² : Module R N
inst✝¹ : AddCommMonoid P
inst✝ : Module R P
ι : Type u_7
κ : Type u_8
e₁ : ι ≃ κ
e₂ : M ≃ₗ[R] N
k : κ
n : N
⊢ (lcongr e₁ e₂).symm (single k n) = single (e₁.symm k) (e₂.symm n)
state_after: α : Type u_1
M : Type u_2
N : Type u_3
P : Type u_4
R : Type u_5
S : Type u_6
inst✝⁷ : Semiring R
inst✝⁶ : Semiring S
inst✝⁵ : AddCommMonoid M
inst✝⁴ : Module R M
inst✝³ : AddCommMonoid N
inst✝² : Module R N
inst✝¹ : AddCommMonoid P
inst✝ : Module R P
ι : Type u_7
κ : Type u_8
e₁ : ι ≃ κ
e₂ : M ≃ₗ[R] N
k : κ
n : N
⊢ (lcongr e₁ e₂) ((lcongr e₁ e₂).symm (single k n)) = (lcongr e₁ e₂) (single (e₁.symm k) (e₂.symm n))

tactic: simp
state_before: α : Type u_1
M : Type u_2
N : Type u_3
P : Type u_4
R : Type u_5
S : Type u_6
inst✝⁷ : Semiring R
inst✝⁶ : Semiring S
inst✝⁵ : AddCommMonoid M
inst✝⁴ : Module R M
inst✝³ : AddCommMonoid N
inst✝² : Module R N
inst✝¹ : AddCommMonoid P
inst✝ : Module R P
ι : Type u_7
κ : Type u_8
e₁ : ι ≃ κ
e₂ : M ≃ₗ[R] N
k : κ
n : N
⊢ (lcongr e₁ e₂) ((lcongr e₁ e₂).symm (single k n)) = (lcongr e₁ e₂) (single (e₁.symm k) (e₂.symm n))
state_after: no goals
Theorem: IsUnifLocDoublingMeasure.ae_tendsto_average
File: Mathlib/MeasureTheory/Covering/DensityTheorem.lean

tactic: filter_upwards [(vitaliFamily μ K).ae_tendsto_average hf] with x hx ι l w δ δlim xmem using
  hx.comp (tendsto_closedBall_filterAt μ _ _ δlim xmem)
state_before: α : Type u_1
inst✝⁸ : MetricSpace α
inst✝⁷ : MeasurableSpace α
μ : Measure α
inst✝⁶ : IsUnifLocDoublingMeasure μ
inst✝⁵ : SecondCountableTopology α
inst✝⁴ : BorelSpace α
inst✝³ : IsLocallyFiniteMeasure μ
E : Type u_2
inst✝² : NormedAddCommGroup E
inst✝¹ : NormedSpace ℝ E
inst✝ : CompleteSpace E
f : α → E
hf : LocallyIntegrable f μ
K : ℝ
⊢ ∀ᵐ (x : α) ∂μ,
    ∀ {ι : Type u_3} {l : Filter ι} (w : ι → α) (δ : ι → ℝ),
      Tendsto δ l (𝓝[>] 0) →
        (∀ᶠ (j : ι) in l, x ∈ closedBall (w j) (K * δ j)) →
          Tendsto (fun j => ⨍ (y : α) in closedBall (w j) (δ j), f y ∂μ) l (𝓝 (f x))
state_after: no goals
Theorem: Cubic.degree_of_c_eq_zero
File: Mathlib/Algebra/CubicDiscriminant.lean

tactic: simpa only [of_c_eq_zero ha hb hc] using degree_C_le
state_before: R : Type u_1
S : Type u_2
F : Type u_3
K : Type u_4
P Q : Cubic R
a b c d a' b' c' d' : R
inst✝ : Semiring R
ha : P.a = 0
hb : P.b = 0
hc : P.c = 0
⊢ P.toPoly.degree ≤ 0
state_after: no goals
Theorem: threeGPFree_smul_set
File: Mathlib/Combinatorics/Additive/AP/Three/Defs.lean

tactic: rw [mul_mul_mul_comm, smul_eq_mul, smul_eq_mul, mul_mul_mul_comm, h]
state_before: F : Type u_1
α : Type u_2
β : Type u_3
𝕜 : Type u_4
E : Type u_5
inst✝ : CancelCommMonoid α
s : Set α
a : α
hs : ThreeGPFree (a • s)
b : α
hb : b ∈ s
c : α
hc : c ∈ s
d : α
hd : d ∈ s
h : b * d = c * c
⊢ a • b * a • d = a * c * (a * c)
state_after: no goals
Theorem: cfc_comp_neg
File: Mathlib/Topology/ContinuousFunction/FunctionalCalculus.lean

tactic: rw [cfc_comp' .., cfc_neg_id _]
state_before: R : Type u_1
A : Type u_2
p : A → Prop
inst✝¹⁰ : CommRing R
inst✝⁹ : StarRing R
inst✝⁸ : MetricSpace R
inst✝⁷ : TopologicalRing R
inst✝⁶ : ContinuousStar R
inst✝⁵ : TopologicalSpace A
inst✝⁴ : Ring A
inst✝³ : StarRing A
inst✝² : Algebra R A
inst✝¹ : ContinuousFunctionalCalculus R p
f g : R → R
a : A
hf✝ : autoParam (ContinuousOn f (spectrum R a)) _auto✝
hg : autoParam (ContinuousOn g (spectrum R a)) _auto✝
inst✝ : UniqueContinuousFunctionalCalculus R A
hf : autoParam (ContinuousOn f ((fun x => -x) '' spectrum R a)) _auto✝
ha : autoParam (p a) _auto✝
⊢ cfc (fun x => f (-x)) a = cfc f (-a)
state_after: no goals